jelastic-jps / lets-encrypt

Let’s Encrypt Add-on for Jelastic PaaS
Apache License 2.0
19 stars 45 forks source link

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

Open dmitrykhimich opened 5 months ago

dmitrykhimich commented 5 months ago

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 https://github.com/jelastic-jps/lets-encrypt/blob/02604527ed3080693bc5ec899881ed1d6949f8e1/scripts/ssl-manager.js#L1447

lazarenkoalexey commented 5 months ago

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 https://github.com/jelastic-jps/lets-encrypt/pull/298

SlavaKatiukha commented 5 months ago

Additional echo is okay in this case, but you don't need to redirect the output manually (see https://github.com/jelastic-jps/lets-encrypt/pull/298). Also, we still ended up without stderr in logs 🙂. So, the 2>&1 is also needed here: https://github.com/jelastic-jps/lets-encrypt/blob/02604527ed3080693bc5ec899881ed1d6949f8e1/scripts/ssl-manager.js#L1447 (>> %(log) 2>&1)