Boost logo

Boost Users :

Subject: [Boost-users] Boost Log: I can't see syslog messages sent via boost syslog.
From: Anatoly G (anatolyrishon_at_[hidden])
Date: 2016-04-11 00:15:52

Dear members,
I have a question about Boost syslog.
I"m beginner Boost user.
I created attached code and can't understand why it doesn't work.

I execute my code on linux Kubuntu 3.13.0

After execution I"m looking for test strings in syslog file:
grep "Test" /var/log/syslog

But I don't see any line.

I tried to execute commands from shell
logger "Test from shell"
logger -n -t myapp -p user.notice "Test from shell"

I see these lines after executing grep on /var/log/syslog

I tried to initialize syslog_backend with
boost::log::keywords::use_impl = boost::log::sinks::syslog::native
instead of
boost::log::keywords::use_impl = boost::log::sinks::syslog::udp_socket_based

but then I get compile message, native not defined.

I found BOOST_LOG_USE_NATIVE_SYSLOG macro which should be defined during
Boost build, but I don't understand how to activate this macro in boost

Can you please suggest what is the problem?


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at