Skip to content

Commit 9c09dd0

Browse files
Re-adding ErrorJavaLevel class
Resurrecting class from history for proper deprecation workflow.
1 parent 1fb2d6c commit 9c09dd0

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
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+
}

0 commit comments

Comments
 (0)