exilon / QuickLogger

Powerful and flexible library for logging on files, console, memory, email, rest, eventlog, syslog, slack, telegram, redis, logstash, elasticsearch, influxdb, graylog, Sentry, Twilio, ide debug messages and throw events for Delphi/Firemonkey/freepascal/.NET (Windows/Linux/OSX/IOS/Android).
Apache License 2.0
381 stars 84 forks source link

Logprovider restart does not seem to work properly #110

Open 19Rustam80 opened 8 months ago

19Rustam80 commented 8 months ago

When failstorestart is reached, then TLogProviderBase.Restart is called from IncAndCheckErrors method and tries to terminate fThreadLog thread in Stop method. But IncAndCheckErrors is called from TThreadLog.Execute method resulting in deadlock( because fThreadLog.WaitFor is being called from the same thread).

MezzaC commented 8 months ago

I also have the same blocking error, after the failure to write a log using the provider the thread remains blocked in Stopping.

if not fThreadLog.Terminated then begin fThreadLog.Terminate; fThreadLog.WaitFor; end;

and crashes at "fThreadLog.WaitFor;".