Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nnjcy-data-model
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ljb
nnjcy-data-model
Commits
19ea9fac
Commit
19ea9fac
authored
Sep 21, 2023
by
ljb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加websocket日志输出
parent
f0b8cedb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
spider-flow-web/src/main/resources/logback-spring.xml
+30
-0
No files found.
spider-flow-web/src/main/resources/logback-spring.xml
0 → 100644
View file @
19ea9fac
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<springProperty
scope=
"context"
name=
"LOG_LEVEL"
source=
"logging.level.root"
defaultValue=
"DEBUG"
/>
<springProperty
scope=
"context"
name=
"WORKSPACE"
source=
"spider.workspace"
defaultValue=
"/data/spider/logs"
/>
<!-- 控制台输出 -->
<appender
name=
"Stdout"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<encoder
class=
"ch.qos.logback.classic.encoder.PatternLayoutEncoder"
>
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<pattern>
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg %n
</pattern>
</encoder>
</appender>
<!-- 输出日志文件 -->
<appender
name=
"File"
class=
"com.zq.spiderflow.logback.SpiderFlowFileAppender"
>
<file>
${WORKSPACE}/logs/spider-flow.log
</file>
<append>
true
</append>
<encoder
class=
"ch.qos.logback.classic.encoder.PatternLayoutEncoder"
>
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<pattern>
%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %logger{50} - %msg%n
</pattern>
</encoder>
</appender>
<!-- WebSocket输出日志 -->
<appender
name=
"WebSocket"
class=
"com.zq.spiderflow.logback.SpiderFlowWebSocketAppender"
/>
<!-- 日志输出级别 -->
<root
level=
"${LOG_LEVEL}"
>
<appender-ref
ref=
"Stdout"
/>
<appender-ref
ref=
"File"
/>
<appender-ref
ref=
"WebSocket"
/>
</root>
</configuration>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment