Boost logo

Boost Users :

Subject: [Boost-users] Problem with boost.log in a multithread application
From: Rajalakshmi Iyer (raj_at_[hidden])
Date: 2015-07-16 21:37:13


Hello,

I am using Boost.Log to produce 2 logs for a multi-thread application.

There are 2 singleton channel_mt loggers corresponding to 2 files.

Several threads continuously write different messages to the two loggers.

Log file rotation is enabled on both loggers and in the event of rotation,
the logs are collected into a different folder.

All of this works as expected for a while, except randomly (but surely at
some point) - I start seeing a stream of messages like -

[2015-Jul-17 01:11:26.532653] (info): *** Exception:
boost::filesystem::last_write_time: No such file or directory:
"/var/infinity/rtb/auction_log"

[2015-Jul-17 01:11:26.532896] (info): Boost Exception -
libs/log/src/text_file_backend.cpp(1160): Throw in function void
boost::log::v2_mt_posix::sinks::text_file_backend::consume(const
boost::log::v2_mt_posix::record_view&, const string_type&)

This goes on for a while and then my application hangs.

It is not entirely clear whether this incidence happens only during size
based rotation or even otherwise.

Any pointers on how to approach this issue would be greatly appreciated.

Thanks

Raj

-- 
This email and any attachments to it may be confidential and are 
intended solely for the use of the individual to whom it is addressed. Any 
views or opinions expressed are solely those of the author and do not 
necessarily represent those of BlisMedia Ltd, a company registered in 
England and Wales with registered number 06455773. Its registered office is 
3rd Floor, 101 New Cavendish St, London, W1W 6XH, United Kingdom.
If you are not the intended recipient of this email, you must neither take 
any action based upon its contents, nor copy or show it to anyone. Please 
contact the sender if you believe you have received this email in error.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net