Skip to content

Commit a4ebd1f

Browse files
committed
2022.6.3-Client
1 parent f2d1de8 commit a4ebd1f

File tree

21 files changed

+28
-85
lines changed

21 files changed

+28
-85
lines changed
Binary file not shown.
Binary file not shown.

.gradle/7.4/fileHashes/fileHashes.bin

150 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
238 Bytes
Binary file not shown.
Binary file not shown.
18 Bytes
Binary file not shown.

.gradle/file-system.probe

0 Bytes
Binary file not shown.
27 Bytes
Binary file not shown.
103 Bytes
Binary file not shown.
210 Bytes
Binary file not shown.

build/reports/tests/test/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ <h2>Classes</h2>
8585
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
8686
</label>
8787
</div>Generated by
88-
<a href="http://www.gradle.org">Gradle 7.4</a> at 2022年6月6日 上午11:59:44</p>
88+
<a href="http://www.gradle.org">Gradle 7.4</a> at 2022年6月11日 上午8:42:13</p>
8989
</div>
9090
</div>
9191
</body>

build/resources/test/logs/2022-06-10 17-29-04Log.log

Lines changed: 0 additions & 20 deletions
This file was deleted.

build/resources/test/logs/2022-06-10 17-42-53Log.log

Lines changed: 0 additions & 20 deletions
This file was deleted.
Binary file not shown.
Binary file not shown.

src/main/java/com/optilog/log/Send.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ void loggerPrint(LogEvent le, Optilog instance) {
3030
void loggerConsole(LogEvent le, Optilog instance) {
3131
String s = Packing.packMessage(le.message, le.level.getName(), instance);
3232
try {
33-
new Thread(() -> {
33+
Thread thread = new Thread(() -> {
3434
if (instance.consoleFileMasterCaution & Level.INFO.getName().equals(le.level.getName()) & !instance.info.isBlank()) {
3535
try {
3636
synchronized (Send.INSTANCE) {
@@ -133,7 +133,9 @@ void loggerConsole(LogEvent le, Optilog instance) {
133133
}
134134
}
135135
}
136-
}).start();
136+
});
137+
thread.setName("Optilog Logging Thread");
138+
thread.start();
137139
} catch (Exception e) {
138140
instance.consoleFileMasterCaution = false;
139141
instance.error("Optilog Note:Java throws Exception when log is output", e);

src/test/java/com/optilog/Optilog.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ public static void main(String[] args) {
88
// 先生成一个默认的properties的配置文件
99
SettingFiles.generatePropertiesSettings("/Change/This/To/Your/Own/Path");
1010
// %prop代表你要使用properties格式,-cp表示再classpath中,所以^^^^这个路径要再你的classpath中,当然你也可以选择不在classpath中
11-
Log log = Log.initLog("%prop -cp /Setting.properties");
11+
Log log = Log.initLog("%prop -cp /Settings.properties");
1212
log.info("Hello World!");
13-
13+
System.out.println(log.getInfoLogCount());
14+
System.out.println(log.getDebugLogCount());
1415
}
1516
}

src/test/resources/logs/2022-06-10 17-29-04Log.log

Lines changed: 0 additions & 20 deletions
This file was deleted.

src/test/resources/logs/2022-06-10 17-42-53Log.log

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[2022-06-11|08:42:36(14))][com.optilog.OptilogTest main(OptilogTest.java:10)/main] info:---常规输出测试---
2+
[2022-06-11|08:42:36(16))][com.optilog.OptilogTest main(OptilogTest.java:11)/main] info:infojava.lang.Object@49e202ad
3+
[2022-06-11|08:42:36(16))][com.optilog.OptilogTest main(OptilogTest.java:12)/main] Error:error
4+
[2022-06-11|08:42:36(17))][com.optilog.OptilogTest main(OptilogTest.java:13)/main] debug:debug32.0
5+
[2022-06-11|08:42:36(17))][com.optilog.OptilogTest main(OptilogTest.java:14)/main] FATAL:null
6+
[2022-06-11|08:42:36(18))][com.optilog.OptilogTest main(OptilogTest.java:15)/main] FATAL:null
7+
[2022-06-11|08:42:36(19))][com.optilog.OptilogTest main(OptilogTest.java:16)/main] Warning:warnnull
8+
[2022-06-11|08:42:36(19))][com.optilog.OptilogTest main(OptilogTest.java:17)/main] info:---占位符---
9+
[2022-06-11|08:42:36(19))][com.optilog.OptilogTest main(OptilogTest.java:18)/main] info:1 2
10+
[2022-06-11|08:42:36(20))][com.optilog.OptilogTest main(OptilogTest.java:19)/main] Error:1 1
11+
[2022-06-11|08:42:36(20))][com.optilog.OptilogTest main(OptilogTest.java:20)/main] Warning:null
12+
[2022-06-11|08:42:36(20))][com.optilog.OptilogTest main(OptilogTest.java:21)/main] debug:1 2 #3
13+
[2022-06-11|08:42:36(21))][com.optilog.OptilogTest main(OptilogTest.java:22)/main] FATAL:1 #2
14+
[2022-06-11|08:42:36(21))][com.optilog.OptilogTest main(OptilogTest.java:23)/main] debug:de
15+
[2022-06-11|08:42:36(21))][com.optilog.OptilogTest main(OptilogTest.java:24)/main] test:t!e!s!t!
16+
[2022-06-11|08:42:36(22))][com.optilog.OptilogTest test(OptilogTest.java:31)/main] Warning:---变化栈测试---
17+
[2022-06-11|08:42:36(22))][com.optilog.OptilogTest test(OptilogTest.java:32)/main] info:info(test)
18+
[2022-06-11|08:42:36(22))][com.optilog.OptilogTest test(OptilogTest.java:34)/main] info:$
19+
[2022-06-11|08:42:36(22))][com.optilog.OptilogTest lambda$test$1(OptilogTest.java:33)/Thread-17] info:hello
20+
[2022-06-11|08:42:36(23))][com.optilog.OptilogTest test(OptilogTest.java:39)/main] info:log2

0 commit comments

Comments
 (0)