Hello,

Is it possible to use cxxtools logger and syslog functions together ?

#include <syslog.h>
#include <cxxtools/log.h>

int main ()
{
     openlog("testlog", LOG_CONS, LOG_LOCAL0);
     syslog(LOG_INFO, "Hello %s", "testlog");

     ...

     closelog();

     return 0;
}


The compiler gives these errors :

$ g++ -o testlog testlog.cpp -lcxxtools
In file included from /usr/include/syslog.h:1:0,
                  from testlog.cpp:1:
/usr/local/include/cxxtools/log/cxxtools.h:162:9: error: expected 
identifier before numeric constant
          LOG_INFO   = 0x08,
          ^
/usr/local/include/cxxtools/log/cxxtools.h:162:9: error: expected ‘}’ 
before numeric constant
/usr/local/include/cxxtools/log/cxxtools.h:162:9: error: expected 
unqualified-id before numeric constant
In file included from /usr/local/include/cxxtools/log.h:32:0,
                  from testlog.cpp:2:
/usr/local/include/cxxtools/log/cxxtools.h:171:29: error: ‘LOG_FATAL’ 
was not declared in this scope
          LOG_LEVEL_FATAL  = (LOG_FATAL << 1) - 1,
                              ^
/usr/local/include/cxxtools/log/cxxtools.h:172:29: error: ‘LOG_ERROR’ 
was not declared in this scope
          LOG_LEVEL_ERROR  = (LOG_ERROR << 1) - 1,
                              ^
/usr/local/include/cxxtools/log/cxxtools.h:173:29: error: ‘LOG_WARN’ was 
not declared in this scope
          LOG_LEVEL_WARN   = (LOG_WARN << 1) - 1,


Thanks,

Jean-Marc

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general

Reply via email to