public enum SqlLog extends Enum<SqlLog>
Enum Constant and Description |
---|
INSTANCE |
Modifier and Type | Method and Description |
---|---|
void |
init(boolean isShowSql,
boolean isFormatSql,
boolean isShowParams,
Level level)
设置全局配置:是否通过debug日志显示SQL
|
void |
log(String sql)
打印SQL日志
|
void |
log(String sql,
Object paramValues)
打印SQL日志
|
void |
logForBatch(String sql)
打印批量 SQL日志
|
static SqlLog |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SqlLog[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SqlLog INSTANCE
public static SqlLog[] values()
for (SqlLog c : SqlLog.values()) System.out.println(c);
public static SqlLog valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic void init(boolean isShowSql, boolean isFormatSql, boolean isShowParams, Level level)
isShowSql
- 是否显示SQLisFormatSql
- 是否格式化显示的SQLisShowParams
- 是否打印参数level
- 日志级别public void log(String sql)
sql
- SQL语句public void logForBatch(String sql)
sql
- SQL语句Copyright © 2021. All rights reserved.