@MinDoc(copyright="Copyright 2021 A. Weinert", author="Albrecht Weinert", version="V.42", lastModified="1.05.2021", usage="use the basic services", purpose="replace AppHelper\' verbosity") public enum Verbosity extends Enum<Verbosity>
AppHelper
. And it breaks the almost three decades tradition of
higher numerical values meaning more silent.
weinert-automation.de a-weinert.de
/ / /\
/ /___ / \ |
\ /____\ /____\ | _|__
\ /\ / \ / \| |
\/ \/ \__/ \__/|_
Enum Constant and Description |
---|
DEBUG
Search faults or programming errors, commissioning mode.
|
ERROR
Only report unusual incidents.
|
NORMAL
Standard report level, normal mode.
|
SILENT
Say almost nothing.
|
TEST
Finer reports, test/simulate mode.
|
VERBOSE
Detailed (verbose) reports.
|
Modifier and Type | Field and Description |
---|---|
static Action[] |
LEVEL_CHOOSE
Action list for report level.
|
String |
name
The name of this Verbosity.
|
int |
tradVal
The traditional (1999) value for this Verbosity.
|
int |
val
The normal (ascending, 2021) value for this Verbosity.
|
boolean |
verbose
Its verbose (or more).
|
Modifier and Type | Method and Description |
---|---|
static Verbosity |
byValue(int value)
Get verbosity by value.
|
static Verbosity |
getVerbosity(String verbosity)
Determine report level from text.
|
Level |
getVerbosityLevel()
Logging API's level by integer detailedness.
|
boolean |
isDebug()
All reports — for test and debugging.
|
boolean |
isNormal()
Do the normal reports.
|
boolean |
isSilent()
Almost no reports.
|
boolean |
isTest()
Many reports — for testing.
|
boolean |
isVerbose()
Report detailedness of this application.
|
String |
toString()
Detailedness of reports or logging.
|
static Verbosity |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Verbosity[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Verbosity SILENT
public static final Verbosity ERROR
public static final Verbosity NORMAL
public static final Verbosity VERBOSE
public static final Verbosity TEST
public static final Verbosity DEBUG
public final String name
public final int tradVal
public final int val
public final boolean verbose
public static final Action[] LEVEL_CHOOSE
#getVerbosityAsString(int)
.public static Verbosity[] values()
for (Verbosity c : Verbosity.values()) System.out.println(c);
public static Verbosity valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic Level getVerbosityLevel()
App.setVerbosity(int)
public final String toString()
val (trad) | name | description | logging API name |
---|---|---|---|
60 (300) | debug | test, debug and commissioning reports | FINEST |
50 (400) | test | commissioning and some tests | FINER |
40 (500) | verbose | single agent (normal) state changes and events | FINE |
30 (700) | normal | configuration / plant state changes and events, start up and shut down | CONFIG |
20 (900) | error | only errors and failures | WARNING |
10 (1000) | silent | no reports, except catastrophic | SEVERE |
toString
in class Enum<Verbosity>
verbosity
- level 300..1000App.setVerbosity(int)
,
Level
public static final Verbosity byValue(int value)
public final boolean isTest()
isVerbose()
,
isSilent()
,
isNormal()
,
#getVerbosity()
public final boolean isDebug()
isVerbose()
,
isSilent()
,
isNormal()
,
#getVerbosity()
public final boolean isVerbose()
verbose
public final boolean isSilent()
SILENT
isVerbose()
,
isNormal()
public final boolean isNormal()
isVerbose()
,
isSilent()
public static Verbosity getVerbosity(String verbosity)
#getVerbosityAsString(int)
are recognised.verbosity
- key word or number#getVerbosityAsString(int)
,
Action.select(Action[], de.frame4j.util.Action.Filter, CharSequence, boolean)