Questions tagged [boost-log]

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

336 questions
0
votes
1 answer

boost.log std::exception formatter unable to find operator<< overload in own namespace

I have created a simple formatter for boost.log like shown in this example for std::exception. Now if i want to use the overloaded operator, which is defined in my own namespace, log is unable to find the overload. Some code: namespace my_space…
user1810087
  • 5,146
  • 1
  • 41
  • 76
0
votes
1 answer

Boost add_console_log yields invalid operands to binary expression error

I have the following simple setup: #include #include #include #include namespace…
Iulian
  • 1,496
  • 2
  • 15
  • 35
0
votes
0 answers

limiting size of boost logs not working

typedef sinks::asynchronous_sink AsyncProjecteLogWritter; sink_3 = boost::make_shared( keywords::file_name="projectlog", keywords::rotation_size=1024*5, …
ganesh
  • 171
  • 1
  • 2
  • 13
0
votes
1 answer

Boost Log: Interaction of log settings file and code configuration

I have a nice format and a console log: auto fmtStream = expressions::stream << "LineID: " << expressions::attr("LineID") << " " << "Message: " << expressions::message: boost::log::add_console_log(std::cout, keywords::format =…
Horus
  • 617
  • 7
  • 10
0
votes
1 answer

Boost Log Time Zone

I've been learning the Boost Log library http://www.boost.org/doc/libs/develop/libs/log/doc/html/index.html but I've been unable to figure out how to display the user's time zone. There is a %q and %Q format option that looks promising but doesn't…
Mitch
  • 1,716
  • 3
  • 25
  • 41
0
votes
1 answer

boost::log save message in container and then send all messages to backend

I want to save actual formatted message in memory with something like memory_sink and then on flush send messages in backend. But there is a problem, that attributes of saved record_view are changed to the attributes of the last created record_view,…
ForEveR
  • 55,233
  • 2
  • 119
  • 133
0
votes
2 answers

boost logging channel filtering in shared libraries not working as expected on linux

I have an executable for both Linux and Windows with three dlls/shared libraries, and I'm using boost.log for logging. I wish to have a separate, file log for each module. My approach was to create a severity_channel_logger_mt for each module,…
nostep
  • 35
  • 6
0
votes
1 answer

C++ Boost libraries

I'm using boost log: How to change (configure) severity level for logging during RUNTIME.
0
votes
2 answers

Resolve ambiguousness of a base template class member

I have a hierarchy of classes and every one of them must have a particular base class. Than base class provides ability to post log records and takes in ctor name of a log channel (basically a name of a class which is using log). Lets call this…
Vasilly.Prokopyev
  • 856
  • 1
  • 10
  • 24
0
votes
1 answer

Using boost log with FastCGI

I am trying to use boost log in my FastCGI program, but looks they don't work together. When I execute the program directly, ./sample_log I can see logging messages logged into the file. When I launch the program using spawn-fcgi, sudo…
user2777473
  • 3,736
  • 5
  • 26
  • 39
0
votes
1 answer

run-time error "boost_log-vc100-mt-1_49.dll"

this may sound like a silly question, but it would be really useful if there was a way around this. I am writing a c++ code using microsoft visual which uses eigen, matlab, and ilog cplex libraries. It can be build without problem but there is a run…
mmahnam
  • 7
  • 5
0
votes
1 answer

How to provide a non-const parameter to a custom sink backend?

A sink backend expecting a non-const parameter in its constructor can't be used, as the wrapping sink frontend seems to only forward const parameters. Example: class buffering_sink_backend : public boost::log::sinks::basic_formatted_sink_backend…
keinkoenig
  • 193
  • 1
  • 12
0
votes
1 answer

Boost::log::string_literal construction issue

I'm trying unsuccessfully to use the macro BOOST_LOG_NAMED_SCOPE with no hard-coding (e.g no BOOST_LOG_NAMED_SCOPE("bla"), but BOOST_LOG_NAMED_SCOPE(some_variable); this macro uses inside a boost::log::string_literal that have no C'tor for…
o.z
  • 1,086
  • 14
  • 22
0
votes
1 answer

Boost.Log ignores overloaded stream insertion operator

I have a class that I want to appear in log in a certain way, so I've overloaded its << operator: class CWindowClassId { public: // ... friend std::wostream& operator<< (std::wostream& os, CWindowClassId const& classId); } Inserting the…
lambdas
  • 3,990
  • 2
  • 29
  • 54
0
votes
1 answer

BOOST_LOG_TRIVIAL stragne warning VS2008express

I use Visual Studio 9 (2008). When I compile this simple program: #include int main(int /*argc*/, char** /*argv*/) { BOOST_LOG_TRIVIAL(info) << "padaka"; } I get a…
user2449761
  • 1,169
  • 13
  • 25