]> git.mxchange.org Git - flightgear.git/blob - Lib/Debug/logtest.cxx
Merge FG_Lib as subdirectory
[flightgear.git] / Lib / Debug / logtest.cxx
1 #include <string>
2 #include "Debug/logstream.hxx"
3
4 int
5 main( int argc, char* argv[] )
6 {
7     fglog().setLogLevels( FG_ALL, FG_INFO );
8
9     FG_LOG( FG_TERRAIN, FG_BULK,  "terrain::bulk" ); // shouldnt appear
10     FG_LOG( FG_TERRAIN, FG_DEBUG, "terrain::debug" ); // shouldnt appear
11     FG_LOG( FG_TERRAIN, FG_INFO,  "terrain::info" );
12     FG_LOG( FG_TERRAIN, FG_WARN,  "terrain::warn" );
13     FG_LOG( FG_TERRAIN, FG_ALERT, "terrain::alert" );
14
15     int i = 12345;
16     long l = 54321L;
17     double d = 3.14159;
18     string s = "Hello world!";
19
20     FG_LOG( FG_EVENT, FG_INFO, "event::info "
21                                  << "i=" << i
22                                  << ", l=" << l
23                                  << ", d=" << d
24                                  << ", d*l=" << d*l
25                                  << ", s=\"" << s << "\"" );
26
27     // This shouldn't appear in log output:
28     FG_LOG( FG_EVENT, FG_DEBUG, "event::debug "
29             << "- this should be seen - "
30             << "d=" << d
31             << ", s=\"" << s << "\"" );
32
33     return 0;
34 }