Skip to content

Conversation

yp05327
Copy link

@yp05327 yp05327 commented Jan 24, 2025

Close: #183

Try to avoid breaking the existing config options, for providing a default useful settings for user.

Outputs:
image

Then you can config the logger in your app:

# change the global log format
logger = logging.getLogger()
# add a console handler, like what realtimestt did in the __init__
formatter = logging.Formatter(fmt="xxxxx")
console_handler = logging.StreamHandler()
console_handler.setLevel(logging.INFO)
console_handler.setFormatter(formatter)
logger.addHandler(console_handler)
# you can also output all logs from your app to a file

# you can also config the logs from realtimestt or other libs
logger = logging.getLogger("realtimestt")
# e.g. change the log level
logger.setLevel(logging.WARNING)
....

@KoljaB
Copy link
Owner

KoljaB commented Jan 26, 2025

Thanks a lot, I'll look into that soon. I have a busy week, will prob take me until weekend, thx again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to config user logging?
2 participants