drop timestamp from log format
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
8ea68af34b
commit
b0a69d300b
2
log.py
2
log.py
|
@ -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)
|
||||
|
|
4
main.py
4
main.py
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue