Log analysis is a very important and tricky issue, which needs to be handled with a lot of care. If you overlook a few lines, then you will never be able to find the root cause of the issue. Some of the best practices which need to be kept in consideration while doing the log analysis are mentioned as follows:
Check the logs of the last 1 hour from the issue
Always go to the first exception in the logs when the error has started
Always keep in mind that issues are not caused due to malfunction of Tomcat, also check the other infrastructure resources
In non-DOS operating systems (Linux, Unix, Ubuntu, and so on), there are two utilities which are very useful in log analysis, grep
and awk
. Let's discuss grep
and awk
utilities briefly: