Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
ghsby
o2oa
提交
9f4a7bec
o2oa
项目概览
ghsby
/
o2oa
落后 Fork 源项目 2880 个版本
Fork自
浙江兰德纵横网络技术股份有限公司 / o2oa
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
o2oa
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9f4a7bec
编写于
7月 01, 2021
作者:
Z
zhourui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改requestLogRetainDays字段
上级
a451a6c2
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
32 addition
and
1 deletion
+32
-1
o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/ApplicationServer.java
...ava/com/x/base/core/project/config/ApplicationServer.java
+9
-1
o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/CenterServer.java
...ain/java/com/x/base/core/project/config/CenterServer.java
+11
-0
o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/WebServer.java
...c/main/java/com/x/base/core/project/config/WebServer.java
+9
-0
o2server/x_console/src/main/java/com/x/server/console/server/application/ApplicationServerTools.java
...er/console/server/application/ApplicationServerTools.java
+1
-0
o2server/x_console/src/main/java/com/x/server/console/server/center/CenterServerTools.java
...com/x/server/console/server/center/CenterServerTools.java
+1
-0
o2server/x_console/src/main/java/com/x/server/console/server/web/WebServerTools.java
.../java/com/x/server/console/server/web/WebServerTools.java
+1
-0
未找到文件。
o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/ApplicationServer.java
浏览文件 @
9f4a7bec
...
...
@@ -25,6 +25,7 @@ public class ApplicationServer extends ConfigObject {
private
static
final
Integer
DEFAULT_MAXTHREAD
=
500
;
private
static
final
Boolean
DEFAULT_REQUESTLOGENABLE
=
false
;
private
static
final
String
DEFAULT_REQUESTLOGFORMAT
=
""
;
private
static
final
Integer
DEFAULT_REQUESTLOGRETAINDAYS
=
7
;
public
ApplicationServer
()
{
this
.
enable
=
true
;
...
...
@@ -44,9 +45,9 @@ public class ApplicationServer extends ConfigObject {
this
.
exposeJest
=
DEFAULT_EXPOSEJEST
;
this
.
persistentConnectionsEnable
=
DEFAULT_PERSISTENTCONNECTIONSENABLE
;
this
.
maxThread
=
DEFAULT_MAXTHREAD
;
this
.
maxThread
=
DEFAULT_MAXTHREAD
;
this
.
requestLogEnable
=
DEFAULT_REQUESTLOGENABLE
;
this
.
requestLogFormat
=
DEFAULT_REQUESTLOGFORMAT
;
this
.
requestLogRetainDays
=
DEFAULT_REQUESTLOGRETAINDAYS
;
}
@FieldDescribe
(
"是否启用"
)
...
...
@@ -85,6 +86,8 @@ public class ApplicationServer extends ConfigObject {
private
Boolean
requestLogEnable
;
@FieldDescribe
(
"访问日志记录格式."
)
private
String
requestLogFormat
;
@FieldDescribe
(
"访问日志记录天数,默认7天."
)
private
Integer
requestLogRetainDays
;
@FieldDescribe
(
"是否启用长连接,默认true."
)
private
Boolean
persistentConnectionsEnable
;
...
...
@@ -265,4 +268,9 @@ public class ApplicationServer extends ConfigObject {
return
StringUtils
.
isEmpty
(
this
.
requestLogFormat
)
?
""
:
this
.
requestLogFormat
;
}
public
Integer
getRequestLogRetainDays
()
{
return
(
null
==
this
.
requestLogRetainDays
||
this
.
requestLogRetainDays
<
1
)
?
DEFAULT_REQUESTLOGRETAINDAYS
:
this
.
requestLogRetainDays
;
}
}
o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/CenterServer.java
浏览文件 @
9f4a7bec
...
...
@@ -13,6 +13,8 @@ import com.x.base.core.project.tools.DefaultCharset;
public
class
CenterServer
extends
ConfigObject
{
private
static
final
long
serialVersionUID
=
8147826320846595611L
;
private
static
final
Boolean
DEFAULT_ENABLE
=
true
;
private
static
final
Integer
DEFAULT_PORT
=
20030
;
private
static
final
Integer
DEFAULT_SCANINTERVAL
=
0
;
...
...
@@ -25,6 +27,7 @@ public class CenterServer extends ConfigObject {
private
static
final
Boolean
DEFAULT_PERSISTENTCONNECTIONSENABLE
=
true
;
private
static
final
Boolean
DEFAULT_REQUESTLOGENABLE
=
false
;
private
static
final
String
DEFAULT_REQUESTLOGFORMAT
=
""
;
private
static
final
Integer
DEFAULT_REQUESTLOGRETAINDAYS
=
7
;
public
static
CenterServer
defaultInstance
()
{
return
new
CenterServer
();
...
...
@@ -48,6 +51,7 @@ public class CenterServer extends ConfigObject {
this
.
persistentConnectionsEnable
=
DEFAULT_PERSISTENTCONNECTIONSENABLE
;
this
.
requestLogEnable
=
DEFAULT_REQUESTLOGENABLE
;
this
.
requestLogFormat
=
DEFAULT_REQUESTLOGFORMAT
;
this
.
requestLogRetainDays
=
DEFAULT_REQUESTLOGRETAINDAYS
;
}
@FieldDescribe
(
"是否启用"
)
...
...
@@ -84,6 +88,8 @@ public class CenterServer extends ConfigObject {
private
Boolean
requestLogEnable
;
@FieldDescribe
(
"访问日志记录格式."
)
private
String
requestLogFormat
;
@FieldDescribe
(
"访问日志记录天数,默认7天."
)
private
Integer
requestLogRetainDays
;
@FieldDescribe
(
"是否启用长连接,默认false."
)
private
Boolean
persistentConnectionsEnable
;
...
...
@@ -210,4 +216,9 @@ public class CenterServer extends ConfigObject {
return
StringUtils
.
isEmpty
(
this
.
requestLogFormat
)
?
""
:
this
.
requestLogFormat
;
}
public
Integer
getRequestLogRetainDays
()
{
return
(
null
==
this
.
requestLogRetainDays
||
this
.
requestLogRetainDays
<
1
)
?
DEFAULT_REQUESTLOGRETAINDAYS
:
this
.
requestLogRetainDays
;
}
}
o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/WebServer.java
浏览文件 @
9f4a7bec
...
...
@@ -27,6 +27,7 @@ public class WebServer extends ConfigObject {
this
.
persistentConnectionsEnable
=
DEFAULT_PERSISTENTCONNECTIONSENABLE
;
this
.
requestLogEnable
=
DEFAULT_REQUESTLOGENABLE
;
this
.
requestLogFormat
=
DEFAULT_REQUESTLOGFORMAT
;
this
.
requestLogRetainDays
=
DEFAULT_REQUESTLOGRETAINDAYS
;
}
private
static
final
Integer
DEFAULT_HTTP_PORT
=
80
;
...
...
@@ -41,6 +42,7 @@ public class WebServer extends ConfigObject {
private
static
final
Boolean
DEFAULT_PERSISTENTCONNECTIONSENABLE
=
true
;
private
static
final
Boolean
DEFAULT_REQUESTLOGENABLE
=
false
;
private
static
final
String
DEFAULT_REQUESTLOGFORMAT
=
""
;
private
static
final
Integer
DEFAULT_REQUESTLOGRETAINDAYS
=
7
;
@FieldDescribe
(
"是否启用"
)
private
Boolean
enable
;
...
...
@@ -76,6 +78,8 @@ public class WebServer extends ConfigObject {
private
Boolean
requestLogEnable
;
@FieldDescribe
(
"访问日志记录格式."
)
private
String
requestLogFormat
;
@FieldDescribe
(
"访问日志记录天数,默认7天."
)
private
Integer
requestLogRetainDays
;
public
Boolean
getPersistentConnectionsEnable
()
{
return
persistentConnectionsEnable
==
null
?
DEFAULT_PERSISTENTCONNECTIONSENABLE
...
...
@@ -189,4 +193,9 @@ public class WebServer extends ConfigObject {
return
StringUtils
.
isEmpty
(
this
.
requestLogFormat
)
?
""
:
this
.
requestLogFormat
;
}
public
Integer
getRequestLogRetainDays
()
{
return
(
null
==
this
.
requestLogRetainDays
||
this
.
requestLogRetainDays
<
1
)
?
DEFAULT_REQUESTLOGRETAINDAYS
:
this
.
requestLogRetainDays
;
}
}
o2server/x_console/src/main/java/com/x/server/console/server/application/ApplicationServerTools.java
浏览文件 @
9f4a7bec
...
...
@@ -163,6 +163,7 @@ public class ApplicationServerTools extends JettySeverTools {
AsyncRequestLogWriter
asyncRequestLogWriter
=
new
AsyncRequestLogWriter
();
asyncRequestLogWriter
.
setFilenameDateFormat
(
"yyyy_MM_dd"
);
asyncRequestLogWriter
.
setAppend
(
true
);
asyncRequestLogWriter
.
setRetainDays
(
applicationServer
.
getRequestLogRetainDays
());
asyncRequestLogWriter
.
setFilename
(
Config
.
dir_logs
().
toString
()
+
File
.
separator
+
"yyyy_MM_dd."
+
Config
.
node
()
+
".application.request.log"
);
String
format
=
"%{client}a - %u %{yyyy-MM-dd HH:mm:ss.SSS ZZZ|"
+
DateFormatUtils
.
format
(
new
Date
(),
"z"
)
...
...
o2server/x_console/src/main/java/com/x/server/console/server/center/CenterServerTools.java
浏览文件 @
9f4a7bec
...
...
@@ -125,6 +125,7 @@ public class CenterServerTools extends JettySeverTools {
AsyncRequestLogWriter
asyncRequestLogWriter
=
new
AsyncRequestLogWriter
();
asyncRequestLogWriter
.
setFilenameDateFormat
(
"yyyy_MM_dd"
);
asyncRequestLogWriter
.
setAppend
(
true
);
asyncRequestLogWriter
.
setRetainDays
(
centerServer
.
getRequestLogRetainDays
());
asyncRequestLogWriter
.
setFilename
(
Config
.
dir_logs
().
toString
()
+
File
.
separator
+
"yyyy_MM_dd."
+
Config
.
node
()
+
".center.request.log"
);
String
format
=
"%{client}a - %u %{yyyy-MM-dd HH:mm:ss.SSS ZZZ|"
+
DateFormatUtils
.
format
(
new
Date
(),
"z"
)
...
...
o2server/x_console/src/main/java/com/x/server/console/server/web/WebServerTools.java
浏览文件 @
9f4a7bec
...
...
@@ -130,6 +130,7 @@ public class WebServerTools extends JettySeverTools {
AsyncRequestLogWriter
asyncRequestLogWriter
=
new
AsyncRequestLogWriter
();
asyncRequestLogWriter
.
setFilenameDateFormat
(
"yyyy_MM_dd"
);
asyncRequestLogWriter
.
setAppend
(
true
);
asyncRequestLogWriter
.
setRetainDays
(
webServer
.
getRequestLogRetainDays
());
asyncRequestLogWriter
.
setFilename
(
Config
.
dir_logs
().
toString
()
+
File
.
separator
+
"yyyy_MM_dd."
+
Config
.
node
()
+
".web.request.log"
);
String
format
=
"%{client}a - %u %{yyyy-MM-dd HH:mm:ss.SSS ZZZ|"
+
DateFormatUtils
.
format
(
new
Date
(),
"z"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录