Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > logging time format millisecond precision

Reply
Thread Tools

logging time format millisecond precision

 
 
Alex van der Spek
Guest
Posts: n/a
 
      07-19-2012
I use this formatter in logging:

formatter = logging.Formatter(fmt='%(asctime)s \t %(name)s \t %(levelname)s
\t %(message)s')

Sample output:

2012-07-19 21:34:58,382 root INFO Removed - C:\Users\ZDoor\Documents

The time stamp has millisecond precision but the decimal separator is a
comma.

Can I change the comma (,) into a period (.) and if so how?

Thanks in advance,
Alex van der Spek

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
logging time format millisecond precision decimalsign Alex van der Spek Python 2 07-20-2012 06:50 PM
How to store as absolute an org.jfree.data.time.Millisecond etantonio Java 1 03-16-2009 02:07 PM
UTC time in millisecond palmis Java 26 01-19-2006 07:38 AM
timer with millisecond precision WeAreBorg C Programming 2 09-29-2005 12:27 AM
Millisecond in time. Warren Ruby 11 07-02-2003 09:50 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57