当前位置:网站首页>Error log format and precautions
Error log format and precautions
2022-06-25 02:37:00 【InfoQ】
Print in the program code ERROR Basic principles of error logging :
- Describe as completely as possible : Every error log needs a complete description : What's wrong in what scenario , What causes it ( Or what are the possible reasons , Like parameters 、 Other system data, etc ), How can it be solved ( Or other relevant tips for solution );
- Be as specific as possible : For example, insufficient resources , It can be described in detail to : What specifically refers to the lack of resources , Whether it can be directly indicated in the program , For example, the resources of the route pool are insufficient or Interface access current limiting .
- Describe as directly as possible : The most intuitive error log should allow people to read the error log information , You can find out what caused the problem , How to solve , Instead of slowly debugging the program , Or guess the real reason .
The level of logging :
- info It is used to print the normal status information that the program should appear , Easy to track and locate , Usually used to locate logic bug.
- warn It shows that the system is slightly unreasonable, but it does not affect the operation and use , The key to the level of this log is that it does not affect the operation , You can ignore .
- error Indicates that there are system errors and exceptions , The target operation cannot be completed normally .error Manual intervention required .
ERROR Log format
- Class name : Class name .
- Method name : Method name .
- Error phenomenon : Describe the error phenomenon , such as " Interface timeout " perhaps " The interface returned an exception ".
- Conditions : Interface parameters or classes DTO Input parameter serialization result .
- Possible causes : Describe the possible causes of the error , such as " The cache is full " perhaps " XXX permission cannot be obtained ", Error code , Non essential election .
- What do I need to do : Describe recommended actions , such as " Update a key value cache "," Modify so and so permission ", Non essential election .
边栏推荐
- 把 Oracle 数据库从 Windows 系统迁移到 Linux Oracle Rac 集群环境(4)—— 修改 oracle11g rac 集群的 scanIP
- Software testing salary in first tier cities - are you dragging your feet
- QT package the EXE file to solve the problem that "the program input point \u zdapvj cannot be located in the dynamic link library qt5cored.dll"
- C#实现水晶报表绑定数据并实现打印
- 【FPGA】串口以命令控制温度采集
- 记一次beego通过go get命令后找不到bee.exe的坑
- Intranet learning notes (7)
- Once beego failed to find bee after passing the go get command Exe's pit
- 华为、阿里等大厂程序员真的好找对象吗?
- The role of software security testing, how to find a software security testing company to issue a report?
猜你喜欢
Intranet learning notes (7)
leecode学习笔记-机器人走到终点的最短路径
分布式事务解决方案和代码落地
【STL源码剖析】配置器(待补充)
Software testing salary in first tier cities - are you dragging your feet
Yarn: unable to load file c:\users\xxx\appdata\roaming\npm\yarn PS1 because running scripts is prohibited on this system
Folding screen will become an important weapon for domestic mobile phones to share the apple market
jwt
Leecode learning notes - the shortest path for a robot to reach its destination
Random list random generation of non repeating numbers
随机推荐
Intranet learning notes (7)
internship:svn的使用
软件测试人员的7个等级,据说只有1%的人能做到级别7
背了八股文,六月赢麻了……
PE file infrastructure sorting
ERROR日志格式与注意点
ProcessOn制作ER过程(自定义)
After reciting the eight part essay, I won the hemp in June
Leetcode 210: curriculum II (topological sorting)
常用的软件测试工具清单,请查收。
业务与技术双向结合构建银行数据安全管理体系
AI服装生成,帮你完成服装设计的最后一步
做软件安全测试的作用,如何寻找软件安全测试公司出具报告?
How transformers Roberta adds tokens
How to uninstall CUDA
Application of TSDB in civil aircraft industry
文件系统 -- 磁盘基础知识和FAT32文件系统详细介绍
LeetCode 210:课程表 II (拓扑排序)
当他们在私域里,掌握了分寸感
记一次beego通过go get命令后找不到bee.exe的坑