I observed that it is not printing the complete log line information when python logging module used.
Is there a option to print full log length using python logging module
I observed that it is not printing the complete log line information when python logging module used.
Is there a option to print full log length using python logging module
The OP's question is unclear, so this may be off topic, but since there are no answers here and this is the top google hit for what I thought I wanted to know...
I ended up here because I was "logging" a pandas dataframe through the logging module and it wasn't using the full terminal size. At first I thought it was the logging module that needed configuration changes for longer line length, but actually it is really just how pandas formats a dataframe when it is printed as a string.
The problem is not with the logging module having a line length limit or needing any configuration. Pandas rather has display configuration options, and you want to set those.
So if you were doing
LOG.info(df)
and wanted that to use the full terminal width, you need to do
pd.set_option('display.width', None)
somewhere ahead of time. Setting the display width to None or 0 causes pandas to autodetect the terminal size. Otherwise, set it to the integer value of your desired maximum line length. Note that all of this formatting on your screen has nothing to do with the logging module. The logging module is just receiving one really long string, and pandas has formatted it for display on a terminal, and the
LOG.info(df)
is outputting just a single log entry though it may span multiple lines.
Maybe that helps someone who ended up here the same way I did.