Skip to content

Commit

Permalink
Merge #60: option to log using GMT/UTC instead of local time
Browse files Browse the repository at this point in the history
66443ed option to log using GMT/UTC instead of local time (Emanuele Cisbani)

Pull request description:

Tree-SHA512: e0c1c28fc8b416ccaef7b89a2bf0b4bb82083189cd12d2a99c151a07a1f582a543cfd341010584a163f4dfb1cdefec9ec971fa1ea2491a5cac61bdfef17dad95
  • Loading branch information
petertodd committed Sep 10, 2019
2 parents d86cfe3 + 66443ed commit 56ad5d0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions otsd
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import os
import queue
import sys
import threading
import time

import bitcoin
import bitcoin.core
Expand Down Expand Up @@ -48,6 +49,9 @@ parser.add_argument("--debug-file-backup-count", type=int,
dest='debug_file_backup_count',
default=10,
help="Number of debug log file backups (default: %(default)d bytes) ")
parser.add_argument("--debug-file-gmtime", action="store_true",
dest='debug_file_gmtime',
help="Use GMT/UTC time instead of local time in debug log file")

parser.add_argument("--rpc-port", type=int,
default=14788,
Expand Down Expand Up @@ -101,6 +105,9 @@ logger.addHandler(handler)
ch = logging.StreamHandler(sys.stdout)
logger.addHandler(ch)

if args.debug_file_gmtime:
logging.Formatter.converter = time.gmtime

args.verbosity = args.verbose - args.quiet

if args.verbosity == 0:
Expand Down

0 comments on commit 56ad5d0

Please sign in to comment.