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
2
votes
0 answers

Boost 1.73 log library regression

I recently upgraded from Boost 1.72 to 1.73. For some reason the boost::log library seems to have some regression and I cannot find a solution from looking over the source code and investigating example program deltas from the previous version…
johnco3
  • 2,401
  • 4
  • 35
  • 67
2
votes
2 answers

using per class boost::log::sources::logger from const member function

I want a log source per class like the basic_logger example from the docs This works but I get a compiler error complaining about the constness when logging something from a const member function like so: #include…
rve
  • 5,897
  • 3
  • 40
  • 64
2
votes
1 answer

boost::log is it possible rotate file every time applicaion run?

Let's consider example from boost::log doc. void init() { logging::add_file_log ( keywords::file_name = "sample_%N.log", keywords::rotation_size = 10 * 1024 * 1024, keywords::open_mode = (std::ios::out |…
Viktor
  • 1,004
  • 1
  • 10
  • 16
1
vote
1 answer

C++ Boost Log: How to use configuration file to rotate and zip logs?

I need to use Boost Logging library to rotate logs and zip the rotated logs, and I want to define it in a configuration file like in here: # Logging core settings section. May be omitted if no parameters specified within…
dgolan
  • 13
  • 2
1
vote
0 answers

boost.log - A good example of multithreaded writing on a single sink

Assume there is only a single sink (for example a file) and couple of threads are writing their logs on that. I've searched a lot but unfortunately could not find a good example. I've tried multiple channels per threads and got crash. #include…
7eRoM
  • 443
  • 4
  • 14
1
vote
1 answer

exception of boostlog when date changed to next day

I use boost log by this config. [Sinks.2] Filter="%Severity% >= 2" Destination=TextFile AutoFlush=true Format="[%TimeStamp%] [%ThreadID%] <%Severity%> %Message%" Asynchronous=false Target="logs" …
ben
  • 59
  • 5
1
vote
1 answer

How can I prevent the memory from growing by using the boost log?

Running the sample code of boost log in this link will continue to increase memory usage. I think it is a memory leak. boost lib version : 1.64.0 This is the piece of code I'm checking more carefully /* * Copyright Andrey Semashev 2007 -…
Paul.Kim
  • 11
  • 3
1
vote
1 answer

boost log severity empty in the log message

i am setting the formatter for log records, the severity field is printing empty in the final log message. The code compiles fine but not working as expected. please advise. The documentation on the boost log is very cryptic and unclear. auto logFmt…
Ravikumar Tulugu
  • 1,702
  • 2
  • 18
  • 40
1
vote
0 answers

Determine whether a Boost.Log sink exists

In my project I open a boost::log xml sink in a library and in the main application with different file names. The library launches its own log because it sometimes runs standalone. So, as expected, the main application log receives every log…
Ben
  • 65
  • 1
  • 5
1
vote
4 answers

My program doesn't support thread safe logging while using boost library

I am currently creating a class that should be used for logging purpose. But here one problem , it doesn't support thread synchronization. There is no problem when I run one by one thread. But there is problem while I run two or more threads at a…
1
vote
2 answers

How to expose and register one boost log core to another

A dll and an executable both use boost::log. They end up using different singleton log cores. How can I expose the dll core to the executable and register the dll-core to the exe-core so that I can redirect both into one logfile. I wrote a minimal…
Johannes
  • 6,490
  • 10
  • 59
  • 108
1
vote
2 answers

Boost log doesn't write to file, how to?

here is my code: #include #include #include #include #include #include…
cnd
  • 32,616
  • 62
  • 183
  • 313
1
vote
1 answer

boost.log v2, how to get the current log file name

I'm updating a C++ class wrapping the boost logger to use a recent boost version with the logger v2 API. Most of the work have been done, but with the logger v1 we used an API to get the current log file name and path like in the example…
alexbuisson
  • 7,699
  • 3
  • 31
  • 44
1
vote
1 answer

Boost set_filter is not working

I'm learning Boost. Following a tutorial, I try to set a filter on a sink by sending a reference to the method onlyWarnings. Brief: sink->set_filter(&onlyWarnings); In onlyWarnings: set["Severity"].extract() // is always 0 I'm obviously…
Patricia
  • 5,019
  • 14
  • 72
  • 152
1
vote
1 answer

boost::log (boost logging): BOOST_LOG_FUNCTION only works in main thread

Consider the following function: void thread() { BOOST_LOG_FUNCTION(); while(true) { // Create log entry } } If I just call "thread()" within "main" my log entries created in "thread()" look as expected: [void __cdecl…
Anonymous
  • 4,617
  • 9
  • 48
  • 61