def start_logging(self): logFormatter = logging.Formatter( ('%(asctime)s [%(levelname)-5.5s] {} - %(message)s'.format( self.name))) fileHandler = logging.FileHandler( self.logdirname + '/{}'.format(self.logfilename)) fileHandler.setFormatter(logFormatter) get_log().addHandler(fileHandler)
from builtins import * # noqa: F401 import sys from twisted.internet import reactor import os import pprint from twisted.python.log import startLogging from jmclient import Taker, load_program_config, get_schedule,\ JMClientProtocolFactory, start_reactor, jm_single, get_wallet_path,\ open_test_wallet_maybe, sync_wallet, get_tumble_schedule,\ RegtestBitcoinCoreInterface, schedule_to_text, restart_waiter,\ get_tumble_log, tumbler_taker_finished_update,\ tumbler_filter_orders_callback from jmbase.support import get_log from cli_options import get_tumbler_parser, get_max_cj_fee_values log = get_log() logsdir = os.path.join(os.path.dirname(jm_single().config_location), "logs") def main(): tumble_log = get_tumble_log(logsdir) (options, args) = get_tumbler_parser().parse_args() options_org = options options = vars(options) if len(args) < 1: print('Error: Needs a wallet file') sys.exit(0) load_program_config() #Load the wallet wallet_name = args[0]