当前位置:网站首页>打印日志的一些小技巧
打印日志的一些小技巧
2022-07-26 17:33:00 【JagTom】
1.使用占位符﹐而不是字符串拼接
String name="小红";
log.info("hello from {}",name); //使用占位符
log.ingo("hello from"+name); //使用字符串拼接
/*
用占位符更加规范,并且占位符性能更好,减少性能的损耗
*/
2.判断debug模式开启
if(log.isDebugEnabled()){
log.info("hello from {}",name);
}边栏推荐
- [day3] reconstruction of roads
- [unity3d] rocker
- PMP Exam details, what changes have been made to the new exam outline?
- 【静态代码质量分析工具】上海道宁为您带来SonarSource/SonarQube下载、试用、教程
- SQL determines whether a column contains Chinese characters, English characters, pure numbers, and data interception
- 点云目标检测KITTI数据集bin文件可视化,一站式解决
- 【翻译】为什么你需要一个API网关来管理对你的API的访问?
- LeetCode 0139. 单词拆分
- 跟我学 UML 系统建模
- PS_2_图层
猜你喜欢

有一说一,阿里P7的薪资待遇是真的香

Rookie cpaas platform microservice governance practice

PS_2_图层

Bulletgraph (bullet diagram, bullet diagram)

Privacy computing basic component series - confusion circuit

Become a test / development programmer, Xiao Zhang: reality is coming

8.1 Diffie Hellman key exchange
![[a little knowledge] thread pool](/img/47/7296e47b53e728d2d3b9db198243f4.png)
[a little knowledge] thread pool

236. The nearest common ancestor of a binary tree

【数字IC】深入浅出理解AXI-Lite协议
随机推荐
Leetcode 50 day question brushing plan (day 5 - longest palindrome substring 10.50-13:00)
效率提升98%!高海拔光伏电站运维巡检背后的AI利器
[training Day1] spy dispatch
The Agile Manifesto has four values and twelve principles
PMP Exam details, what changes have been made to the new exam outline?
线性回归——以一道等差数列的题为例
[training day3] delete
Linked list - the penultimate K nodes
Distributed link tracking Jaeger's use in golang
Is it safe for Changzheng securities to open an account?
链表-倒数最后k个结点
链表-反转链表
8.1 Diffie Hellman key exchange
Greedy - 455. Distribute cookies
Quartz trigger rule
推荐效果不如意,不如试试飞桨图学习
LeetCode50天刷题计划(Day 4—— 最长回文子串 14.00-16:20)
ICML 2022 (Part 4) | | graph hierarchical alignment graph kernel to realize graph matching
相对路径与绝对路径
俄语翻译的就业前景怎样 如何做好俄语翻译工作