head 1.4; access; symbols; locks; strict; comment @# @; 1.4 date 2002.09.07.01.50.38; author curt; state Exp; branches; next 1.3; 1.3 date 2002.08.31.19.01.54; author curt; state Exp; branches; next 1.2; 1.2 date 2002.08.31.18.54.01; author curt; state Exp; branches; next 1.1; 1.1 date 2002.02.15.17.21.57; author curt; state Exp; branches; next ; desc @@ 1.4 log @Updated doxygen docs. @ text @
Main Page Class Hierarchy Compound List File List Compound Members File Members

# logtest.cxx

    00001 #include <string>
    00002 #include "Debug/logstream.hxx"
    00003
    00004 class Test {
    00005
    00006         public:
    00007         Test() {
    00008           //cout << "Cout seems to work" << endl;
    00009           //cerr << "Cerr seems to work" << endl;
    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     //SG_LOG( FG_TERRAIN, FG_BULK,  "terrain::bulk" ); // shouldnt appear
    00026     //SG_LOG( FG_TERRAIN, SG_DEBUG, "terrain::debug" ); // shouldnt appear
    00027     //SG_LOG( FG_TERRAIN, SG_INFO,  "terrain::info" );
    00028     //SG_LOG( FG_TERRAIN, FG_WARN,  "terrain::warn" );
    00029     //SG_LOG( FG_TERRAIN, SG_ALERT, "terrain::alert" );
    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     // This shouldn't appear in log output:
    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 }

@ 1.3 log @Oops, try again. @ text @d59 1 a59 1