drop timestamp from log format

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2020-06-17 23:18:27 +02:00
parent 8ea68af34b
commit b0a69d300b
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
2 changed files with 3 additions and 3 deletions

2
log.py
View File

@ -1,7 +1,7 @@
import logging
def setup_custom_logger(name, level='INFO'):
formatter = logging.Formatter(fmt='%(asctime)s - %(levelname)s - %(message)s')
formatter = logging.Formatter(fmt='%(levelname)-7s - %(message)s')
handler = logging.StreamHandler()
handler.setFormatter(formatter)

View File

@ -30,7 +30,7 @@ def parse_opts():
help='Sticker Pack contract address.')
parser.add_option('-a', '--abi-file', default='./abi.json',
help='JSON file with Contract ABI specification.')
parser.add_option('-I', '--log-level', default='INFO',
parser.add_option('-l', '--log-level', default='INFO',
help='Level of logging.')
return parser.parse_args()
@ -39,7 +39,7 @@ def parse_opts():
def main():
(opts, args) = parse_opts()
LOG = setup_custom_logger('root', opts.log_level)
LOG = setup_custom_logger('root', opts.log_level.upper())
LOG.info('Connecting to Geth RPC: %s', opts.geth_addr)
# web3 instance for talking to Geth RPC