-
Notifications
You must be signed in to change notification settings - Fork 6
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
Deliver messages from logger
when reading from unix sockets
#20
Comments
I forgot to mention that I opened this issue just to throw the idea. I'll happily help implementing it as soon as I can, unless someone else beats me to it. |
Quick update on this: I was wrong, Everything else remains true when a custom domain socket is specified with An alternative would be to make an instance of |
@fabiokung it is not clear to me how we can connect logger to logplex. For example, using SYSLOG(3) #include <syslog.h>
int
main()
{
syslog(LOG_ALERT, "hello world");
} The following message makes it into system log stream. $ tail -f /var/log/system.log
May 31 11:05:09 b.local x[76342]: hello world Unless we can control the output format of SYSLOG(3), we will need to receive the formatted messages from SYSLOG(3) and rewrite them to be compatible with RFC5424. This seems like it is out of scope for log-shuttle. |
I did some more research on this. POSIX doesn't say anything about where http://pubs.opengroup.org/onlinepubs/9699919799/functions/syslog.html But glibc's implementation will always write to a http://www.gnu.org/software/libc/manual/html_node/syslog_003b-vsyslog.html#syslog_003b-vsyslog It is safe to assume that on linux systems all |
Moved to heroku/log-shuttle#14. |
logger
by default writes to/dev/log
(a regular unix domain socket). Custom sockets can be specified with-u
, so thatlogger
can write to a unix socket where alog-shuttle
process listens.However,
logger
doesn't generate newlines, and uses a syslog format slightly different from what logplex expects:To support this,
log-shuttle
needs to detect the\000
(UNIX end of line) character at the end of messages, instead of relying on\n
and\r
. Maybe it already does, but I am not sure if logplex will accept the syslog body aslogger
generates it:/cc @ryandotsmith @fdr
The text was updated successfully, but these errors were encountered: