Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log files location and naming #76

Closed
dregad opened this issue Jun 8, 2023 · 2 comments
Closed

Log files location and naming #76

dregad opened this issue Jun 8, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@dregad
Copy link

dregad commented Jun 8, 2023

Currently (2.0.0-beta-02) , the program stores its logs in %APPDATA% (C:\Users\xxx\AppData\Roaming\alma-print-daemon)

Considering that there is an existing logs directory there, IMO it would make sense to store the daily log files there as well.

I would also suggest to rename the log files. Currently they are named like log.alma-print-daemon.YYYY-M-D. It would make more sense if they were named like alma-print-daemon.YYYY-MM-DD.log, for the following benefits:

  • Using a common file extension, allows to open them easily from explorer with a double-click - currently, we get this:

    image

  • Use MM-DD instead of M-D for date formatting would allow correct sorting of the files (see example output of DIR command for current naming)

    01.05.2023  16:42            37 320 log.alma-print-daemon.2023-5-1
    10.05.2023  17:24            37 320 log.alma-print-daemon.2023-5-10
    11.05.2023  11:53            37 320 log.alma-print-daemon.2023-5-11
    02.05.2023  09:49            37 320 log.alma-print-daemon.2023-5-2
    
@mgobat mgobat self-assigned this Jun 8, 2023
@mgobat mgobat added the enhancement New feature or request label Jun 8, 2023
@mgobat
Copy link
Contributor

mgobat commented Jun 19, 2023

The first beta version with this feature is available now at https://github.com/ExLibrisGroup/alma-print-daemon/releases/tag/v2.2.0-beta-03.

Note that only the log file names have changed as suggested. The location of the log files remains the same, except in a single configuration file installation.

@dregad
Copy link
Author

dregad commented Jun 27, 2023

I have tested today, and confirm that the new naming is effective, and the log files are saved in the expected location (local user's profile, or global config directory).

Thank you !

@dregad dregad closed this as completed Jun 27, 2023
mgobat added a commit that referenced this issue Oct 24, 2023
* Minor enhancements

GitHub Issue #10 and simple implementation of #42.

* Beta version with additional error handling, part 1

Some of GitHub issue #74. This check-in is for better printer error handling when running as an app.

* Attempt at better error trapping/logging

Work in progress...

* Change error handling a bit

GitHub Issue #74

* Write to log upon successful print

* Remove try/catch in printing

Electron printing doesn't catch "invalid deviceNmae" error. The try/catch/finally block did, but it caused a problem for printing when there were no printer issues. Remove try/catch/finally. Comment out some superfluous "WriteLog" statements.

* More for issue #74

* Implement global configuration option

Addresses GitHub issue #44 and parts of issue #76.

* Trap errors writing to log file

* Remove beta version number for 2.2 general release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants