public class LoggingEnvironment extends BaseEnvironment implements org.junit.rules.TestRule, LoggingEnvironment
| Modifier and Type | Class and Description |
|---|---|
static class |
LoggingEnvironment.Type |
| Modifier and Type | Field and Description |
|---|---|
static LoggingEnvironment.Type |
DEFAULT_TYPE |
| Constructor and Description |
|---|
LoggingEnvironment() |
LoggingEnvironment(java.lang.Class<?> clazz) |
LoggingEnvironment(java.lang.Class<?> clazz,
LoggingEnvironment.Type type) |
LoggingEnvironment(LoggingEnvironment.Type type) |
LoggingEnvironment(LoggingEnvironmentConfiguration configuration) |
LoggingEnvironment(java.lang.Object object) |
LoggingEnvironment(java.lang.Object object,
LoggingEnvironment.Type type) |
| Modifier and Type | Method and Description |
|---|---|
org.junit.runners.model.Statement |
apply(org.junit.runners.model.Statement base,
org.junit.runner.Description description) |
void |
close() |
protected java.lang.String |
configurationFileFor(java.lang.Class<?> clazz,
java.lang.String fileNameSuffixOfClasses,
java.lang.String fileNameInPackage,
java.lang.String defaultConfigurationFile) |
protected LoggingEnvironmentConfiguration |
configurationFor(java.lang.Class<?> clazz,
LoggingEnvironment.Type type) |
Logger |
getLogger(java.lang.Class<?> reference) |
Logger |
getLogger(java.lang.String name) |
protected java.lang.Class<?> |
getReference()
Deprecated.
DO NOT USE! This is only for backwards capability of
LogEnvironment. |
void |
init() |
protected LoggingEnvironmentConfiguration |
log4J2ConfigurationFor(java.lang.Class<?> clazz) |
protected LoggingEnvironmentConfiguration |
log4jConfigurationFor(java.lang.Class<?> clazz) |
protected LoggingEnvironmentConfiguration |
logbackConfigurationFor(java.lang.Class<?> clazz) |
findFileFor, findFileFor, findTopFromCallStack, getFileNameOfClass, getFileNameOfPackage, getParentPackageNamepublic static final LoggingEnvironment.Type DEFAULT_TYPE
public LoggingEnvironment(@Nonnull
LoggingEnvironmentConfiguration configuration)
public LoggingEnvironment()
public LoggingEnvironment(@Nullable
LoggingEnvironment.Type type)
public LoggingEnvironment(@Nonnull
java.lang.Object object)
public LoggingEnvironment(@Nonnull
java.lang.Object object,
@Nullable
LoggingEnvironment.Type type)
public LoggingEnvironment(@Nullable
java.lang.Class<?> clazz)
public LoggingEnvironment(@Nullable
java.lang.Class<?> clazz,
@Nullable
LoggingEnvironment.Type type)
@Nonnull protected LoggingEnvironmentConfiguration configurationFor(@Nonnull java.lang.Class<?> clazz, @Nullable LoggingEnvironment.Type type)
@Nonnull protected LoggingEnvironmentConfiguration log4jConfigurationFor(@Nonnull java.lang.Class<?> clazz)
@Nonnull protected LoggingEnvironmentConfiguration log4J2ConfigurationFor(@Nonnull java.lang.Class<?> clazz)
@Nonnull protected LoggingEnvironmentConfiguration logbackConfigurationFor(@Nonnull java.lang.Class<?> clazz)
@Nonnull
protected java.lang.String configurationFileFor(@Nonnull
java.lang.Class<?> clazz,
@Nonnull
java.lang.String fileNameSuffixOfClasses,
@Nonnull
java.lang.String fileNameInPackage,
@Nonnull
java.lang.String defaultConfigurationFile)
public void init()
public void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablepublic org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base,
org.junit.runner.Description description)
apply in interface org.junit.rules.TestRule@Nonnull public Logger getLogger(@Nonnull java.lang.String name)
getLogger in interface LoggingEnvironment@Nonnull public Logger getLogger(@Nonnull java.lang.Class<?> reference)
getLogger in interface LoggingEnvironment@Nullable @Deprecated protected java.lang.Class<?> getReference()
LogEnvironment.Copyright © 2015 echocat. All Rights Reserved.