Live data from Hacker News

Log4jmemes.com: for those of us that need a laugh

log4jmemes.com

1–10 of 115 posts

Re: Log4jmemes.com: for those of us that need a laugh

#7
The one about using print/console.log/whatever lol.

I've always done this, never have I used a library for this, because:

  - running manually? >myapp.log 2>&1
  - using systemd? use journalctl
  - using docker/kubernetes? capture automatically the stdout/stderr of your containers and pipe them through logstash or something
Real question: why would an application need to know where its logs go? This is not in the business perimeter, but the ops perimeter. Am I wrong?

EDIT:

Most responses are about configuring logging level, output format, etc... This can be done with a print-based approach without sending a request to an external service (which would need to trust you and your inputs).

Example: Python's default logging module.

Still, thank you for your insightful answers :)

Re: Log4jmemes.com: for those of us that need a laugh

#9
post #7

The one about using print/console.log/whatever lol. I've always done this, never have I used a library for this, because: - running manually? >myapp.log 2>&1 - using systemd? use journalctl - using docker/kubernetes? capture automatically the stdout/stderr of your containers and pipe them through logstash or something Real question: why would an application need to know where its logs go? This is not in the business…

Built-in logging libraries offer more flexibility: you can set the log level of each module to avoid flooding your log files with everything's debug logs, for example. Or you want to write multiple log files with different settings.

Also legacy; before systemd/docker/kubernetes, applications had to send to syslog themselves.

Re: Log4jmemes.com: for those of us that need a laugh

#10
post #7

The one about using print/console.log/whatever lol. I've always done this, never have I used a library for this, because: - running manually? >myapp.log 2>&1 - using systemd? use journalctl - using docker/kubernetes? capture automatically the stdout/stderr of your containers and pipe them through logstash or something Real question: why would an application need to know where its logs go? This is not in the business…

> Am I wrong?

You are not a real Java Programmer then.

Post reply on HN