Boost logo

Boost Users :

Subject: Re: [Boost-users] Handling process termination
From: Leon Mlakar (leon_at_[hidden])
Date: 2016-06-10 09:01:50


On 10.06.2016 06:44, Shaginesh P.K.(NeSTIT) wrote:
>
> Hi All,
>
> I am using boost library for logger. Seems pretty good.
>
> Am using boost with *asynchronous sink*. Hence require a *close down
> of sink explicitly*. But this is not possible when process crashes.
>
Since when the process crashes everything within it goes away it's
inherent to asynchronous sinks to have potential to loose some of the
most recent logs. I don't see anything that could be done about it.

The only way I can imagine to ensure that logs are guaranteed not to get
lost is to use synchronous sink with some fast custom backend. Your
backend could, for instance, forward logs via shared memory to some
other process that actually does the writing to whichever persistent
storage you choose to write to.

But as far as I know there are no such off-the-shelf backends offered in
Boost.Log.

Cheers,

Leon

> Do boost have any mechanism for the same (Like handling the signals of
> OS and like stack dumps)?
>
> What does boost prefer for unexpected termination of process where the
> logs will go out uncollected?
>
> Could you please help me out of this?
>
> Thanks and Regards
>
> Shaginesh PK
>
> ------------------------------------------------------------------------
>
> *Confidentiality Statement / Disclaimer* : This message and any
> attachments is intended for the sole use of the intended recipient. It
> may contain confidential information. Any unauthorized use,
> dissemination or modification is strictly prohibited. If you are not
> the intended recipient, please notify the sender immediately then
> delete it from all your systems, and do not copy, use or print.
> Internet communications are not secure and it is the responsibility of
> the recipient to make sure that it is virus/malicious code exempt.
>
> The company/sender cannot be responsible for any unauthorized
> alterations or modifications made to the contents. If you require any
> form of confirmation of the contents, please contact the
> company/sender. The company/sender is not liable for any errors or
> omissions in the content of this message.
>
> ------------------------------------------------------------------------
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users



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