Skip to content
This repository was archived by the owner on Feb 1, 2024. It is now read-only.

Commit 1b527c7

Browse files
author
Your
committed
feat: 发布版本 2.2.0
1 parent 3a6f493 commit 1b527c7

35 files changed

+674
-255
lines changed

README.md

100755100644
Lines changed: 24 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,21 @@
77
<a href="https://jitpack.io/#OpenEdgn/Logger4K" target="_blank"> <img alt="JitPack" src="https://img.shields.io/jitpack/v/github/OpenEdgn/Logger4K"></a>
88
</p>
99

10-
[CHINESE](README_CN.md) | ENGLISH (Google Translate)
10+
CHINESE | [ENGLISH](README_EN.md) (Google Translate)
1111

12-
`LOGGER4K` Is a lightweight `Kotlin`logging framework.
12+
`Logger4K` 是一个轻量级`Kotlin JVM`日志框架
1313

14-
## Getting Started
14+
## 入门
1515

16-
This project used `Gradle ` to build coverage `Junit` test.
16+
本项目使用 `Gradle `构建, 覆盖 `Junit` 单元测试,如有发现漏洞或者意见可在项目`Issues` 下反馈,欢迎各位大佬提建议。
1717

18-
If you find a bug or comments, you can feedback under `Issues`.
18+
### 开始之前
1919

20-
### Add this to the project
21-
22-
> Before you start, you need to introduce the module into the project. The introduction of `Apache Maven` and `Gradle` is introduced below.
20+
> 在开始之前,你需要将模块引入到项目中,本项目使用 JitPack 作为依赖仓库,下面介绍了使用`Gradle``Apache Maven` 的引入方法
2321
2422
#### Maven & Gradle
2523

26-
##### 1. Add it to the project:
24+
##### 1. 将JitPack存储库添加到您的构建文件中
2725

2826
**Maven**
2927

@@ -42,13 +40,13 @@ If you find a bug or comments, you can feedback under `Issues`.
4240
```groovy
4341
allprojects {
4442
repositories {
45-
// ...
43+
//其他仓库
4644
maven { url 'https://jitpack.io' }
4745
}
4846
}
4947
```
5048

51-
##### 2. Add dependencies
49+
##### 2. 添加依赖项
5250

5351
**Maven**
5452

@@ -65,36 +63,32 @@ allprojects {
6563

6664
```groovy
6765
dependencies {
68-
implementation 'com.github.OpenEdgn.Logger4K:${modName}:${version}'
66+
implementation "com.github.OpenEdgn.Logger4K:${modName}:${version}"
6967
}
7068
```
7169

72-
> `$ {modName}` represents the module name, and `$ {version}` represents the referenced version number.
73-
74-
version:[![JitPack](https://img.shields.io/jitpack/v/github/OpenEdgn/Logger4K?label=version&style=flat-square)](https://jitpack.io/#OpenEdgn/Logger4K)
70+
> 其中,`${modName}` 代表 引用的模块名称,而 `${version}` 则代表引用的版本号,请按需引入。
7571
76-
### Usage
72+
其中,当前最新版本为:[![JitPack](https://img.shields.io/jitpack/v/github/OpenEdgn/Logger4K?label=version&style=flat-square)](https://jitpack.io/#OpenEdgn/Logger4K)
7773

78-
Basic usage of the Logger API:
74+
### 使用
7975

8076
``` kotlin
81-
val logger = getLogger () // Create a Logger object
82-
8377

84-
logger.debug ( " DEBUG Message. " )
85-
// Output DEBUG type log (note that the log will not be output if DEBUG is not enabled)
78+
logger.debug("DEBUG Message.")
79+
// 输出 DEBUG 类型的日志 ( 注意,DEBUG未开启则不会输出日志)
8680

87-
logger.info ( " INFO Message. " )
88-
// Output INFO type log
81+
logger.info("INFO Message.")
82+
// 输出 INFO 类型的日志
8983

90-
logger.warn (" WARN Message. ")
91-
// Output WARN type log
84+
logger.warn("WARN Message.")
85+
// 输出 WARN 类型的日志
9286

9387
logger.error("ERROR Message.")
94-
// Output log of ERROR type
88+
// 输出 ERROR 类型的日志
9589

9690
logger.debugOnly {
97-
// This code block only runs in debug mode
91+
//此代码块仅在调试模式下运行
9892
info("INFO")
9993
warn("WARN")
10094
debug("DEBUG")
@@ -103,9 +97,9 @@ logger.debugOnly {
10397

10498
```
10599

106-
Please see [PrintLogger.kt](./logger-console/src/test/kotlin/PrintLogger.kt)
107-
and [LoggerMainTestAll.kt](./logger-console/src/test/kotlin/LoggerMainTestAll.kt) under `TEST` for more usage methods.
100+
更多使用方法请查看 `TEST` 下的 [PrintLogger.kt](./logger-console/src/test/kotlin/PrintLogger.kt)
101+
[LoggerMainTestAll.kt](./logger-console/src/test/kotlin/LoggerMainTestAll.kt) 文件。
108102

109103
## LICENSE
110104

111-
SEE [LICENSE FILE](./LICENSE)
105+
此项目使用 MIT ,详情请查看 [License](./LICENSE) 文件.

README_CN.md

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

README_EN.md

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
# Logger 4K
2+
3+
<p style="text-align: center">
4+
<a href="https://github.com/OpenEdgn/Logger4K" target="_blank"><img alt="Jenkins" src="https://github.com/OpenEdgn/Logger4K/actions/workflows/release.yml/badge.svg?branch=master&color=green&style=flat-square"/></a>
5+
<a href="LICENSE"><img alt="GitHub license" src="https://img.shields.io/github/license/OpenEdgn/Logger4K"></a>
6+
<a href="#"><img alt="GitHub repo size" src="https://img.shields.io/github/repo-size/OpenEdgn/Logger4K"></a>
7+
<a href="https://jitpack.io/#OpenEdgn/Logger4K" target="_blank"> <img alt="JitPack" src="https://img.shields.io/jitpack/v/github/OpenEdgn/Logger4K"></a>
8+
</p>
9+
10+
[CHINESE](README.md) | ENGLISH (Google Translate)
11+
12+
`LOGGER4K` Is a lightweight `Kotlin`logging framework.
13+
14+
## Getting Started
15+
16+
This project used `Gradle ` to build coverage `Junit` test.
17+
18+
If you find a bug or comments, you can feedback under `Issues`.
19+
20+
### Add this to the project
21+
22+
> Before you start, you need to introduce the module into the project. The introduction of `Apache Maven` and `Gradle` is introduced below.
23+
24+
#### Maven & Gradle
25+
26+
##### 1. Add it to the project:
27+
28+
**Maven**
29+
30+
```xml
31+
32+
<repositories>
33+
<repository>
34+
<id>jitpack.io</id>
35+
<url>https://jitpack.io</url>
36+
</repository>
37+
</repositories>
38+
```
39+
40+
**Gradle**
41+
42+
```groovy
43+
allprojects {
44+
repositories {
45+
// ...
46+
maven { url 'https://jitpack.io' }
47+
}
48+
}
49+
```
50+
51+
##### 2. Add dependencies
52+
53+
**Maven**
54+
55+
```xml
56+
57+
<dependency>
58+
<groupId>com.github.OpenEdgn.Logger4K</groupId>
59+
<artifactId>${modName}</artifactId>
60+
<version>${version}</version>
61+
</dependency>
62+
```
63+
64+
**Gradle**
65+
66+
```groovy
67+
dependencies {
68+
implementation 'com.github.OpenEdgn.Logger4K:${modName}:${version}'
69+
}
70+
```
71+
72+
> `$ {modName}` represents the module name, and `$ {version}` represents the referenced version number.
73+
74+
version:[![JitPack](https://img.shields.io/jitpack/v/github/OpenEdgn/Logger4K?label=version&style=flat-square)](https://jitpack.io/#OpenEdgn/Logger4K)
75+
76+
### Usage
77+
78+
Basic usage of the Logger API:
79+
80+
``` kotlin
81+
val logger = getLogger () // Create a Logger object
82+
83+
84+
logger.debug ( " DEBUG Message. " )
85+
// Output DEBUG type log (note that the log will not be output if DEBUG is not enabled)
86+
87+
logger.info ( " INFO Message. " )
88+
// Output INFO type log
89+
90+
logger.warn (" WARN Message. ")
91+
// Output WARN type log
92+
93+
logger.error("ERROR Message.")
94+
// Output log of ERROR type
95+
96+
logger.debugOnly {
97+
// This code block only runs in debug mode
98+
info("INFO")
99+
warn("WARN")
100+
debug("DEBUG")
101+
error("ERROR")
102+
}
103+
104+
```
105+
106+
Please see [PrintLogger.kt](./logger-console/src/test/kotlin/PrintLogger.kt)
107+
and [LoggerMainTestAll.kt](./logger-console/src/test/kotlin/LoggerMainTestAll.kt) under `TEST` for more usage methods.
108+
109+
## LICENSE
110+
111+
SEE [LICENSE FILE](./LICENSE)

VERSION.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,33 @@
1010

1111
## 版本日志
1212

13+
### 2.2.0
14+
15+
**预览版**
16+
17+
Logger4K 2.0 来了 ✨
18+
19+
- `logger-core`
20+
- 移除旧的 `LogApi` 扫描方式,改用 Java SPI
21+
- 优化类名格式化工具类 `MaxLengthClassFormat` 输出状态
22+
- `logger-forward`
23+
- 新增 `logger-forward` 模块,用于自动转发Logger4k 日志到其他日志框架,支持:
24+
- SLF4J
25+
- Log4j
26+
- Java.Utils.Log
27+
- Android Log
28+
- `logger-console`
29+
- 未发生任何变化
30+
1331
### 2.1.0
1432

1533
**预览版**
1634

1735
Logger4K 2.0 来了 ✨
1836

1937
- 重构模块 `logger-core``logger-console`
20-
- 默认未找到实现时 `logger-core` 保持静默
21-
- `logger-console` 实现了一套简单的日志输出 (未达到生产环境标准,不建议使用)
38+
- 默认未找到实现时 `logger-core` 保持静默
39+
- `logger-console` 实现了一套简单的日志输出 (未达到生产环境标准,不建议使用)
2240

2341
### 2.0.1
2442

build.gradle.kts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,14 @@ buildscript {
77
}
88

99
dependencies {
10-
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21")
10+
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.31")
1111
}
1212
}
1313

1414
allprojects {
1515
repositories {
1616
mavenLocal()
1717
mavenCentral()
18-
maven { url = project.uri("https://jitpack.io") }
1918
}
2019
}
2120

jitpack.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
jdk:
22
- openjdk11
3-
before_install:
4-
- sdk install java 11.0.10-open
5-
- sdk use java 11.0.10-open
63
install:
74
- echo "Gradle Boot"
85
- chmod +x gradlew

logger-console/src/main/java/module-info.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
module logger4k.impl {
42
requires kotlin.stdlib;
53
requires logger4k.core;

0 commit comments

Comments
 (0)