Skip to content

Commit

Permalink
more logging
Browse files Browse the repository at this point in the history
  • Loading branch information
areeda committed Aug 31, 2024
1 parent da27c79 commit 1a61ded
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions omicron/cli/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,14 +495,13 @@ def create_parser(config):


def main(args=None):
omicron_config = OmicronConfig(logger=logger)

config = omicron_config.get_config()
default_env = config['conda']['environment'] if config.has_option('conda', 'environment') else None
conda_env = os.getenv('CONDA_PREFIX', default_env)
if conda_env is None:
logger.critical('Cannot determine conda environment')
exit(10)
else:
logger.debug(f'Running in {conda_env}')

parser = create_parser(config)
args = parser.parse_args(args=args)
Expand All @@ -518,6 +517,7 @@ def main(args=None):
log_file.parent.mkdir(mode=0o755, exist_ok=True, parents=True)
logger.add_file_handler(log_file)

logger.debug(f'Running: {Path(__file__)} version {__version__}')
logger.debug("Command line args:")
for arg in vars(args):
logger.debug(f' {arg} = {str(getattr(args, arg))}')
Expand Down

0 comments on commit 1a61ded

Please sign in to comment.