Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
mica
mica-mqtt
提交
2b97778e
mica-mqtt
项目概览
mica
/
mica-mqtt
通知
71
Star
1
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
mica-mqtt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
2b97778e
编写于
9月 10, 2022
作者:
如梦技术
🐛
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
✨
mica-mqtt-example 使用 tinylog。
上级
cd244119
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
53 addition
and
31 deletion
+53
-31
example/mica-mqtt-example/pom.xml
example/mica-mqtt-example/pom.xml
+27
-22
example/mica-mqtt-example/src/main/resources/log4j2.properties
...le/mica-mqtt-example/src/main/resources/log4j2.properties
+0
-9
example/mica-mqtt-example/src/main/resources/tinylog.properties
...e/mica-mqtt-example/src/main/resources/tinylog.properties
+8
-0
pom.xml
pom.xml
+18
-0
未找到文件。
example/mica-mqtt-example/pom.xml
浏览文件 @
2b97778e
...
...
@@ -14,7 +14,6 @@
</parent>
<properties>
<log4j2.version>
2.17.2
</log4j2.version>
<graalvm.version>
22.0.0.2
</graalvm.version>
<mainClass.server>
net.dreamlu.iot.mqtt.server.MqttServerTest
</mainClass.server>
<mainClass.client>
net.dreamlu.iot.mqtt.client.MqttClientTest
</mainClass.client>
...
...
@@ -37,6 +36,10 @@
</dependency>
</dependencies>
<build>
<finalName>
${project.artifactId}
</finalName>
</build>
<profiles>
<profile>
<id>
jar
</id>
...
...
@@ -50,45 +53,47 @@
<artifactId>
caffeine
</artifactId>
<version>
2.9.2
</version>
</dependency>
<!-- 非 GraalVM 环境用 log4j2 -->
<!-- 非 GraalVM 环境用 tinylog -->
<dependency>
<groupId>
org.tinylog
</groupId>
<artifactId>
slf4j-tinylog
</artifactId>
</dependency>
<dependency>
<groupId>
org.apache.logging.log4j
</groupId>
<artifactId>
log4j-slf4j-impl
</artifactId>
<version>
${log4j2.version}
</version>
<groupId>
org.tinylog
</groupId>
<artifactId>
tinylog-impl
</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-
dependency
-plugin
</artifactId>
<artifactId>
maven-
jar
-plugin
</artifactId>
<version>
3.2.0
</version>
<executions>
<execution>
<id>
copy-dependencies
</id>
<phase>
package
</phase>
<goals>
<goal>
copy-dependencies
</goal>
</goals>
<configuration>
<outputDirectory>
target/lib
</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-
jar
-plugin
</artifactId>
<version>
3.
2.0
</version>
<artifactId>
maven-
assembly
-plugin
</artifactId>
<version>
3.
1.1
</version>
<configuration>
<archive>
<manifest>
<addClasspath>
true
</addClasspath>
<classpathPrefix>
lib/
</classpathPrefix>
<mainClass>
${mainClass.server}
</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>
jar-with-dependencies
</descriptorRef>
</descriptorRefs>
<appendAssemblyId>
false
</appendAssemblyId>
</configuration>
<executions>
<execution>
<id>
make-assembly
</id>
<phase>
package
</phase>
<goals>
<goal>
single
</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
...
...
example/mica-mqtt-example/src/main/resources/log4j2.properties
已删除
100644 → 0
浏览文件 @
cd244119
log4j.rootLogger
=
DEBUG
appender.console.type
=
Console
appender.console.name
=
STDOUT
appender.console.layout.type
=
PatternLayout
appender.console.layout.pattern
=
%d [%t] %-5p %c{2} - %m%n
# debug
rootLogger.level
=
INFO
rootLogger.appenderRef.stdout.ref
=
STDOUT
example/mica-mqtt-example/src/main/resources/tinylog.properties
0 → 100644
浏览文件 @
2b97778e
writer
=
console
writer.format
=
{date: HH:mm:ss.SSS} [{thread}] {level} {class-name}.{method} : {message}
writer.level
=
info
# level
level@
org.tio
=
warn
level@
org.tio.client.TioClient
=
off
level@
org.tio.server
=
info
level@
net.dreamlu
=
info
pom.xml
浏览文件 @
2b97778e
...
...
@@ -26,6 +26,7 @@
<fastjson.version>
1.2.83
</fastjson.version>
<micrometer-core.version>
1.9.0
</micrometer-core.version>
<jfinal.version>
5.0.1
</jfinal.version>
<tinylog.version>
2.4.1
</tinylog.version>
<junit-jupiter.version>
5.8.2
</junit-jupiter.version>
<lombok.version>
1.18.24
</lombok.version>
</properties>
...
...
@@ -111,6 +112,23 @@
<artifactId>
mica-mqtt-client-spring-boot-starter
</artifactId>
<version>
${revision}
</version>
</dependency>
<!-- tinylog 内存占用更小、性能更好,适合边缘设备 -->
<dependency>
<groupId>
org.tinylog
</groupId>
<artifactId>
slf4j-tinylog
</artifactId>
<version>
${tinylog.version}
</version>
</dependency>
<dependency>
<groupId>
org.tinylog
</groupId>
<artifactId>
tinylog-impl
</artifactId>
<version>
${tinylog.version}
</version>
<exclusions>
<exclusion>
<groupId>
org.codehaus.mojo
</groupId>
<artifactId>
animal-sniffer-annotations
</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>
org.junit.jupiter
</groupId>
<artifactId>
junit-jupiter-engine
</artifactId>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录