logging output

Sharan Basappa sharan.basappa at gmail.com
Fri Oct 19 11:05:28 EDT 2018


I am loading a csv file using Pandas and then logging it back into another file using logging module.

Here is one sample line from input file:
- 1117838570 2005.06.03 R02-M1-N0-C:J12-U11 2005-06-03-15.42.50.675872 R02-M1-N0-C:J12-U11 RAS KERNEL INFO instruction cache parity error corrected

Here the sample line from logging output
0   - 1117838570 2005.06.03 R02-M1-N0-C:J12-U11 20...

The lines seems to be same but logging module seems to be cutting down additional columns towards the end (see "..." characters).

Am I missing something?

below is the full code listing:

import sys
import pandas as pd
import numpy as np
import logging

#Create and configure logger
logging.basicConfig(filename="debug.log", filemode='w', format='%(asctime)s %(message)s')
logger = logging.getLogger()
logger.setLevel(logging.DEBUG) 

data_df = pd.read_csv("BGL_MERGED.log", nrows=100, header=None, delimiter=r'\s"')
#data_df = pd.read_csv("BGL_MERGED.log")
logger.debug("data frame %s \n", data_df)



More information about the Python-list mailing list