Commit 98a7360a authored by fangxinjiang's avatar fangxinjiang

nginxlog 写入数据库服务

parent 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("/app/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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment