메소드 | 설명 | |
---|---|---|
HighestLevel ( ) : Level |
Returns the highest level as given in Level enum.
|
|
IntToLevel ( int i ) : Level |
Converts a number to a level. Each level is associated with a value. If the number is equal to or lower than a level, but higher than the previous level, than that level is used. So if: TRACE = 1000, DEBUG = 2000, INFO = 3000, WARN = 4000, ERROR = 5000, FATAL = 6000 And the number is: 2500, than this method returns INFO. If the number is greater than FATAL (highest level), than FATAL is returned. If the number is lower than TRACE, than TRACE is returned. This method assumes that the Level enum is sorted by value!
|
|
LevelNumber ( string level ) : int |
Determines the numeric value of a level. If level is a number, returns the number. If level is a predefined level name, returns number corresponding to that level. Otherwise throws exception.
|
|
NamedLevels ( ) : string |
Returns a string with all named levels, separated by | This is used by the web site project.
|
|
ParseLevel ( string levelString ) : Level? |
Parses a string with the name or value of a level.
|
|
PredefinedName ( string level ) : string |
Returns the friendly name of the given level if possible. If level is a number matching one of the predefined levels, that level's name is returned. Otherwise, level is returned.
|
|
ValidateLevel ( string level ) : void |
Throws exception if level is not a valid level.
|
public static ParseLevel ( string levelString ) : Level? | ||
levelString | string | |
리턴 | Level? |
public static PredefinedName ( string level ) : string | ||
level | string | |
리턴 | string |