-
Notifications
You must be signed in to change notification settings - Fork 79
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
Question: How to see command logs in docker logs? #318
Comments
Would it be possible to pass Jobber's logPath file handle to the Command's Line 107 in 658675e
Then in job file, define Command's prefs:
logPath: /var/log/jobber/jobber.log
runLog:
type: file
path: /var/log/jobber/jobber-runs.log
maxFileLen: 100m
maxHistories: 2
jobs:
sitemap:
cmd: /usr/local/bin/generateSitemap.sh
time: '*/30 0 3'
onError: Continue
log:
- stdout
- stderr The above approach still allows use of |
I would need this feature as well |
I have jobber configured and running in a docker container. My jobs log 100's of JSON lines to stderr/stdout. If I configure the job to redirect output to a file, everything works nicely except I must attach a shell to inspect logs.
I would like the output of my scripts to be written to container's stdout/stderr (similar to how Jobber's run log is done) so that logs may be inspected using
docker logs -f <container_name>
or forwarded to ELK stack using Docker syslog log driver.Result Sinks
Using the
resultSinks:
withtype: stdout
is not an option as the output is buffered then wrapped with Jobber status. If 100's of log entries occur during script execution, the resulting output is too long to send to remote syslog listener (aka logstash). I would like EACH log entry to be written individually and forwarded to a syslog listener for processing.Sample Log Entry as received by ELK (SHORTEST OF ALL COMMANDS)
stderr contains four syslog entries prefixed with
2020-10-02T02:29:03+00:00 INFO (6):
Other options tried:
Symlink log file to /dev/stderr
Any assistance in how to accomplish the above would be greatly appreciated.
The text was updated successfully, but these errors were encountered: