aboutsummaryrefslogtreecommitdiffstats
path: root/utils/webseal-simulator/sdc-simulator/chef-repo
diff options
context:
space:
mode:
authorYuli Shlosberg <ys9693@att.com>2018-09-25 17:16:48 +0300
committerMichael Lando <michael.lando@intl.att.com>2018-10-02 11:27:35 +0000
commitaf70a208702df2d178bd1f57f6739e6b07d36b66 (patch)
tree4bc79bcd2adb977d1f3d205771dcf9f6563a1488 /utils/webseal-simulator/sdc-simulator/chef-repo
parentde7a7a210781703033b112e0914143262141f3e3 (diff)
fix security violation
Change-Id: I78adf42e6a328e782b4db394fa1a90c17bea9f17 Issue-ID: SDC-1725 Signed-off-by: Yuli Shlosberg <ys9693@att.com>
Diffstat (limited to 'utils/webseal-simulator/sdc-simulator/chef-repo')
-rw-r--r--utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/files/default/log4j.properties26
-rw-r--r--utils/webseal-simulator/sdc-simulator/chef-repo/cookbooks/sdc-simulator/recipes/SDC_Simulator_3_logback.rb7
2 files changed, 29 insertions, 4 deletions
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"