| 47 | logger logc("example.test_class"); |
| 48 | |
| 49 | class test |
| 50 | { |
| 51 | public: |
| 52 | test () |
| 53 | { |
| 54 | // this message won't get logged because LINFO is too low |
| 55 | logc << LINFO << "constructed a test object"; |
| 56 | } |
| 57 | |
| 58 | ~test () |
| 59 | { |
| 60 | // this message won't get logged because LINFO is too low |
| 61 | logc << LINFO << "destructed a test object"; |
| 62 | } |
| 63 | |
| 64 | void warning () |
| 65 | { |
| 66 | logc << LWARN << "warning! someone called warning()!"; |
| 67 | } |
| 68 | }; |
| 69 | |
| 70 | void thread (void*) |
| 71 | { |