Include name of script when exiting on a fatal error #281

Closed
opened 2025-12-29 01:21:03 +01:00 by adam · 3 comments
Owner

Originally created by @ghewgill on GitHub (Feb 18, 2018).

When the script exits with a fatal error (_exiterr), the name of the script is not included. When the error is simply a message like "This script requires curl.", and this message appears in a system log file, it can be challenging to determine which script requires curl.

The proposed change is to include the script name in the message printed with _exiterr.

Originally created by @ghewgill on GitHub (Feb 18, 2018). When the script exits with a fatal error (`_exiterr`), the name of the script is not included. When the error is simply a message like "This script requires curl.", and this message appears in a system log file, it can be challenging to determine *which* script requires curl. The proposed change is to include the script name in the message printed with `_exiterr`.
adam closed this issue 2025-12-29 01:21:03 +01:00
Author
Owner

@lukas2511 commented on GitHub (Feb 19, 2018):

This is not an issue with dehydrated, just an issue with your logging setup. You can easily pipe dehydrated output to something like logger to set a syslog facility, or instead of a simple cronjob use a systemd service and timer which will take care of usable logging by default.

@lukas2511 commented on GitHub (Feb 19, 2018): This is not an issue with dehydrated, just an issue with your logging setup. You can easily pipe dehydrated output to something like `logger` to set a syslog facility, or instead of a simple cronjob use a systemd service and timer which will take care of usable logging by default.
Author
Owner

@ghewgill commented on GitHub (Feb 19, 2018):

Let's just say that if I already knew which script needed a logger pipe, I wouldn't have had this problem in the first place. I figured it out, but my proposed change was to help the next person with the same problem.

@ghewgill commented on GitHub (Feb 19, 2018): Let's just say that if I already knew which script needed a `logger` pipe, I wouldn't have had this problem in the first place. I figured it out, but my proposed change was to help the next person with the same problem.
Author
Owner

@lukas2511 commented on GitHub (Feb 19, 2018):

Sorry but for that I'd need to prefix basically any line of log output from dehydrated with its name. Just adding the prefix to the last error would be very inconsistent and you'd have thousands of lines of log with warnings and basic information without knowing where they are coming from.
Name just one widespread tool that does that and I might consider adding an option for that.

You are setting dehydrated up on your system, you are running the code, you should think about how you want your logging to be handled when you are setting things up. At some point you would have added a dehydrated cronjob or something similar, at that point you should have thought about how to handle its output, being it a pipe to logger, appending its output to a logfile, or using one of the hundreds of cron logging wrappers available out there.

@lukas2511 commented on GitHub (Feb 19, 2018): Sorry but for that I'd need to prefix basically any line of log output from dehydrated with its name. Just adding the prefix to the last error would be very inconsistent and you'd have thousands of lines of log with warnings and basic information without knowing where they are coming from. Name just one widespread tool that does that and I might consider adding an option for that. You are setting dehydrated up on your system, you are running the code, you should think about how you want your logging to be handled when you are setting things up. At some point you would have added a dehydrated cronjob or something similar, at that point you should have thought about how to handle its output, being it a pipe to `logger`, appending its output to a logfile, or using one of the hundreds of cron logging wrappers available out there.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/dehydrated#281