Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/poisonousjohn/poison_log

C++ log utilities that I usually use in my projects
https://github.com/poisonousjohn/poison_log

Last synced: 5 days ago
JSON representation

C++ log utilities that I usually use in my projects

Awesome Lists containing this project

README

        

poison_log
==========

C++ log utilities that I usually use in my projects

##Supports
All systems with working cout. Also supports android logcat

##Requirements
- C++11
- Boost.Format
- Boost Thread (only for Android and if you've enabled synchronization)

##Usage
```cpp
#include

using namespace poison::utils;

int main(int argc, const char * argv[])
{
setLogLevel(LogLevel::LOG_DEBUG);

try {
DBG("test %d", 1);
DBG("test %d");
} catch (const boost::io::too_few_args& e) {
ERR("too few args");
} catch (...) {
ERR("unknown exception");
}

return 0;
}

```

**Output**
```
2014-09-04 15:41:13 [ D] test 1
2014-09-04 15:41:13 [ E] too few args
```