You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
print"problem converting %s for %s: %s"% (ecf, output_metadata['bibcode'], err)
With the logging mechanism, we will be able to set it up to log to the screen and to a file, as well as the format (e.g., JSON format so that our logging infrastructure can properly capture the fields). The python logging package allows multiple levels of logging, what we usually use:
debug - We usually setup logging to print only messages up to INFO level, so the debug statements are omitted in normal operations. These are only use for debugging purposes, and it is only on those moments that we change the default level to DEBUG.
exception - To be used inside except so that it automatically prints the exception details without needing any argument other than the log message.
In other places we use pipeline's setup_logging and microservice's setup_logging utils to configure the logger. We could have something similar here too.
The text was updated successfully, but these errors were encountered:
To issue log messages, it would be more convenient to use the logging mechanism, such as:
adsabs-pyingest/pyingest/extractors/grobid/process_pdf.py
Lines 81 to 87 in 185b41f
Instead of direct print statements, such as:
adsabs-pyingest/pyingest/config/config.py
Lines 146 to 151 in 185b41f
or:
adsabs-pyingest/pyingest/parsers/aip.py
Lines 139 to 145 in 185b41f
With the logging mechanism, we will be able to set it up to log to the screen and to a file, as well as the format (e.g., JSON format so that our logging infrastructure can properly capture the fields). The python logging package allows multiple levels of logging, what we usually use:
INFO
level, so the debug statements are omitted in normal operations. These are only use for debugging purposes, and it is only on those moments that we change the default level toDEBUG
.except
so that it automatically prints the exception details without needing any argument other than the log message.In other places we use pipeline's setup_logging and microservice's setup_logging utils to configure the logger. We could have something similar here too.
The text was updated successfully, but these errors were encountered: