当前位置:网站首页>Some tips for printing logs
Some tips for printing logs
2022-07-26 18:24:00 【JagTom】
1. Use placeholders ﹐ Instead of string splicing
String name=" Xiaohong ";
log.info("hello from {}",name); // Use placeholders
log.ingo("hello from"+name); // Use string concatenation
/*
More standardized with placeholders , And placeholder performance is better , Reduce the loss of performance
*/
2. Judge debug Mode on
if(log.isDebugEnabled()){
log.info("hello from {}",name);
}边栏推荐
- [brother hero July training] day 25: tree array
- 相对路径与绝对路径
- 剑指offer 连续子数组的最大和(二)
- 202. Happy number
- 贪心——455. 分发饼干
- Online stock trading, where to choose to open an account is safer?
- 【翻译】为什么你需要一个API网关来管理对你的API的访问?
- 2、 Topic communication principle, code implementation
- [translation] Why do you need an API gateway to manage access to your API?
- 7、 Common commands of ROS (II): rosservice, rossrv, rosparam
猜你喜欢
随机推荐
Win10 连接无线不能输入密码字符,一输入就卡死
OpenGL中的视差贴图的着色器代码
成为测试/开发程序员,小张:现实就来了个下马威......
Leetcode 50 day question brushing plan (day 4 - longest palindrome substring 14.00-16:20)
10、 Implementation of parameter modification of parameter server
202. Happy number
LeetCode50天刷题计划(Day 2—— 无重复字符的最长子串 10.00-12.00)
Leetcode 50 day question brushing plan (day 3 - concatenate substrings of all words 10.00-13.20)
8.1 Diffie-Hellman密钥交换
Are you suitable for automated testing?
The Agile Manifesto has four values and twelve principles
数据仓库:详解维度建模之事实表
IrrKlang音频库的下载和配置
ssm练习第三天_分页助手_安全框架
Leetcode 0137. number II that appears only once
继续卷技术 埋头苦学,越学越会
SQL determines whether a column contains Chinese characters, English characters, pure numbers, and data interception
LeetCode_1005_K次取反后最大化的数组和
Meta Cambria手柄曝光,主动追踪+多触觉回馈方案
百度飞桨EasyDL X 韦士肯:看轴承质检如何装上“AI之眼”
![[ Kitex 源码解读 ] 服务发现](/img/70/c74ede02b794e586d629876d2b2376.png)








