Add millisecond granularity using datetime during output
This commit is contained in:
parent
37e81524c4
commit
50f34810bc
|
@ -20,7 +20,7 @@
|
||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
import os, sys, socket, time, libvirt, kazoo.client, threading, fencenode, ansiiprint
|
import os, sys, socket, time, datetime, libvirt, kazoo.client, threading, fencenode, ansiiprint
|
||||||
|
|
||||||
# ANSII colours for output
|
# ANSII colours for output
|
||||||
def red():
|
def red():
|
||||||
|
@ -41,7 +41,7 @@ def end():
|
||||||
# Print function
|
# Print function
|
||||||
def echo(message, prefix, state):
|
def echo(message, prefix, state):
|
||||||
# Get the date
|
# Get the date
|
||||||
date = '{} - '.format(time.strftime('%Y/%m/%d %H:%M:%S'))
|
date = '{} - '.format(datetime.datetime.now().strftime('%Y/%m/%d %H:%M:%S.%f'))
|
||||||
endc = end()
|
endc = end()
|
||||||
|
|
||||||
# Continuation
|
# Continuation
|
||||||
|
|
Loading…
Reference in New Issue