aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkwwall <kevin.w.wall@gmail.com>2020-08-02 13:51:14 -0400
committerkwwall <kevin.w.wall@gmail.com>2020-08-02 13:51:14 -0400
commitd816d12b4f06c091fd998afe43f4b98f90f13b81 (patch)
tree72e14e5006041e2a27b8cca58b8d631cad2a6e27
parentb28c534c99d26e93d4b3ec0caac0ab847ebedb0f (diff)
downloadjava-encoder-d816d12b4f06c091fd998afe43f4b98f90f13b81.tar.gz
Change from using SLF4J to JUL for logging.
-rw-r--r--esapi/src/test/resources/.esapi/ESAPI.properties4
-rw-r--r--esapi/src/test/resources/esapi-java-logging.properties6
2 files changed, 8 insertions, 2 deletions
diff --git a/esapi/src/test/resources/.esapi/ESAPI.properties b/esapi/src/test/resources/.esapi/ESAPI.properties
index b92f991..d1d5f41 100644
--- a/esapi/src/test/resources/.esapi/ESAPI.properties
+++ b/esapi/src/test/resources/.esapi/ESAPI.properties
@@ -9,10 +9,10 @@ ESAPI.Encoder=org.owasp.encoder.esapi.ESAPIEncoder
# To use JUL, you need to obtain ESAPI's esapi-java-logging.properties and drop
# it somewhere into your class path. You can get it from the ESAPI configuration
# jar. (See Release 2.2.1.1 under GitHub for ESAPI/esapi-java-legacy.)
+ESAPI.Logger=org.owasp.esapi.logging.java.JavaLogFactory
-#ESAPI.Logger=org.owasp.esapi.logging.java.JavaLogFactory
# To use the new SLF4J logger in ESAPI (see GitHub issue #129), set
-ESAPI.Logger=org.owasp.esapi.logging.slf4j.Slf4JLogFactory
+#ESAPI.Logger=org.owasp.esapi.logging.slf4j.Slf4JLogFactory
# and do whatever other normal SLF4J configuration that you normally would do for your application.
# Note: The uncommented out ones are those needed for SLF4J. Others may be
diff --git a/esapi/src/test/resources/esapi-java-logging.properties b/esapi/src/test/resources/esapi-java-logging.properties
new file mode 100644
index 0000000..71011ac
--- /dev/null
+++ b/esapi/src/test/resources/esapi-java-logging.properties
@@ -0,0 +1,6 @@
+handlers= java.util.logging.ConsoleHandler
+.level= INFO
+java.util.logging.ConsoleHandler.level = INFO
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
+java.util.logging.SimpleFormatter.format=[%1$tF %1$tT] [%3$-7s] %5$s %n
+#https://www.logicbig.com/tutorials/core-java-tutorial/logging/customizing-default-format.html \ No newline at end of file