From af70a208702df2d178bd1f57f6739e6b07d36b66 Mon Sep 17 00:00:00 2001 From: Yuli Shlosberg Date: Tue, 25 Sep 2018 17:16:48 +0300 Subject: fix security violation Change-Id: I78adf42e6a328e782b4db394fa1a90c17bea9f17 Issue-ID: SDC-1725 Signed-off-by: Yuli Shlosberg --- .../sdc-simulator/files/default/log4j.properties | 26 ++++++++++++++++++++++ .../recipes/SDC_Simulator_3_logback.rb | 7 +++--- 2 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/files/default/log4j.properties (limited to 'utils/webseal-simulator/sdc-simulator/chef-repo') diff --git a/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/files/default/log4j.properties b/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/files/default/log4j.properties new file mode 100644 index 0000000000..4bf9084d14 --- /dev/null +++ b/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/files/default/log4j.properties @@ -0,0 +1,26 @@ +# Define the root logger with appender file +log4j.rootLogger = INFO, FILE, stdout + +# Define the file appender +log4j.appender.FILE=org.apache.log4j.RollingFileAppender +log4j.appender.FILE.File=logs/ws-log.out + +# Define the layout for file appender +log4j.appender.FILE.layout=org.apache.log4j.PatternLayout +log4j.appender.FILE.layout.conversionPattern=%d{yyyy-MM-dd HH:mm:ss} %5p [%10c] : %m%n + +# Set the maximum file size before rollover +log4j.appender.FILE.maxFileSize=5MB + +# Set the the backup index +log4j.appender.FILE.maxBackupIndex=10 + + +############################################################# + +# Direct log messages to stdout +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.Target=System.out +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +#log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n +log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %5p %10c:%L - %m%n diff --git a/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_3_logback.rb b/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_3_logback.rb index 0d9282b28a..7a2069ddfb 100644 --- a/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_3_logback.rb +++ b/utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_3_logback.rb @@ -1,9 +1,8 @@ jetty_base="/var/lib/jetty" - -cookbook_file "logback.xml" do - path "#{jetty_base}/config/sdc-simulator/logback.xml" - source "logback.xml" +cookbook_file "log4j.properties" do + path "#{jetty_base}/config/sdc-simulator/log4j.properties" + source "log4j.properties" owner "jetty" group "jetty" mode "0755" -- cgit 1.2.3-korg