Polish logging a bit more.
This commit is contained in:
parent
c62edf9471
commit
08d66a9c01
|
@ -3,7 +3,6 @@
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
import time
|
|
||||||
import logging
|
import logging
|
||||||
import argparse
|
import argparse
|
||||||
import subprocess
|
import subprocess
|
||||||
|
@ -236,11 +235,10 @@ def _patch_build_defs(release, path, pattern):
|
||||||
|
|
||||||
|
|
||||||
def initialize_logging():
|
def initialize_logging():
|
||||||
TIME_FMT = '%Y-%m-%dT%H:%M:%S'
|
logname = './zcash-make-release.log'
|
||||||
logname = './zcash-make-release.{}.log'.format(time.strftime(TIME_FMT))
|
|
||||||
fmtr = logging.Formatter(
|
fmtr = logging.Formatter(
|
||||||
'%(asctime)s L%(lineno)-4d %(levelname)-5s | %(message)s',
|
'%(asctime)s L%(lineno)-4d %(levelname)-5s | %(message)s',
|
||||||
TIME_FMT,
|
'%Y-%m-%d %H:%M:%S'
|
||||||
)
|
)
|
||||||
|
|
||||||
hout = logging.StreamHandler(sys.stdout)
|
hout = logging.StreamHandler(sys.stdout)
|
||||||
|
@ -255,7 +253,7 @@ def initialize_logging():
|
||||||
root.setLevel(logging.DEBUG)
|
root.setLevel(logging.DEBUG)
|
||||||
root.addHandler(hout)
|
root.addHandler(hout)
|
||||||
root.addHandler(hpath)
|
root.addHandler(hpath)
|
||||||
logging.info('zcash make-release.py logging to: %r', logname)
|
logging.info('zcash make-release.py debug log: %r', logname)
|
||||||
|
|
||||||
|
|
||||||
def sh_out(*args):
|
def sh_out(*args):
|
||||||
|
|
Loading…
Reference in New Issue