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

[Let's Encrypt] Add extended logging of cron task execution #297

Open
dmitrykhimich opened this issue May 30, 2024 · 2 comments
Open

[Let's Encrypt] Add extended logging of cron task execution #297

dmitrykhimich opened this issue May 30, 2024 · 2 comments

Comments

@dmitrykhimich
Copy link

The log /var/log/letsencrypt.log does not mention the result of the script execution from the cron task.
Logging should be added to simplify debugging.

Most likely an additional redirect should be added here

"echo \"%(cronTime) su - root -c \\\"%(scriptPath) '%(autoUpdateUrl)' >> %(log)\\\"\" >> /var/spool/cron/root"

lazarenkoalexey added a commit to lazarenkoalexey/lets-encrypt that referenced this issue May 30, 2024
lazarenkoalexey added a commit to lazarenkoalexey/lets-encrypt that referenced this issue May 30, 2024
@lazarenkoalexey
Copy link
Contributor

Te simplest case is write resp variable into letsencrypt.log file. Wget redirects in one stream only - variable or log file.
So each time while auto updating the response out will be set in log file
#298

@SlavaKatiukha
Copy link
Collaborator

SlavaKatiukha commented May 31, 2024

Additional echo is okay in this case, but you don't need to redirect the output manually (see #298). Also, we still ended up without stderr in logs 🙂. So, the 2>&1 is also needed here:

"echo \"%(cronTime) su - root -c \\\"%(scriptPath) '%(autoUpdateUrl)' >> %(log)\\\"\" >> /var/spool/cron/root"
(>> %(log) 2>&1)

lazarenkoalexey added a commit to lazarenkoalexey/lets-encrypt that referenced this issue May 31, 2024
lazarenkoalexey added a commit to lazarenkoalexey/lets-encrypt that referenced this issue May 31, 2024
lazarenkoalexey added a commit to lazarenkoalexey/lets-encrypt that referenced this issue May 31, 2024
SlavaKatiukha added a commit that referenced this issue Jun 14, 2024
* [Let's Encrypt] Add extended logging of cron task execution #297

* [Let's Encrypt] Add extended logging of cron task execution #297

* [Let's Encrypt] Add extended logging of cron task execution #297

* [Let's Encrypt] Add extended logging of cron task execution #297

* [Let's Encrypt] Add extended logging of cron task execution

Co-authored-by: Slava Katiukha <[email protected]>

* [Let's Encrypt] Add extended logging of cron task execution

* [Let's Encrypt] Add extended logging of cron task execution

---------

Co-authored-by: Slava Katiukha <[email protected]>
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

No branches or pull requests

3 participants