00001 #include <string>
00002 #include <simgear/debug/logstream.hxx>
00003
00004 class Test {
00005
00006 public:
00007 Test() {
00008
00009
00010
00011 sglog().setLogLevels( SG_ALL, SG_INFO );
00012
00013 SG_LOG(SG_EVENT, SG_INFO, "Test::Test" << "foo");
00014 }
00015
00016 };
00017
00018 Test test;
00019
00020 int
00021 main( int argc, char* argv[] )
00022 {
00023 sglog().setLogLevels( SG_ALL, SG_INFO );
00024
00025
00026
00027
00028
00029
00030
00031 int i = 12345;
00032 long l = 54321L;
00033 double d = 3.14159;
00034 string s = "Hello world!";
00035
00036 SG_LOG( SG_EVENT, SG_INFO, "event::info "
00037 << "i=" << i
00038 << ", l=" << l
00039 << ", d=" << d
00040 << ", d*l=" << d*l
00041 << ", s=\"" << s << "\"" );
00042
00043
00044 SG_LOG( SG_EVENT, SG_DEBUG, "event::debug "
00045 << "- this should be seen - "
00046 << "d=" << d
00047 << ", s=\"" << s << "\"" );
00048
00049 return 0;
00050 }