The Boost C++ library for logging, focused on simplicity, extensibility and performance
Questions tagged [boost-log]
336 questions
0
votes
1 answer
Visual 2015 link error with boost log
I'm working on a source code migration from VS'2008+Boost 1.144 to VS'2015+Boost 1.61 and I got the following link error
... error LNK2019: unresolved external symbol "__declspec(dllimport) public: static void __cdecl…

alexbuisson
- 7,699
- 3
- 31
- 44
0
votes
1 answer
Visual Studio 2013 Boost-log v1_61_0 linking errors
I try to take the simple boost.asio daytime6 tutorial file , which workes great
and add boost.log simple logger , taken from the settings_file example
The code looks like this :
//
// server.cpp
// ~~~~~~~~~~
//
// Copyright (c) 2003-2015…

user63898
- 29,839
- 85
- 272
- 514
0
votes
0 answers
Error loading shared library libboost_log.so after fork/exec
I am using boost log and my child process fails to load the libboost_log.so with the below error. The strace below shows that open failed, at this point my parent process is in the process of shutting down but not yet. My child process is loading…

Satyajit Singh
- 191
- 1
- 2
- 6
0
votes
2 answers
Boost log linking error on OSX
I've been trying to compile the following example program from the boost tutorial to create a logger all morning and can't work out what I'm doing wrong:
#include
#include
#include…

Sam Perry
- 145
- 1
- 12
0
votes
1 answer
Outputting user defined structure with boost::log
I'm trying to output content of boost::asio::streambuf object with boost::log library. I defined operator<< overload in the following way:
ostream& operator<<(ostream& ostr, const boost::asio::streambuf& buffer)
{
for (size_t i = 0; i <…

bobeff
- 3,543
- 3
- 34
- 62
0
votes
1 answer
boost.log issue creating a file with a UTF8 file name
I use boost.log to create multi log file according to string value. But when the string is UTF8 coded, the file created has incorrect name (like this: è°.æ¦ç).
BOOST_LOG_SCOPED_LOGGER_ATTR(Logger::motion_checker, "RoleName",…

jean
- 2,825
- 2
- 35
- 72
0
votes
1 answer
Obtaining formatted strings from a text_file_backend
I'm using boost-log in my application. I want to both write logs to file and to send the logged strings over the network (for replication purposes).
For file-logging, I'm using a text_file_backend (together with a…

Paolo M
- 12,403
- 6
- 52
- 73
0
votes
1 answer
Boost.log create text file backend manually
Logger.h
enum ChannelType {
main_channel,
sub_channel
};
BOOST_LOG_ATTRIBUTE_KEYWORD(channel, "Channel", ChannelType)
class Logger {
public:
enum severity_level
{
debug,
info,
warning,
error,
…

jean
- 2,825
- 2
- 35
- 72
0
votes
1 answer
boost.log config log severity by config file
I want adjust severity level without recompile, so I use init_from_stream to read severity level from file. Other options I don't need change runtime, so their setting as before is done by boost.log API.
The config file…

jean
- 2,825
- 2
- 35
- 72
0
votes
1 answer
use boost.log log to multiple file
I had read boost doc. But what it described are too limit for my requirement:
My project has a main logger which used to log almost all logs, it use time_based_rotation. Also I want log some message into another file, so I can check those logs…

jean
- 2,825
- 2
- 35
- 72
0
votes
1 answer
auto flush in boost syslog sink backend (boost 1.59)
Is there any method to flush() in syslog backend. I am facing issue with boost syslog sink, after 6 log messages the 7th message is not getting logged into syslog (stays in buffer) until new log message is called.
My syslog implementation:
typedef…

SGPJ
- 25
- 7
0
votes
1 answer
make boost::log::core thread local
I use boost.log in my multi-thread project, but I don't need a thread-safe version logger because I already make codes runs in thread-safe manner.
If use non thread safe logger, I need to make the logger object be thread_local: each thread has its…

jean
- 2,825
- 2
- 35
- 72
0
votes
2 answers
Boost Logging and 'Object-like' Logging Behaviour in C++
I'm searching for a logging library in C++ for several days now, but somehow I'm not very happy with the existing solutions like boost logging or Pantheios. Originally I'm a Java Developer. I would like to have a logging library with a logger which…

little_planet
- 1,005
- 1
- 16
- 35
0
votes
1 answer
Boost.Log: How to forward a loging source
I am trying to figure out, what the best way is to use a logging source within a class. The straight forward solution, simply to define it as a member (stack) variable has the big drawback, that I have to include Boost.Log header files, which really…

Lars
- 1
- 1
0
votes
1 answer
Boost Log: Setting attribute makes log entry disappear
I have a tracer, that should log going in and out of a function:
class Tracer
{
public:
Tracer(Logger logger, std::string function, std::string file)
:
_logger(logger),
_function(function),
_file(file)
{}
~Tracer()
{
…

Horus
- 617
- 7
- 10