Skip to content

Commit

Permalink
增加日志级别常量
Browse files Browse the repository at this point in the history
  • Loading branch information
fengwenyi committed Mar 14, 2019
1 parent 83680ae commit 40e4095
Show file tree
Hide file tree
Showing 7 changed files with 233 additions and 111 deletions.
Binary file modified .gradle/4.10/fileHashes/fileHashes.bin
Binary file not shown.
Binary file modified .gradle/4.10/fileHashes/fileHashes.lock
Binary file not shown.
272 changes: 162 additions & 110 deletions .idea/workspace.xml

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions VERSION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# JavaLib 版本更新记录

## V1.0

| 日期 | 版本号 | 变更记录 |
| --- | --- | --- |
| 2019年03月12日 | 1.0.6.RELEASE | 改用Gradle架构 |
| 2019年03月14日 | 1.0.7.RELEASE | 增加日志常量 |
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
}

group 'com.fengwenyi'
version '1.0.6.RELEASE'
version '1.0.7.RELEASE'

sourceCompatibility = 1.8

Expand Down
47 changes: 47 additions & 0 deletions src/main/java/com/fengwenyi/javalib/constant/LogLevel.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package com.fengwenyi.javalib.constant;

/**
* 日志级别
*
* <p>
* debug<info<warn<Error<Fatal;
* </p>
*
* ALL 各级包括自定义级别
* DEBUG 指定细粒度信息事件是最有用的应用程序调试
* ERROR 错误事件可能仍然允许应用程序继续运行
* FATAL 指定非常严重的错误事件,这可能导致应用程序中止
* INFO 指定能够突出在粗粒度级别的应用程序运行情况的信息的消息
* OFF 这是最高等级,为了关闭日志记录
* TRACE 指定细粒度比DEBUG更低的信息事件
* WARN 指定具有潜在危害的情况
* @author Erwin
* @date 2019-03-14 10:58
*/
public class LogLevel {

/** 各级包括自定义级别 */
public static final String ALL = "ALL";

/** 指定细粒度信息事件是最有用的应用程序调试 */
public static final String DEBUG = "DEBUG";

/** 错误事件可能仍然允许应用程序继续运行 */
public static final String ERROR = "ERROR";

/** 指定非常严重的错误事件,这可能导致应用程序中止 */
public static final String FATAL = "FATAL";

/** 指定能够突出在粗粒度级别的应用程序运行情况的信息的消息 */
public static final String INFO = "INFO";

/** 这是最高等级,为了关闭日志记录 */
public static final String OFF = "OFF";

/** 指定细粒度比DEBUG更低的信息事件 */
public static final String TRACE = "TRACE";

/** 指定具有潜在危害的情况 */
public static final String WARN = "WARN";

}
15 changes: 15 additions & 0 deletions src/test/java/com/fengwenyi/javalib/constant/TestLog.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.fengwenyi.javalib.constant;

import org.junit.Test;

/**
* @author Erwin
* @date 2019-03-14 11:25
*/
public class TestLog {

@Test
public void test() {
//LogLevel.ALL;
}
}

0 comments on commit 40e4095

Please sign in to comment.