if (null == moduleManager) {
// not initialized yet => can't proceed
return;
}
final P6SpyOptions opts = moduleManager.getOptions(P6SpyOptions.class);
logger = opts.getAppenderInstance();
if (logger != null) {
if (logger instanceof FileLogger) {
final String logfile = opts.getLogfile();
((FileLogger) logger).setLogfile(logfile);
}
if (logger instanceof FormattedLogger) {
final MessageFormattingStrategy strategy = opts.getLogMessageFormatInstance();
if (strategy != null) {
((FormattedLogger) logger).setStrategy(strategy);
}
}
}