Closed hongbo-miao closed 3 years ago
Hi @Hongbo-Miao ,
Check out the config flags (starting with LOG_) at opal_common/config.py
(Also remember to prefix with OPAL_
when defining as env-vars)
You can see that the default log level is INFO
# - log level
LOG_LEVEL = confi.str("LOG_LEVEL", "INFO")
and so only logs equal or higher are logged, debug
is below and hence ignored.
Thanks @orweis , adding OPAL_LOG_LEVEL=DEBUG
makes logger.debug('...')
works!
I am surprised my print('...')
logs not print. I guess those logs are not shown by design.
Regarding the print - the server config is to propagate out stderr , and not stdout (you can change print of course see - https://www.systutorials.com/how-to-print-a-line-to-stderr-and-stdout-in-python/)
Oh I see, thanks for the info, @orweis !
Low key, check out loguru. It adds bloat to your project, but you have easy global controls in libraries using the configure
, enable
and disable
commands.
I saw some code in the
provider
file.I also tried to add some
However, they never got printed after I
docker compose up --build
.How can I turn on the logs? Thanks!