feature:TSG-X-0906环境下应用fatal日志输出到标准输出

This commit is contained in:
fumingwei
2022-07-07 15:55:15 +08:00
parent 1f4d3a2c3c
commit 1db1146f09
6 changed files with 82 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
[global]
default format = "%d(%c), %V, %F, %U, %m%n"
rotate lock file = /tmp/certstore_zlog.lock
file perms = 644
[levels]
DEBUG=10
INFO=20
FATAL=30
[formats]
stdoutfatal = "%c %d(%c), %V, %F, %U, %m%n"
[rules]
*.fatal "./logs/error.log.%d(%F)";
*.fatal "./logs/certstore.log.%d(%F)";
*.fatal >stdout; stdoutfatal

View File

@@ -95,6 +95,13 @@
replace: 'daemonize no'
when: runtime_env == 'TSG-X-P0906' and PROFILE_ID == 'TSG-X-NXR620G40-R01-P0906-certstore'
- name: "copy zlog.conf to dest"
copy:
src: "{{ role_path }}/files/zlog.conf"
dest: /opt/tsg/certstore/conf/
when:
- runtime_env == 'TSG-X-P0906'
##################### certstore #####################
- name: "systemctl daemon-reload"
systemd:

View File

@@ -0,0 +1,20 @@
[global]
default format = "%d(%c), %V, %U, %m%n"
rotate lock file = /tmp/sapp_zlog.lock
file perms = 644
[levels]
DEBUG=10
INFO=20
FATAL=30
STOP=40
[formats]
other = "%d(%c), %V, %F, %U, %m%n"
stdoutfatal = "%c %d(%c), %V, %F, %U, %m%n"
plugin = "%d(%c), %m%n"
[rules]
__log_runtimelog.fatal "./log/runtimelog.%d(%F)"
__log_runtimelog_plugin.fatal >stdout; plugin
__log_runtimelog_plugin.info "./log/plugin.log.%d(%F)"; plugin
__tsglog_app_sketch_local_app_sketch_local.stop "./log/%c.%d(%F)"; other
!.fatal "./log/%c.%d(%F)"; other
*.fatal >stdout; stdoutfatal

View File

@@ -184,6 +184,13 @@
when:
- runtime_env == 'TSG-7400-mcn0'
- name: "copy zlog.conf to dest"
copy:
src: "{{ role_path }}/files/sapp_log.conf"
dest: /opt/tsg/sapp/etc/
when:
- runtime_env == 'TSG-X-P0906'
- name: "replace action: replace service WantedBy from multi-user.target to workload.target"
replace:
path: "{{ item }}"

View File

@@ -0,0 +1,27 @@
# kill -s SIGHUP "pid"
[global]
default format = "%d(%c), %V, %F, %U, %m%n"
rotate lock file = /tmp/tfe_zlog.lock
file perms = 644
[levels]
DEBUG=10
INFO=20
FATAL=30
#DISABLE=40
[formats]
stdoutfatal = "%c %d(%c), %V, %F, %U, %m%n"
[rules]
*.fatal "./log/error.log.%d(%F)";
tfe.fatal "./log/tfe.log.%d(%F)";
http.fatal "./log/http.log.%d(%F)";
http2.fatal "./log/http2.log.%d(%F)";
doh.fatal "./log/doh_pxy.log.%d(%F)";
pangu.fatal "./log/pangu_pxy.log.%d(%F)";
*.fatal >stdout; stdoutfatal

View File

@@ -131,6 +131,13 @@
- {src: "tfe-env-start.sh.j2", dest: "tfe-env-start.sh" }
- {src: "tfe-env-stop.sh.j2", dest: "tfe-env-stop.sh" }
- name: "copy zlog.conf to dest"
copy:
src: "{{ role_path }}/files/zlog.conf"
dest: /opt/tsg/tfe/conf/tfe/
when:
- runtime_env == 'TSG-X-P0906'
##################### tfe #####################
- name: "systemctl daemon-reload"
systemd: