Python - asynchronous logging -




i need log plenty of data while running system code. logging packages can use have efficient, asynchronous logging? standard python logging package (https://docs.python.org/2/library/logging.html) asynchronous default?

you can execute logging.info() message using pool of n worker, uing concurrent.futures.threadpoolexecutor, n should equals 1 :

import concurrent.futures  import logging  executor = concurrent.futures.threadpoolexecutor(max_workers=1)   def info(self, msg, *args):     executor.submit(logging.info, msg, *args) 




wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -