public static class DataflowWorkerLoggingOptions.WorkerLogLevelOverride
extends java.lang.Object
java.util.logging is used on the Dataflow worker harness and supports
a logging hierarchy based off of names which are "." separated. It is a common
pattern to have the logger for a given class share the same name as the class itself.
Given the classes a.b.c.Foo, a.b.c.Xyz, and a.b.Bar, with
loggers named "a.b.c.Foo", "a.b.c.Xyz", and "a.b.Bar" respectively,
we can override the log levels:
Foo by specifying the name "a.b.c.Foo" or the Class
representing a.b.c.Foo.
Foo, Xyz, and Bar by specifying the name "a.b" or
the Package representing a.b.
Foo and Bar by specifying both of their names or classes.
| Modifier and Type | Method and Description |
|---|---|
static DataflowWorkerLoggingOptions.WorkerLogLevelOverride |
create(java.lang.String value)
Expects a value of the form
Name#Level. |
static DataflowWorkerLoggingOptions.WorkerLogLevelOverride |
forClass(java.lang.Class<?> klass,
DataflowWorkerLoggingOptions.Level level)
Overrides the default log level for the passed in class.
|
static DataflowWorkerLoggingOptions.WorkerLogLevelOverride |
forName(java.lang.String name,
DataflowWorkerLoggingOptions.Level level)
Overrides the default log level for the passed in name.
|
static DataflowWorkerLoggingOptions.WorkerLogLevelOverride |
forPackage(java.lang.Package pkg,
DataflowWorkerLoggingOptions.Level level)
Overrides the default log level for the passed in package.
|
DataflowWorkerLoggingOptions.Level |
getLevel() |
java.lang.String |
getName() |
java.lang.String |
toString() |
public static DataflowWorkerLoggingOptions.WorkerLogLevelOverride forClass(java.lang.Class<?> klass, DataflowWorkerLoggingOptions.Level level)
This is equivalent to calling #forName(String, Level) and
passing in the class name.
public static DataflowWorkerLoggingOptions.WorkerLogLevelOverride forPackage(java.lang.Package pkg, DataflowWorkerLoggingOptions.Level level)
This is equivalent to calling #forName(String, Level) and
passing in the package name.
public static DataflowWorkerLoggingOptions.WorkerLogLevelOverride forName(java.lang.String name, DataflowWorkerLoggingOptions.Level level)
Note that because of the hierarchical nature of logger names, this will override the log level of all loggers which have the passed in name or a parent logger which has the passed in name.
public static DataflowWorkerLoggingOptions.WorkerLogLevelOverride create(java.lang.String value)
Name#Level.public java.lang.String getName()
public DataflowWorkerLoggingOptions.Level getLevel()
public java.lang.String toString()
toString in class java.lang.Object