当前位置:网站首页>Idea one click log generation
Idea one click log generation
2022-06-27 06:35:00 【Java white notes】
IDEA One click generation Log journal
adopt IDEA live templates Automatic generation :
1、loge Exception log printing
log.error($content$,$[params](https://so.csdn.net/so/search?q=params&spm=1001.2101.3001.7020)$);
content Parameters :
groovyScript("def params = _2.collect {'【'+it+' = {}】'}.join(', '); return '\"' + _1 + '() called with exception => ' + (params.empty ? '' : params) + '\"'", methodName(), methodParameters())
params Parameters :
groovyScript("def params = _1.collect {it}.join(', '); return (params.empty ? '' : params) + ',e' ", methodParameters())

2、logi Parameter log printing
log.info($content$,$params$);
content Parameters :
groovyScript("def params = _2.collect {'【'+it+' = {}】'}.join(', '); return '\"' + _1 + '() called with parameters => ' + (params.empty ? '' : params) + '\"'", methodName(), methodParameters())
params Parameters :
groovyScript("def params = _1.collect {it}.join(', '); return (params.empty ? '' : params) ", methodParameters())
3、logr Result log printing
log.info("$METHOD_NAME$() returned: " + $result$);
METHOD_NAME Parameters :
methodName()
result Parameters :
variableOfType(methodReturnType())
边栏推荐
- JVM overall structure analysis
- Multithreading basic part part 1
- Currying Scala functions
- 427-二叉树(617.合并二叉树、700.二叉搜索树中的搜索、98. 验证二叉搜索树、530.二叉搜索树的最小绝对差)
- Crawler learning 5--- anti crawling identification picture verification code (ddddocr and pyteseract measured effect)
- Change the status to the corresponding text during MySQL query
- Proxy reflect usage details
- 310. minimum height tree
- Using CSDN to develop cloud and build navigation websites
- 2022 CISP-PTE(二)SQL注入
猜你喜欢

G1和ZGC垃圾收集器

Currying Scala functions

爬虫学习5---反反爬之识别图片验证码(ddddocr和pytesseract实测效果)

JVM对象组成和存储

Modeling competition - optical transport network modeling and value evaluation

Run opcua protocol demo on raspberry pie 4B to access kubeedge

Fast realization of Bluetooth communication between MCU and mobile phone

Convolution neural network -- Application of CNN model (ore prospecting prediction)

Scala函数柯里化(Currying)

JVM overall structure analysis
随机推荐
JVM object composition and storage
Assembly language - Wang Shuang Chapter 8 two basic problems in data processing - Notes
Ora-00909: invalid number of parameters, caused by concat
HTAP 深入探索指南
Spark sql 常用时间函数
JS to implement bidirectional data binding
Run opcua protocol demo on raspberry pie 4B to access kubeedge
The number of query results of maxcompute SQL is limited to 1W
C Primer Plus Chapter 11_ Strings and string functions_ Codes and exercises
HTAP Quick Start Guide
Compatibility comparison between tidb and MySQL
TiDB 基本功能
TiDB的事务概览
The restart status of the openstack instance will change to the error handling method. The openstack built by the container restarts the compute service method of the computing node and prompts the gi
爬虫学习5---反反爬之识别图片验证码(ddddocr和pytesseract实测效果)
使用 WordPress快速个人建站指南
Configuration of vscode korofileheader
The fourth question of the 299th weekly match 6103 Minimum fraction of edges removed from the tree
线程间等待与唤醒机制、单例模式、阻塞队列、定时器
Multithreading basic part part 1