Skip to content

Commit b14f66f

Browse files
committed
2022.6.2-Client(update)
1 parent 979c843 commit b14f66f

5 files changed

Lines changed: 32 additions & 12 deletions

File tree

README-en.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
![Build](https://img.shields.io/badge/Build-Passing-green)
44
[![Latest-Release](https://img.shields.io/badge/Release-Latest-blue)](https://github.com/OptiJava/Optilog-Client/releases/latest)
5-
[![Languege](https://img.shields.io/badge/Language-ChinesePage-red)](https://github.com/OptiJava/Optilog-Client/blob/master/README.md)
5+
6+
[![Languege](https://img.shields.io/badge/Language-EnglishPage-red)](https://github.com/OptiJava/Optilog-Client/blob/master/README-en.md)
7+
| [![Languege](https://img.shields.io/badge/Language-ChinesePage-green)](https://github.com/OptiJava/Optilog-Client/blob/master/README.md)
68

79
**This is an open source logging framework written in java. Optilog has
810
more [advantages](https://github.com/OptiJava/Optilog-Client#optilog%E7%9A%84%E4%BC%98%E5%8A%BF) than other open source
@@ -11,10 +13,10 @@ logging frameworks (such as log4j and SLF4j)**
1113
The wiki of Optilog will be updated at any time. If there is a problem, ask the issues. You should see this
1214
project [wiki](https://github.com/OptiJava/Optilog-Client/wiki) before use Optilog.
1315

14-
[OptilogServer](https://github.com/OptiJava/Optilog-Server) matched with this(OptilogClient). See wiki for details.
16+
[OptilogServer](https://github.com/OptiJava/Optilog-Server) matched with OptilogClient. See wiki for details.
1517

1618
If you like, you are welcome to contribute to Optilog through fork. The code of this project is quite basic. Anyone can
17-
contribute.
19+
contribute.
1820

1921
# Precautions:
2022

@@ -24,12 +26,11 @@ will be a bug! (see wiki for details)(expect when you need change setting file)
2426
# Optilog advantages
2527

2628
1.High performance: After initialization log, output a log (output to the screen + output to a file + output to the
27-
server
28-
through socket) only takes 8 milliseconds at most (it will be optimized later), and log4j takes at least 41
29+
server through socket) only takes 8 milliseconds at most (it will be optimized later), and log4j takes at least 41
2930
milliseconds.
3031

3132
2.Optilog supports unlimited placeholders and can be reused (#1 #1 outputs the first placeholder twice). Log4j only
32-
supports 9 placeholders
33+
supports 9 placeholders.
3334

3435
3.The configuration file can be placed in any location. The name of the configuration file is unlimited. Two types of
3536
configuration files are supported. In log4j, the configuration file can only be in classpath and the name can only be

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,25 @@
22

33
![Build](https://img.shields.io/badge/Build-Passing-green)
44
[![Latest-Release](https://img.shields.io/badge/Release-Latest-blue)](https://github.com/OptiJava/Optilog-Client/releases/latest)
5+
56
[![Languege](https://img.shields.io/badge/Language-EnglishPage-red)](https://github.com/OptiJava/Optilog-Client/blob/master/README-en.md)
7+
| [![Languege](https://img.shields.io/badge/Language-ChinesePage-green)](https://github.com/OptiJava/Optilog-Client/blob/master/README.md)
68

7-
_截止目前,Optilog代码总量3160行_
9+
_截止目前,Optilog代码总量3262行_
810

911
**_See English README.md page in [English Page](https://github.com/OptiJava/Optilog-Client/blob/master/README-en.md)_**
1012

1113
这是一个用java语言编写的开源日志框架,他相比现在其他开源日志框架(比如log4j,slf4j)有更多的[优势](https://github.com/OptiJava/Optilog-Client#optilog%E7%9A%84%E4%BC%98%E5%8A%BF)
1214

1315
Optilog的Wiki随时会更新,有问题在Issues问,使用前一!定!看[本项目Wiki](https://github.com/OptiJava/Optilog-Client/wiki)
1416

15-
与OptilogClient配套的[OptilogServer](https://github.com/OptiJava/Optilog-Server),具体怎么用去看wiki.
17+
与OptilogClient配套的[OptilogServer](https://github.com/OptiJava/Optilog-Server).
1618

1719
_如果你愿意,欢迎Fork这个仓库为Optilog做出贡献,本项目的代码比较基础,任何人都可以做出贡献~~包括不会编程的人,因为他们可以写教程~~_
1820

1921
# 注意事项:
2022

21-
**一整个java项目建议全程只用一个初始化出来的实例,不然会出bug...**
23+
**一整个java项目建议全程只用一个初始化出来的实例,不然会出bug**
2224

2325
# Optilog的优势
2426

@@ -51,6 +53,7 @@ _如果你愿意,欢迎Fork这个仓库为Optilog做出贡献,本项目的
5153
1.没有对jdbc的支持 <-在2022/6/7最新的提交中,已经新增了将日志输出到DataBase的支持~~你们肯定不知道我装mysql装了5遍才成功~~
5254

5355
# Optilog输出日志预览:
56+
5457
![image](https://user-images.githubusercontent.com/106148777/170864247-7da18dd5-f5b9-4e5c-aee7-4174d29a8969.png)
5558

5659
# Dependency:
@@ -67,4 +70,4 @@ _如果你愿意,欢迎Fork这个仓库为Optilog做出贡献,本项目的
6770

6871
# 未来计划
6972

70-
1.实现远程调用
73+
实现远程调用
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.optilog;
2+
3+
import com.optilog.log.Log;
4+
import com.optilog.setting.SettingFiles;
5+
6+
public class Optilog {
7+
public static void main(String[] args) {
8+
// 先生成一个默认的properties的配置文件
9+
SettingFiles.generatePropertiesSettings("/Change/This/To/Your/Own/Path");
10+
// %prop代表你要使用properties格式,-cp表示再classpath中,所以^^^^这个路径要再你的classpath中,当然你也可以选择不在classpath中
11+
Log log = Log.initLog("%prop -cp /Setting.properties");
12+
log.info("Hello World!");
13+
}
14+
}

src/test/java/com/optilog/OptilogTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
public class OptilogTest {
88
public static void main(String[] args) {
99
Log log = Log.initLog("%yaml -cp /Settings.yaml");
10-
1110
log.info("---常规输出测试---");
1211
log.info("info" + new Object());
1312
log.error("error");
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
package com.optilog;
22

3+
import com.optilog.log.Log;
4+
35
public class Test {
46
public static void main(String[] args) {
5-
7+
Log log = Log.initLog("%prop -cp Settings.properties");
8+
log.info("Hello World!");
69
}
710
}
811

0 commit comments

Comments
 (0)