Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
cf5f6295
Commit
cf5f6295
authored
Feb 29, 2024
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nginxlog 写入数据库服务
parent
121ba2a6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
NginxLogServiceImpl.java
...cloud/plus/v1/nginx/service/impl/NginxLogServiceImpl.java
+1
-1
application.yml
...log/yifu-nginx-log-biz/src/main/resources/application.yml
+1
-1
No files found.
yifu-nginx-log/yifu-nginx-log-biz/src/main/java/com/yifu/cloud/plus/v1/nginx/service/impl/NginxLogServiceImpl.java
View file @
cf5f6295
...
@@ -286,7 +286,7 @@ public class NginxLogServiceImpl extends ServiceImpl<NginxLogMapper, NginxLog> i
...
@@ -286,7 +286,7 @@ public class NginxLogServiceImpl extends ServiceImpl<NginxLogMapper, NginxLog> i
try
{
try
{
// 读取JSON日志文件
// 读取JSON日志文件
//fis = new FileInputStream("C:\\nginx.log");
//fis = new FileInputStream("C:\\nginx.log");
fis
=
new
FileInputStream
(
"/root/install/nginx/logs/nginx-log"
+
DateUtil
.
dateIncreaseByHour
(
new
Date
(),
0
,
DateUtil
.
DATETIME_PATTERN_HOUR
)+
".log"
);
fis
=
new
FileInputStream
(
"/root/install/nginx/logs/nginx-log
-
"
+
DateUtil
.
dateIncreaseByHour
(
new
Date
(),
0
,
DateUtil
.
DATETIME_PATTERN_HOUR
)+
".log"
);
br
=
new
BufferedReader
(
new
InputStreamReader
(
fis
));
br
=
new
BufferedReader
(
new
InputStreamReader
(
fis
));
String
line
;
String
line
;
while
((
line
=
br
.
readLine
())
!=
null
)
{
while
((
line
=
br
.
readLine
())
!=
null
)
{
...
...
yifu-nginx-log/yifu-nginx-log-biz/src/main/resources/application.yml
View file @
cf5f6295
...
@@ -60,6 +60,6 @@ springdoc:
...
@@ -60,6 +60,6 @@ springdoc:
#按路径匹配
#按路径匹配
# pathsToMatch: /admin/**
# pathsToMatch: /admin/**
#分组名
#分组名
-
group
:
checks
-
group
:
nginx-log
#按包路径匹配
#按包路径匹配
packagesToScan
:
com.yifu.cloud.plus.v1.nginx.controller
packagesToScan
:
com.yifu.cloud.plus.v1.nginx.controller
\ 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