Quick Log for C++`
Quick Log is distributed only as a header. There is nothing to compile in this repository other than tests which also illustrate how to use QLOG.
- CMake 2.8.12 or newer
- C compiler. The following have been tested:
- llvm 3.4 or newer
- gcc 4.8.3 or newer
- Visual Studio
I highly recommend building outside of the source tree so that build products do not pollute the repository. The simplest way to accomplish this is to create a sub-directory named "build" as follows:
$ mkdir build
$ cd build
$ cmake ..
$ make
qlog::logger my_log;
std::ofstream log_file("error.log", std::ios::app);
qlog::logger my_log(log_file);
std::ofstream log_file("error.log", std::ios::app);
qlog::logger my_log(log_file, qlog::warning);
my_log(qlog::error) << "This is an error message";
my_log(qlog::debug) << "This is a debug message.";
// Note that if the verbosity level is qlog::warning, as shown above, this
// message will not be sent to the log.
- Move all configuration to a separate class.
- Add log aging by size (e.g. 1 MB) or time span (e.g. daily, weekly, or monthly)
- When aging the log, maintain a maximum number of "old" log files.
- Add a dependency on the ASF library for formatting.
- Fork it
- Create a feature branch (
git checkout -b new-feature
) - Commit changes (
git commit -am "Added new feature xyz"
) - Push the branch (
git push origin new-feature
) - Create a new pull request.
- Paul Howes (http://github.com/PaulHowes/)
Quick Log copyright 2014 Paul Howes and is licensed under the Apache License.