diff --git a/ansible/roles/certstore/files/zlog.conf b/ansible/roles/certstore/files/zlog.conf new file mode 100644 index 00000000..39c4f10a --- /dev/null +++ b/ansible/roles/certstore/files/zlog.conf @@ -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 \ No newline at end of file diff --git a/ansible/roles/certstore/tasks/main.yml b/ansible/roles/certstore/tasks/main.yml index de9ffefd..171aa68e 100644 --- a/ansible/roles/certstore/tasks/main.yml +++ b/ansible/roles/certstore/tasks/main.yml @@ -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: diff --git a/ansible/roles/sapp/files/sapp_log.conf b/ansible/roles/sapp/files/sapp_log.conf new file mode 100644 index 00000000..df2e63ce --- /dev/null +++ b/ansible/roles/sapp/files/sapp_log.conf @@ -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 diff --git a/ansible/roles/sapp/tasks/main.yml b/ansible/roles/sapp/tasks/main.yml index c63ce749..bfb72b39 100644 --- a/ansible/roles/sapp/tasks/main.yml +++ b/ansible/roles/sapp/tasks/main.yml @@ -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 }}" diff --git a/ansible/roles/tfe/files/zlog.conf b/ansible/roles/tfe/files/zlog.conf new file mode 100644 index 00000000..859a9efa --- /dev/null +++ b/ansible/roles/tfe/files/zlog.conf @@ -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 \ No newline at end of file diff --git a/ansible/roles/tfe/tasks/main.yml b/ansible/roles/tfe/tasks/main.yml index 632eec4d..372077e4 100644 --- a/ansible/roles/tfe/tasks/main.yml +++ b/ansible/roles/tfe/tasks/main.yml @@ -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: