logging time format millisecond precision

Discussion in 'Python' started by Alex van der Spek, Jul 19, 2012.

  1. 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
     
    Alex van der Spek, Jul 19, 2012
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. palmis

    UTC time in millisecond

    palmis, Jan 10, 2006, in forum: Java
    Replies:
    26
    Views:
    25,559
    Roedy Green
    Jan 19, 2006
  2. Macgyver

    millisecond delay in C - linux

    Macgyver, Jan 7, 2004, in forum: C Programming
    Replies:
    8
    Views:
    3,129
    August Derleth
    Jan 7, 2004
  3. flamesrock
    Replies:
    8
    Views:
    818
    Hendrik van Rooyen
    Nov 24, 2006
  4. WeAreBorg

    timer with millisecond precision

    WeAreBorg, Sep 29, 2005, in forum: C Programming
    Replies:
    2
    Views:
    477
    Skarmander
    Sep 29, 2005
  5. Summu82
    Replies:
    5
    Views:
    1,139
    Richard Heathfield
    Jun 7, 2006
  6. etantonio
    Replies:
    1
    Views:
    548
    John B. Matthews
    Mar 16, 2009
  7. Warren

    Millisecond in time.

    Warren, Jul 1, 2003, in forum: Ruby
    Replies:
    11
    Views:
    514
    Harry Ohlsen
    Jul 2, 2003
  8. Alex van der Spek
    Replies:
    2
    Views:
    458
    David Bolen
    Jul 20, 2012
Loading...