@Override protected Component createComponent() { Component component = super.createComponent(); // a bit more configuration by initParams LogService log = component.getLogService(); // allow access to the LogService in the application via the context component.getContext().getAttributes().put(LogService.class.getName(), log); // modify the logger name String loggerName = getInitParameter(LOGGER_NAME_ATTRIBUTE, LOGGER_NAME_ATTRIBUTE_DEFAULT_VALUE); log.setLoggerName(loggerName); // modify the logger pattern // note: overridden to be smaller than the restlet default value log.setResponseLogFormat(getInitParameter(LOGGER_FORMAT_ATTRIBUTE, LOGGER_FORMAT_ATTRIBUTE_DEFAULT_VALUE)); return component; } }
getLogService().setLoggerName(item.getNodeValue());
getComponent().getLogService().setLoggerName( item.getNodeValue());
getLogService().setLoggerName("MailServer.AccessLog"); getLogService() .setLogPropertiesRef(
getLogService().setLoggerName("MailServer.AccessLog"); getLogService() .setLogPropertiesRef(
getLogService().setLoggerName("MailServer.AccessLog"); getLogService() .setLogPropertiesRef(