Package play
Interface LoggerConfigurator
-
- All Superinterfaces:
play.api.LoggerConfigurator
public interface LoggerConfigurator extends play.api.LoggerConfigurator
Runs through underlying logger configuration.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static Optional<LoggerConfigurator>
apply(ClassLoader classLoader)
void
configure(Map<String,String> properties, Optional<URL> config)
Configures the logger with a list of properties and an optional URL.default void
configure(play.api.Environment env)
default void
configure(play.api.Environment env, play.api.Configuration configuration, scala.collection.immutable.Map<String,String> optionalProperties)
void
configure(Environment env)
This is a convenience method that adds no extra properties.default void
configure(Environment env, com.typesafe.config.Config configuration)
Configures the logger with the environment and the application configuration.void
configure(Environment env, com.typesafe.config.Config configuration, Map<String,String> optionalProperties)
Configures the logger with the environment, the application configuration and additional properties.default void
configure(scala.collection.immutable.Map<String,String> properties, scala.Option<URL> config)
static Map<String,String>
generateProperties(Environment env, com.typesafe.config.Config config, Map<String,String> optionalProperties)
default void
init(File rootPath, play.api.Mode mode)
void
init(File rootPath, Mode mode)
Initialize the Logger when there's no application ClassLoader available.org.slf4j.ILoggerFactory
loggerFactory()
Returns the logger factory for the configurator.void
shutdown()
Shutdown the logger infrastructure.
-
-
-
Method Detail
-
init
void init(File rootPath, Mode mode)
Initialize the Logger when there's no application ClassLoader available.- Parameters:
rootPath
- the root pathmode
- the ode
-
init
default void init(File rootPath, play.api.Mode mode)
- Specified by:
init
in interfaceplay.api.LoggerConfigurator
-
configure
void configure(Environment env)
This is a convenience method that adds no extra properties.- Parameters:
env
- the environment.
-
configure
default void configure(play.api.Environment env)
- Specified by:
configure
in interfaceplay.api.LoggerConfigurator
-
configure
default void configure(Environment env, com.typesafe.config.Config configuration)
Configures the logger with the environment and the application configuration.This is what full applications will run, and the place to put extra properties, either through optionalProperties or by setting configuration properties and having "play.logger.includeConfigProperties=true" in the config.
- Parameters:
env
- the application environmentconfiguration
- the application's configuration
-
configure
void configure(Environment env, com.typesafe.config.Config configuration, Map<String,String> optionalProperties)
Configures the logger with the environment, the application configuration and additional properties.This is what full applications will run, and the place to put extra properties, either through optionalProperties or by setting configuration properties and having "play.logger.includeConfigProperties=true" in the config.
- Parameters:
env
- the application environmentconfiguration
- the application's configurationoptionalProperties
- any optional properties (you can use an empty Map otherwise)
-
configure
default void configure(play.api.Environment env, play.api.Configuration configuration, scala.collection.immutable.Map<String,String> optionalProperties)
- Specified by:
configure
in interfaceplay.api.LoggerConfigurator
-
configure
void configure(Map<String,String> properties, Optional<URL> config)
Configures the logger with a list of properties and an optional URL.This is the engine's entrypoint method that has all the properties pre-assembled.
- Parameters:
properties
- the propertiesconfig
- the configuration URL
-
configure
default void configure(scala.collection.immutable.Map<String,String> properties, scala.Option<URL> config)
- Specified by:
configure
in interfaceplay.api.LoggerConfigurator
-
loggerFactory
org.slf4j.ILoggerFactory loggerFactory()
Returns the logger factory for the configurator. Only safe to call after configuration.- Specified by:
loggerFactory
in interfaceplay.api.LoggerConfigurator
- Returns:
- an instance of ILoggerFactory
-
shutdown
void shutdown()
Shutdown the logger infrastructure.- Specified by:
shutdown
in interfaceplay.api.LoggerConfigurator
-
apply
static Optional<LoggerConfigurator> apply(ClassLoader classLoader)
-
-