File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed
src/main/java/org/owasp/esapi/logging/java Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ /**
2+ * OWASP Enterprise Security API (ESAPI)
3+ *
4+ * This file is part of the Open Web Application Security Project (OWASP)
5+ * Enterprise Security API (ESAPI) project. For details, please see
6+ * <a href="http://www.owasp.org/index.php/ESAPI">http://www.owasp.org/index.php/ESAPI</a>.
7+ *
8+ * Copyright (c) 2007 - The OWASP Foundation
9+ *
10+ * The ESAPI is published by OWASP under the BSD license. You should read and accept the
11+ * LICENSE before you use, modify, and/or redistribute this software.
12+ *
13+ * @created 2019
14+ */
15+
16+ package org .owasp .esapi .logging .java ;
17+
18+ import java .util .logging .Level ;
19+
20+ /**
21+ * A custom logging level defined between Level.SEVERE and Level.WARNING in logger.
22+ */
23+ public class ESAPIErrorJavaLevel extends Level {
24+
25+ protected static final long serialVersionUID = 1L ;
26+
27+ /**
28+ * Defines a custom error level below SEVERE but above WARNING since this level isn't defined directly
29+ * by java.util.Logger already.
30+ */
31+ public static final Level ERROR_LEVEL = new ESAPIErrorJavaLevel ( "ERROR" , Level .SEVERE .intValue () - 1 );
32+
33+ /**
34+ * Constructs an instance of a JavaLoggerLevel which essentially provides a mapping between the name of
35+ * the defined level and its numeric value.
36+ *
37+ * @param name The name of the JavaLoggerLevel
38+ * @param value The associated numeric value
39+ */
40+ private ESAPIErrorJavaLevel (String name , int value ) {
41+ super (name , value );
42+ }
43+ }
You can’t perform that action at this time.
0 commit comments