Open viniarck opened 9 months ago
To quote from cpython std lib QueueListener.stop() method:
QueueListener.stop()
Stop the listener.
This asks the thread to terminate, and then waits for it to do so. Note that if you don't call this before your application exits, there may be some records still left on the queue, which won't be processed.
So, when QueueLogger is used, ideally, we want it also fully stopped in the main thread https://github.com/kytos-ng/kytos/blob/master/kytos/core/kytosd.py#L153-L159 that's also managing the event loop.
QueueLogger
I've seen cases where we might lose a message in the log depending how early an exception happens https://github.com/kytos-ng/kytos/pull/414#discussion_r1337589796, for now we've using a print statement to be safe too to at least have it in the stdout.
print
To quote from cpython std lib
QueueListener.stop()
method:So, when
QueueLogger
is used, ideally, we want it also fully stopped in the main thread https://github.com/kytos-ng/kytos/blob/master/kytos/core/kytosd.py#L153-L159 that's also managing the event loop.I've seen cases where we might lose a message in the log depending how early an exception happens https://github.com/kytos-ng/kytos/pull/414#discussion_r1337589796, for now we've using a
print
statement to be safe too to at least have it in the stdout.