Hi, currently i am writeng a windows service and use the boost.log library for logfile creation. The serive should run long and I want to view the log files when the service is running. At the moment the logfile is written to the disk when the service ends and the file always has a size of 0 bytes. Is there a way to configure boost.log in a way that the log entries are written to disk immideately and that the logfile is not locked for reading by another application so that I can view my logfile? Thanks a lot, Georg
You can force flushes by configuring a sink to do so:
sink->locked_backend()->auto_flush(true);
On Mon, Jan 13, 2014 at 2:39 PM,
Hi,
currently i am writeng a windows service and use the boost.log library for logfile creation. The serive should run long and I want to view the log files when the service is running. At the moment the logfile is written to the disk when the service ends and the file always has a size of 0 bytes. Is there a way to configure boost.log in a way that the log entries are written to disk immideately and that the logfile is not locked for reading by another application so that I can view my logfile?
Thanks a lot,
Georg
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Hi!
On Mon, Jan 13, 2014 at 2:39 PM,
Hi,
currently i am writeng a windows service and use the boost.log library for logfile creation. The serive should run long and I want to view the log files when the service is running. At the moment the logfile is written to the disk when the service ends and the file always has a size of 0 bytes. Is there a way to configure boost.log in a way that the log entries are written to disk immideately and that the logfile is not locked for reading by another application so that I can view my logfile?
I think you should be using: keywords::auto_flush = true, You can see my previous question to the list, to see how I passed the config or read the tutorial. Regards, Ovanes
Hi,
thanks to all how answered me. It works fine.
Georg
Von: Boost-users [mailto:boost-users-bounces@lists.boost.org] Im Auftrag von Ovanes Markarian
Gesendet: Montag, 13. Januar 2014 15:20
An: boost-users@lists.boost.org
Betreff: Re: [Boost-users] boost.log: how to view open log files
Hi!
On Mon, Jan 13, 2014 at 2:39 PM,
participants (3)
-
Eugenio Bargiacchi
-
Georg.Kellerer@lfu.bayern.de
-
Ovanes Markarian