David Maisonave (Axter) (609-345-1007) (www.axter.com)
Copyright (C) 2006


Download EzLogger source code using following link:

Windows users can optionally use (CHM) help file, which can be downloaded through the following link:



EzLogger is a C++ logging library that can easily be added to an implementation. It can be used with both C++ style stream operators and C style printf functions.
For windows, the default policy logs the data to a text file with the same name and path of the executable, and having a postfix _debuglog.txt.
For none windows platform, the default policy logs the data to a file named ezlogger_output.txt. For details see ezlogger_output_policy

All logging is performmed through macros. This allows the logging class to automatically receive source file name, source line number, and source function name. There are four sets of macros. Two sets have fixed value verbosity level logging, and the other two sets have variable verbosity level logging.
The macro prefix determines what set it belongs to.

1. [EZLOGGER] Logging macros that implement in both debug and release version, and use default verbosity level
2. [EZLOGGERVL] Verbosity level logging macros, which implement in both debug and release version
3. [EZDBGONLYLOGGER] Logging macros that only implement in debug version, and use default verbosity level
4. [EZDBGONLYLOGGERVL] Verbosity level logging macros, which implement ONLY in debug version
For details on macro usage and description, see ezlogger_macros.hpp
For details on debug only macros, see DEBUG_ONLY_MACROS
For details on verbosity level logging, see VERBOSITY_LEVEL_LOGGING

Example Usage

// Example code for EZLOGGER macros
#include "ezlogger_headers.hpp"

void ezlogger_simple_example()
        int i = 123;
        std::string somedata = "Hello World";

        //Simple usage with standard verbosity level
        EZLOGGERSTREAM << somedata << " " << i << std::endl;

        //Can use alternate stream
        EZLOGGERSTREAM2(std::cerr) << somedata << " next line " << i << std::endl;

        //Verbosity level logging example
        EZLOGGERVLSTREAM(axter::log_often) << somedata << " " << i << std::endl;

        //Complex extended data example
        EZLOGGERVLSTREAM(axter::levels(axter::log_often, axter::warn, __FUNCSIG__ /*or GNU PRETTY_FUNCTION*/, "Xyz Facility")) << somedata << " " << i << std::endl;


For detailed EzLogger usage, see ezlogger_macros.hpp

Generated on Wed Mar 29 00:31:08 2006 for EzLogger by  doxygen 1.4.6.Axter [Axter-Extended-Version]