How to quickly find the online system error log

After the line, inevitably there will be some errors in our system, such as the following diagram:
Here Insert Picture Description
At this time, we need access to the server to view the log,
we typically log file into the same folder, and then use the
cat info.log | grep '202002221101070732592' -A 6
wherein -A means that we are looking for is information behind the goal lines, here are six rows behind.
Because the information we're looking in the wrong usually behind the logo, so this command more commonly used.
If we need to find a few lines identified above, you can use
cat info.log | grep 'xxx' -B 6
this indicates the information we are looking for is to identify the six rows in front of xxx.
If you need to find a few lines before and after an identity, we can use the command
cat info.log | grep 'xxx' -C 6
This represents the information we are looking for is to identify xxx before and after the 6 line.

Released eight original articles · won praise 0 · Views 98

Guess you like

Origin blog.csdn.net/weixin_44853669/article/details/104440453