Questions tagged [boost-log]

The Boost C++ library for logging, focused on simplicity, extensibility and performance

336 questions
2
votes
2 answers

Boost log and severity / local attributes

I'm new to Boost log. I've got some simple stuff working but I'm stuck at getting a macro to make it easy to specify filename and line number. It's seeming so hard, I assume I've missed something. I wrote this to initialize logging with a demo log…
jma
  • 3,580
  • 6
  • 40
  • 60
2
votes
1 answer

Boost.Log failing to link with static libraries because of missing code_convert

I'm trying to link Boost.Log statically into my program. Boost.Log has successfully compiled with other modules using bjam. However, when I try to link with my program I'm getting an error: g++ -g -O2 -pthread -o sonar sonar-main.o sonar-config.o…
Mikey A. Leonetti
  • 2,834
  • 3
  • 22
  • 36
2
votes
1 answer

how to easily change output of BOOST_LOG_TRIVIAL

I would like to make the output of BOOST_LOG_TRIVIAL configurable, ie remove the timestamp and/or threadid and/or severity. Current output is eg this [2016-01-17 17:26:22.609294] [0x00007fc4b8dbd840] [fatal] "my MSG" What would be the easiest way…
filimon
  • 61
  • 4
2
votes
0 answers

How to build boost log v2 with cmake?

It seems that most users will just use a pre build version of boost in combination with find_package. I always download my 3rd party dependencies via git and integrate them in cmake. This was usually not a problem because all my libraries were…
Maik Klein
  • 15,548
  • 27
  • 101
  • 197
2
votes
1 answer

Use channel hiearchy of Boost.Log for severity and sink filtering

I have been studying Boost.Log for a while and I believe now is the time for me to transition my code base from log4cxx to Boost.Log. I believe the design and implementation of Boost.Log will significantly improve my code maintenance and usage. I…
Phil
  • 5,822
  • 2
  • 31
  • 60
2
votes
1 answer

boost::log::record_view assignment operator

#include struct A { boost::log::record_view view; }; int main() { const A a = {}; A b; b = a; const boost::log::record_view r; boost::log::record_view rr; rr = r; } The second is compiled,…
ForEveR
  • 55,233
  • 2
  • 119
  • 133
2
votes
2 answers

Boost log - formatting with severity_channel_logger

I have seen several examples with formatters, but those used custom defined attributes. How do I specify format for the severity_channel_logger? What I get now is: [2015-07-20 11:53:09.879305] [0x00007f047b525740] [trace] Bla, bla bla, bla bla…
Šimon Tóth
  • 35,456
  • 20
  • 106
  • 151
2
votes
1 answer

Implementing an orthogonal log level that gets dumped into a socket

I'm using boost log and want to implement an extra log level that is independent of the existing log levels. This log level will be activated on-demand, if there is a listening client connected to the daemons socket (independent of the current…
Šimon Tóth
  • 35,456
  • 20
  • 106
  • 151
2
votes
1 answer

Installing boost log

I've got this library for logging in boost. I have a question about installing. How to install it? Here is the latest version. There are 3 folder: boost, doc, libs. How can I install this library without recompiling all boost?
Max Frai
  • 61,946
  • 78
  • 197
  • 306
2
votes
1 answer

Combining filters in boost log

I use boost log and want to define a composed filter. I use boost::log::init_from_streamto read the configuration from a stream. Filtering on single conditions works fine. I can do Filter = "%Channel% = A" to get only log entries from channel A. I…
SebastianK
  • 3,582
  • 3
  • 30
  • 48
2
votes
1 answer

Travis-ci boost log compilation with biicode time-out

I am using travis-ci and biicode to build my project who is depending on boost log. But boost log times are longer than 10 min so I get this message: No output has been received in the last 10 minutes, this potentially indicates a stalled build or…
kittikun
  • 1,829
  • 1
  • 25
  • 33
2
votes
2 answers

boost log format single attribute with logging::init_from_stream

When I set up format params in code, to format date time output I can use something like this logging::formatter simpleFormat(expr::format("%1% %2%") % expr::format_date_time("TimeStamp", "%H:%M:%S") % …
Vasilly.Prokopyev
  • 856
  • 1
  • 10
  • 24
2
votes
1 answer

How to truncate boost log format expression

In general, how can I perform string manipulation on boost log format expressions? in particular, how can I to truncate a TimeStamp expression ending in fractional seconds so that milliseconds are logged rather than microseconds? Given this snippet,…
plong
  • 1,723
  • 3
  • 14
  • 14
2
votes
1 answer

STLport error: '__cxa_demangle' is not a member of 'abi' for boost library

I have been trying to compile a piece of code which needs boost logging , things are fine when I try to compile with gnustl but when I switch to stlport the compiler, cribs loud with the following message. In file included from …
Abhiram mishra
  • 1,597
  • 2
  • 14
  • 34
2
votes
2 answers

Set severity filter for sinks of a Boost.Log severity logger instance

I am using Boost.Log 1.55.0 in a project and I do want to change the severity filter for all sinks of a boost::log::sources::severity_logger instance. Here's an example how-to setup one sink with an initial severity filter: void…
Florian Wolters
  • 3,820
  • 5
  • 35
  • 55