Hi,

Yes indeed. It is not possible to use cxxtools logging and syslog in the 
same file. It is this old problem with the C preprocessor. syslog.h 
defines a macro LOG_INFO and the name is used in cxxtools also. The 
macros do not follow namespaces and hence the clash.

As a workaround you could put the logging in different files. Maybe 
write a small wrapper around syslog.

In cxxtools I could prefix those identifiers with CXXTOOS_. But they are 
public and may be used in own code.

Tommi


Am 06.06.2016 um 17:43 schrieb Jean-Marc Choulet:
> #include <syslog.h>
> #include <cxxtools/log.h>
>
> int main ()
> {
>       openlog("testlog", LOG_CONS, LOG_LOCAL0);
>       syslog(LOG_INFO, "Hello %s", "testlog");
>
>       ...
>
>       closelog();
>
>       return 0;
> }


------------------------------------------------------------------------------
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