return LOG_Q;
}
protected Mediator createSpecificMediator(OMElement elem, Properties properties) {
LogMediator logMediator = new LogMediator();
// after successfully creating the mediator
// set its common attributes such as tracing etc
processAuditStatus(logMediator,elem);
// Set the high level set of properties to be logged (i.e. log level)
OMAttribute level = elem.getAttribute(ATT_LEVEL);
if (level != null) {
String levelstr = level.getAttributeValue();
if (SIMPLE.equals(levelstr)) {
logMediator.setLogLevel(LogMediator.SIMPLE);
} else if (HEADERS.equals(levelstr)) {
logMediator.setLogLevel(LogMediator.HEADERS);
} else if (FULL.equals(levelstr)) {
logMediator.setLogLevel(LogMediator.FULL);
} else if (CUSTOM.equals(levelstr)) {
logMediator.setLogLevel(LogMediator.CUSTOM);
}
}
// Set the log statement category (i.e. INFO, DEBUG, etc..)
OMAttribute category = elem.getAttribute(ATT_CATEGORY);
if (category != null) {
String catstr = category.getAttributeValue().trim().toUpperCase();
if (CAT_INFO.equals(catstr)) {
logMediator.setCategory(LogMediator.CATEGORY_INFO);
} else if (CAT_TRACE.equals(catstr)) {
logMediator.setCategory(LogMediator.CATEGORY_TRACE);
} else if (CAT_DEBUG.equals(catstr)) {
logMediator.setCategory(LogMediator.CATEGORY_DEBUG);
} else if (CAT_WARN.equals(catstr)) {
logMediator.setCategory(LogMediator.CATEGORY_WARN);
} else if (CAT_ERROR.equals(catstr)) {
logMediator.setCategory(LogMediator.CATEGORY_ERROR);
} else if (CAT_FATAL.equals(catstr)) {
logMediator.setCategory(LogMediator.CATEGORY_FATAL);
} else {
handleException("Invalid log category. Category has to be one of " +
"the following : INFO, TRACE, DEBUG, WARN, ERROR, FATAL");
}
}
// check if a custom separator has been supplied, if so use it
OMAttribute separator = elem.getAttribute(ATT_SEPERATOR);
if (separator != null) {
logMediator.setSeparator(separator.getAttributeValue());
}
logMediator.addAllProperties(MediatorPropertyFactory.getMediatorProperties(elem));
return logMediator;
}