https://github.com/mrquincle/log
The most simple logging simple you will encounter for C++
https://github.com/mrquincle/log
Last synced: 7 months ago
JSON representation
The most simple logging simple you will encounter for C++
- Host: GitHub
- URL: https://github.com/mrquincle/log
- Owner: mrquincle
- Created: 2015-04-17T13:08:37.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-06-01T22:18:04.000Z (over 10 years ago)
- Last Synced: 2025-01-22T09:42:51.688Z (9 months ago)
- Language: C++
- Size: 133 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# What is this?
A single file which allows you to write:
log::debug << "Hello world!" << std::endl;
log::info << "What do you think? I'm Gaya?" << std::endl;Moreover, there is a `VERBOSITY` level you can set to for example `INFO` which subsequently renders all calls to `log::debug` to `/dev/null`.
How does it then display this?
[18:32:43] INFO: Hello world!
If you also want to print the name of the process or the date, adjust the file accordingly.
## Does it work in all cases?
There are probably some corner cases which don't work. However, a lot will work. It's no problem to write code statements for example:
log::debug << flag ? "blah" : "foo" << std::endl;
There might be some issues with literals when writing them to `/dev/null`.
log::debug << 4 << std::endl;Feel free to submit issues, but make sure they won't make it many more lines of code. The beauty is in the fact that only a few defines are required right now.
# Copyrights
The copyrights (2015) belongs to the team of Distributed Organisms B.V. and are provided under an noncontagious open-source license:
* Authors: Anne van Rossum
* Date: 17 Apr. 2015
* License: LGPL v3+, Apache, or MIT, your choice
* DoBots B.V., http://www.dobots.nl
* Rotterdam, The Netherlands