Commit 235e6271 authored by Trevor Cappallo's avatar Trevor Cappallo
Browse files

improve default name

parent e961e3de
......@@ -113,7 +113,7 @@ class OperationalLogger:
##########################################################################################
def default_logging(log_file_name, log_root_dir=None, addresses=[], critical_addresses=[], from_address=None, **kwargs):
def default_logging(log_file_name=None, log_root_dir=None, addresses=[], critical_addresses=[], from_address=None, **kwargs):
"""Set an intelligent,context-dependent default logging scheme for the current script.
log_root_dir, log_file_name: log will be created as log_root_dir/log/YYYY-MM-DD/LOG_FILE_NAME.log
......@@ -137,6 +137,7 @@ def default_logging(log_file_name, log_root_dir=None, addresses=[], critical_add
logging.DEBUG, from_address=from_address, **kwargs)
logging.info('Logging output from: {}'.format(' '.join(sys.argv)))
logging.info('Log writing to: %s', os.path.join(log_directory, log_file_name + '.log'))
logging.info('Process id {}, parent process id {}'.format(os.getpid(), os.getppid()))
logging.info('-' * 60)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment