4 ms·
So if you have a null pointer exception or something similar in production, you want to send that information to a remote host or alert system to be looked at u
by keyle 5y ago
So if you have a null pointer exception or something similar in production, you want to send that information to a remote host or alert system to be looked at urgently.
- markburns 5y agoI might be missing something, but wouldn't the point be that it's not the log writer's responsibility to do this, but rather some other service that consumes the unparsed output and sends the notification?
- keyle 5y agoAgreed. It's all nice to have. People want push. You can eat your pizza slice whichever way you want. Arguably this would be useful for critical events.
- makeitdouble 5y agoThis is the obvious solution now. I think 20 years ago it would have been slammed as overkill to have a separate process just to send logs. Even now actually, there is a flurry of libs/gems to send events/logs/analytics to a remote server (Datadog, NewRelic, Slack…)from the application itself. It’s usually not directly coupled with the logger, but it’s not far.
- abhishekjha 5y agoApps do send metrics from the process itself. Dropwizard metrics comes to mind. Wonder what timing RCE is waiting to happen there.
- Thorrez 5y agoPutting a feature in a logger to send logs remote is one thing. Putting a special syntax into the log message itself that gets parsed to decide where to send it is much weirder.
- tmd83 5y agoExactly and this being enabled by default seems specially more unusual. I can understand config being parseable even though log configurer directly pulling a remote config is a stretch specially by default. But I don't think it's unlikely that people would by default assume that their log message would be parsed that way and as someone said it even works if that's used as a user input using {} instead of +.
- spc476 5y agosyslog() has been around for a lot longer than 20 years, and that's a function that logs to a separate process. What's so bad about syslog that people need to invent new logging systems?
- funcDropShadow 5y agoBecause it is not portable and therefore not the blessed Java entreprise way of doing things. /rantoff
- Merad 5y agoEncoding that in the log message itself still seems a bit crazy. I’m not familiar with log4j, but the .Net logging libraries I do know (NLog and Serilog) completely separate writing log events from processing (writing, sending, whatever) the events.