Skip to content

Conversation

@timothy-nunn
Copy link
Collaborator

Writes an additional logfile in the PROCESS working directory (where the input file is) that follows the name of the input file:

  • my.IN.DAT produces a my.process.log
  • my_IN.DAT produces a my_process.log
image

This does not remove the old process.log file which is created in the terminal working directory.

@timothy-nunn timothy-nunn linked an issue Jan 8, 2026 that may be closed by this pull request
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 46.32%. Comparing base (8a4d67c) to head (b2c7b51).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4035      +/-   ##
==========================================
+ Coverage   46.30%   46.32%   +0.01%     
==========================================
  Files         123      123              
  Lines       28961    28968       +7     
==========================================
+ Hits        13411    13418       +7     
  Misses      15550    15550              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@je-cook je-cook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After thinking about what I said yesterday I agree with this change.

I think it would also be good to change the default file handler to append mode so you don't overwrite the log file.
change L727 to:
logging_file_handler = logging.FileHandler("process.log", mode="a")

alternatively you could rotate the logs somehow but that is more complex and possibly overkill (You could do a symlink process.log to a timed and dated filename)

# Store namespace object of the args

wkdir_path_length = len(self.args.input.lower().replace("in.dat", ""))
setup_loggers(Path(self.args.input[:wkdir_path_length]))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will moving setup_loggers here not lead to logging not being properly initialised if someone runs process not using the CLI or this class but by direct call of SingleRun or VaryRun?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Write process.log in the same directory as the input file

4 participants