Skip to content

Commit

Permalink
log only time and message to match odometer.log format from ROS2 odom…
Browse files Browse the repository at this point in the history
…eter.py
  • Loading branch information
slowrunner committed May 21, 2024
1 parent edea565 commit a3b92b9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plib/odomLog.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@

loghandler = logging.FileHandler('/home/pi/'+HOME+'/logs/odometer.log')

logformatter = logging.Formatter('%(asctime)s|[%(filename)s.%(funcName)s]%(message)s',"%Y-%m-%d %H:%M")
# logformatter = logging.Formatter('%(asctime)s|[%(filename)s.%(funcName)s]%(message)s',"%Y-%m-%d %H:%M")
logformatter = logging.Formatter('%(asctime)s|%(message)s',"%Y-%m-%d %H:%M:%S")
loghandler.setFormatter(logformatter)
logger.addHandler(loghandler)

Expand Down

0 comments on commit a3b92b9

Please sign in to comment.