Questions tagged [boost-logging]

This library is deprecated and is no longer being used. Use [boost-log] instead.

This library is deprecated and is no longer being used. Use instead.

Burninate boost-logging

46 questions
22
votes
4 answers

boost log to print source code file name and line number

I'm using Boost(1.55.0) Logging in my C++ application. I have been able to generate log of this format [2014-Jul-15 10:47:26.137959]: A regular message I want to be able to add source file name and line number where the log is…
Pritesh Acharya
  • 1,596
  • 5
  • 15
  • 36
10
votes
1 answer

how to use boost log from multiple files with Gloa

I am trying to create a Global Logger within my entire application so I can use src::severity_logger_mt< >& lg = my_logger::get(); to get the global logger for different classes (resided in different files) logging. I try to follow the example…
user2844779
  • 101
  • 1
  • 4
9
votes
2 answers

How to add color coding to boost::log console output?

I'm trying to add colored log output for boost::log under linux. I read the following and I tried this: #define MY_LOG_ERROR() BOOST_LOG_TRIVIAL(error) << "\033[1;31" MY_LOG_ERROR() << "This is an error log." but it gives me the result…
bobeff
  • 3,543
  • 3
  • 34
  • 62
7
votes
1 answer

Boost.log: How to prevent the output will be duplicated to all added streams when it uses the add_file_log() function?

I use the add_file_log() function to initialize a logging sink that stores log records into a text file. When I define several sinks, I have observed: a file is created for each sink. the output is copied to all files. This is my logger: class…
Juan Solo
  • 359
  • 1
  • 5
  • 17
7
votes
1 answer

Overloading << Operator for Boost Logging Object

So I want to use Boost.Log for all my logging purposes. I currently wrote a class that encompasses all the required operations of instantiating and setting up helper methods. Problem is that I want to overload the << operator to use it in a cout…
bge0
  • 901
  • 2
  • 10
  • 25
6
votes
1 answer

Boost.Log vs. Boost.Log v2

I am currently evaluating some log frameworks for unmanaged C++. My question is: what is the difference between Boost.Log and Boost.Log v2? Is the Api is different? Is it safe to use Boost.Log v2 in a project or should I stick with Boost.Log…
cprogrammer
  • 5,503
  • 3
  • 36
  • 56
6
votes
1 answer

How to output TimeStamp and ThreadID attributes with custom boost::log formatter?

I'm using custom boost::log formatter for color coding the output log message, but I'm failing to find the proper way to add TimeStamp and ThreadID attributes to the log. When I'm using file logging I just write keywords::format = "[%TimeStamp%]…
bobeff
  • 3,543
  • 3
  • 34
  • 62
6
votes
1 answer

Get severity of boost.log logger..?

Suppose I have a simple boost.log severity_logger logger set up like this: logging::core::get()->set_filter(logging::trivial::severity >= logging::trivial::debug); logging::add_common_attributes(); src::severity_logger<…
cacau
  • 3,606
  • 3
  • 21
  • 42
6
votes
2 answers

How can I manually flush a boost log?

I'm playing with Boost.Log in boost 1.54.0 to see if it is a viable option for my application. In general, I don't have a problem with the buffering, so I'm not looking to turn on auto_flush or anything... but I noticed that messages that are logged…
Dave Lillethun
  • 2,978
  • 3
  • 20
  • 24
5
votes
1 answer

Boost logging - destinations and formatters

I am having a problem with using Boost Logging library, that if I add a formatter or a destination to a logger, using my own Log class, I cannot change that destination or formatter. Does anybody know how to change the destination or formatter on a…
Tony The Lion
  • 61,704
  • 67
  • 242
  • 415
5
votes
2 answers

Yocto 1.6 no libboost_log in toolchain

I've installed Yocto 1.6 and run the bitbake to set up the toolchain, following the tutorial written by Daiane Angolini. While I see most of the boost libraries under $SDKTARGETSYSROOT/usr/lib, there seems to be no libboost_log.a nor…
Theanderblast
  • 191
  • 1
  • 5
5
votes
1 answer

Simultaneous Logging to Console and File using Boost

I need help to initialize the boost logging framework to simultaneously log to both a named log file and also the console - (the named log file will not require periodic rotation or any of that fancy setup per many of the boost tutorials). The…
johnco3
  • 2,401
  • 4
  • 35
  • 67
4
votes
1 answer

C++ Boost Logging: how to zip logs?

I need to zip logs, produced by Boost Logging library. I see 2 approaches: Compress logs on the fly to BZip or GZip - preferably Compress logs when rotating (make copy of log and zip it). How do I implement this?
Heavy
  • 1,861
  • 14
  • 25
3
votes
2 answers

How to query boost::log severity?

I'm using trivial logging of boost::log library and I want to execute some code depending on currently set logger severity. This is needed for constructing of log message only if it will be outputted. But I cannot find the right way for querying…
bobeff
  • 3,543
  • 3
  • 34
  • 62
3
votes
1 answer

How to set open_mode for a boost sink (non global) to append

Currently I'm using sinks for writing data to log files and standard otput. Unfortunately if I restart my application the sink will not append the new entries to the log file. It overrides the existing data. My Code is the following: using…
little_planet
  • 1,005
  • 1
  • 16
  • 35
1
2 3 4