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. Advertising

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:
    24,856
    Roedy Green
    Jan 19, 2006
  2. WeAreBorg

    timer with millisecond precision

    WeAreBorg, Sep 29, 2005, in forum: C Programming
    Replies:
    2
    Views:
    385
    Skarmander
    Sep 29, 2005
  3. etantonio
    Replies:
    1
    Views:
    422
    John B. Matthews
    Mar 16, 2009
  4. Warren

    Millisecond in time.

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

Share This Page