Logging levels – Logback – rule-of-thumb to assign log levels

I mostly build large scale, high availability type systems, so my answer is biased towards looking at it from a production support standpoint; that said, we assign roughly as follows: error: the system is in distress, customers are probably being affected (or will soon be) and the fix probably requires human intervention. The “2AM rule” … Read more

How to log cron jobs?

* * * * * myjob.sh >> /var/log/myjob.log 2>&1 will log all output from the cron job to /var/log/myjob.log You might use mail to send emails. Most systems will send unhandled cron job output by email to root or the corresponding user.

Spring Boot: How can I set the logging level with application.properties?

Update: Starting with Spring Boot v1.2.0.RELEASE, the settings in application.properties or application.yml do apply. See the Log Levels section of the reference guide. logging.level.org.springframework.web: DEBUG logging.level.org.hibernate: ERROR For earlier versions of Spring Boot you cannot. You simply have to use the normal configuration for your logging framework (log4j, logback) for that. Add the appropriate config … Read more

Where is the Docker daemon log?

It depends on your OS. Here are the few locations, with commands for few Operating Systems: Ubuntu (old using upstart ) – /var/log/upstart/docker.log Ubuntu (new using systemd ) – sudo journalctl -fu docker.service Amazon Linux AMI – /var/log/docker Boot2Docker – /var/log/docker.log Debian GNU/Linux – /var/log/daemon.log CentOS – cat /var/log/message | grep docker CoreOS – journalctl … Read more

When to use the different log levels

I generally subscribe to the following convention: Trace – Only when I would be “tracing” the code and trying to find one part of a function specifically. Debug – Information that is diagnostically helpful to people more than just developers (IT, sysadmins, etc.). Info – Generally useful information to log (service start/stop, configuration assumptions, etc). … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)