Log4Slack icon indicating copy to clipboard operation
Log4Slack copied to clipboard

Not sending messages if app is closed immediately

Open blmbyd opened this issue 8 years ago • 1 comments

I created simple ConsoleApp to test appender:

        static void Main(string[] args)
        {
            var message = Guid.NewGuid().ToString();

            log.Debug(message);
            log.Info(message);
            log.Warn(message);
            log.Error(message);
            log.Fatal(message);

            Console.ReadKey();
        }

When I comment ReadKey app is not sending messages.

blmbyd avatar Sep 07 '17 08:09 blmbyd

As far as I know this is by design in log4net. It is a best effort logger and if you need to be sure it has time to log everything, you should call shutdown or close before exiting

vforteli avatar Feb 11 '18 10:02 vforteli