org.as2lib.core.BasicInterface +--org.as2lib.env.log.LoggerRepository
LoggerRepository
is used to obtain Logger
instances.
What logger instances are returned and how they are organized depends on the specific implementation.
There are simple implementations that just always returns instances of the same class that are configured with the passed-in name.
Other implementations organize the loggers in a more complex way like in a hierarchy.
All implementations have their strengths and weaknesses. In most cases you
have to decide between performance and functionality, like ease of configuration.
Take a look at the org.as2lib.env.log.repository
package on what logger
repositories are supported.
When working with logger repositories you normally store them in the log manager using the static LogManager#setLoggerRepository method. You can then use the static LogManager#getLogger method to obtain loggers from the set repository.
public function getLogger(name:String):Logger
Returns a pre-configured logger for the passed-in name
.
The implementation of this method can be simple and only return new logger instances or complex and structuring the loggers in a hierarchy. Thus invoking this method can be very fast or not that fast. So it is proposed to store the received logger by yourself.
name | the name of the logger to return |
a specific logger depending on the passed-in name