mirror of
https://github.com/certbot/certbot.git
synced 2026-06-05 23:04:39 -04:00
add time to the beginning of each log message
This commit is contained in:
parent
e3dbe1a60f
commit
bcf842e265
1 changed files with 2 additions and 2 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
# This daemon runs on the CA side to handle logging.
|
||||
|
||||
import redis, signal, sys
|
||||
import redis, signal, sys, time
|
||||
|
||||
r = redis.Redis()
|
||||
ps = r.pubsub()
|
||||
|
|
@ -20,7 +20,7 @@ for message in ps.listen():
|
|||
if message["type"] != "message":
|
||||
continue
|
||||
if message["channel"] == "logs":
|
||||
sys.stdout.write(message["data"] + "\n")
|
||||
sys.stdout.write(time.ctime() + " " + message["data"] + "\n")
|
||||
sys.stdout.flush()
|
||||
continue
|
||||
if message["channel"] == "exit":
|
||||
|
|
|
|||
Loading…
Reference in a new issue