My understanding of rsyslog
is that it is a syslog
server implementation common on Ubuntu machines.
Futhermore, my understanding is that rsyslog
can be used to hook/capture STDOUT
output as well as standard syslog
messages.
Last, my understanding is that rsyslog
can then forward any captured messages (again, either coming from STDOUT
or a syslog
client) on to another server, such as a log aggregator, or another rsyslog
server, etc.
So first off, if anything I have stated above is incorrect, please begin by correcting my understanding of how syslog
/rsyslog
work and their relationship to each other!
If my assumptions are more or less correct then given the following two options:
- Option #1: Log to
STDOUT
and configurersyslog
to capture that stream and forward log messages to a remote process (say a log aggregator); or - Option #2: Log to
syslog
and configurersyslog
to capture it and forward log messages to the same remote process
Given these two options, I would prefer #1 since:
- When running locally or from an IDE,
STDOUT
will print to console; and - When running on any non-local environment,
STDOUT
will just get "collected" byrsyslog
If I go with Option #2, I lose console visibility when running locally.
Having said that, are there any security/performance/other concerns/caveats/pitfalls from logging to STDOUT
that would make Option #2 more attractive/desirable? If so what are they?