Shorten time format in ui and log.

2024-05-20_merge
tecnovert 1 year ago
parent 0be5a4fca7
commit 9efb244952
No known key found for this signature in database
GPG Key ID: 8ED6D8750C4E3F93
  1. 4
      basicswap/base.py
  2. 1
      basicswap/interface/btc.py
  3. 2
      basicswap/util/__init__.py

@ -76,10 +76,10 @@ class BaseApp:
# Remove any existing handlers
self.log.handlers = []
formatter = logging.Formatter('%(asctime)s %(levelname)s : %(message)s')
formatter = logging.Formatter('%(asctime)s %(levelname)s : %(message)s', '%Y-%m-%d %H:%M:%S')
stream_stdout = logging.StreamHandler()
if self.log_name != 'BasicSwap':
stream_stdout.setFormatter(logging.Formatter('%(asctime)s %(name)s %(levelname)s : %(message)s'))
stream_stdout.setFormatter(logging.Formatter('%(asctime)s %(name)s %(levelname)s : %(message)s', '%Y-%m-%d %H:%M:%S'))
else:
stream_stdout.setFormatter(formatter)
stream_fp = logging.StreamHandler(self.fp)

@ -366,6 +366,7 @@ class BTCInterface(CoinInterface):
return override_feerate, 'override_feerate'
min_relay_fee = chain_client_settings.get('min_relay_fee', None)
def try_get_fee_rate(self, conf_target):
try:
fee_rate = self.rpc_callback('estimatesmartfee', [conf_target])['feerate']

@ -181,7 +181,7 @@ def format_timestamp(value: int, with_seconds: bool = False) -> str:
str_format = '%Y-%m-%d %H:%M'
if with_seconds:
str_format += ':%S'
str_format += ' %Z'
str_format += ' %z'
return time.strftime(str_format, time.localtime(value))

Loading…
Cancel
Save