The Boost C++ library for logging, focused on simplicity, extensibility and performance
Questions tagged [boost-log]
336 questions
0
votes
2 answers
how to make modifier for a multiindex of struct having shared pointer to boost logger backend to reset this back end?
I am trying to modify multiindex of structs ,struct has member which is shared pointer to boost logger shared pointer of backend ,frontend and logger.
By nature of multiindex each struct is considered const when making iterator .
So when i take…

ahmed allam
- 377
- 2
- 15
0
votes
1 answer
Boost::log crashs only in debian
This code bellow works fine on ubuntu/suse/redhat... but it crashs on debian, it is doing free on an invalid pointer
uname -a": Linux DEV20V 4.9.0-7-amd64 #1 SMP Debian 4.9.110-3+deb9u2 (2018-08-13) x86_64 GNU/Linux
GLIBC: Debian GLIBC…

Bruno Romano
- 303
- 2
- 10
0
votes
1 answer
how to write log into formatted folders using Boost.Log?
Boost.Log supports configurable file name, e.g. %Y_%m_%d_sample_%N.log. What I want is put them in different folders, say, "%Y_%m_%d/sample_%N.log", but it created a folder named "%Y_%m_%d", while I'm expecting "2011_05_02"(for the date I'm trying),…

JQ.
- 678
- 7
- 17
0
votes
0 answers
Boost log: Attributes vs. add_value
We are using boost log and want to add information about filename and line number to the logging records, similar to this question: boost log to print source code file name and line number. That is not a problem in itself, but there seems to be two…

ssaue
- 1
- 1
0
votes
1 answer
Boost Log severity level output in upper case
I try to setup a logger with Boost Log V2. The output should look like (file blubb.log):
2019-08-24 23:24:08 - ERROR: Hi from source code.
I'm currently struggling with the uppercase of the severity level. The rest works so far.
severity level…

musv76
- 1
0
votes
1 answer
How to cooperate boost.log and ostream?
I am using boost.log as my logging components.
It is really wonderful!
But boost.log has a lot of header to be included before working.
So I encapsulate boost.log.
Here the problem comes.
We define a class.
class Point2D
{
public:
friend…

Laine
- 179
- 1
- 8
0
votes
1 answer
Boost.log V1 Compilation Error
Experiencing difficulty in compiling boost.log v1 in my code, though I know that the issue is due to boost.filesystem v3 lack of support. I know I need to #define BOOST_FILESYSTEM_VERSION 2 but where should I define it?
The compilation error:
error:…

freonix
- 1,605
- 3
- 22
- 35
0
votes
1 answer
How to make sure that all Boost .dll & .lib files are included with build?
In Visual Studio 2017, I'm able to build and run C++ project that includes Boost v1.69.0 as pre-build binaries for VS.
However, now I want to distribute release copy of my project that includes all the necessary .dll &.lib files. How to make sure…

newprint
- 6,936
- 13
- 67
- 109
0
votes
1 answer
Boost Log rotation filename pattern integer never restarted
I'm trying to make a logging system that stores the three previous logs in a directory "stored" and the current one. I'm using the pattern filename_%2N. Everything is working fine, but testing it, the filename integer is never restarted, so after…

opernas
- 154
- 1
- 10
0
votes
1 answer
How to use loggers of boost.log?
Try basic boost.log example but failed
I am integrating Boost.log v2 into my project.
The platform is windows 10 with vs2017.
The program is compiled target x64.
#include
#include
#include…

Laine
- 179
- 1
- 8
0
votes
1 answer
How to keep the latest log file name at first index (e.g. logtrail01.txt), with Boost V2 1.70 logging library?
I'm introducing a replacement to the natively written logging framework of my application. The existing logging is written in a fashion to generate the files such that the file being currently written to is named "logs.txt" and the rolled over files…

Ramakant
- 43
- 5
0
votes
1 answer
Boost Log Setting Rotation and Max File Size Results in 2nd Sink Being Added, when Remove_All_Sinks() is called prior
Using Boost log for logging purposes (duh) - and I am successful in initialization:
BOOST_LOG_GLOBAL_LOGGER_INIT(logger, logger_t) {
logger_t lg;
logging::add_common_attributes();
boost::shared_ptr< file_sink > sink(new file_sink(
…

Dash
- 306
- 1
- 3
- 16
0
votes
1 answer
Boost.Log - Log messages are unexpectedly filtered out
I am trying to create filter by configurable severity level. I have written following filter class:
class FilterBySeverity
{
public:
FilterBySeverity(boost::log::trivial::severity_level logLevel) :
m_logLevel(logLevel),
…

ivan.ukr
- 2,853
- 1
- 23
- 41
0
votes
1 answer
Passing functon object as filter when initializing boost log sink
I am creating new sink like in this example:
void init()
{
logging::add_file_log
(
keywords::file_name = "sample_%N.log",
keywords::rotation_size = 10 * 1024 * 1024,
keywords::time_based_rotation =…

ivan.ukr
- 2,853
- 1
- 23
- 41
0
votes
1 answer
Error compiling code for creating boost.log format
I am trying to compile following code with gcc 7.3.0 on Ubuntu 18.04 LTS with option -std=c++14:
auto createLogFormatter()
{
boost::log::expressions::stream_type stream;
stream <<…

ivan.ukr
- 2,853
- 1
- 23
- 41