Map<String, String> property =
(Map<String, String>) handback;
if (property == null)
return;
String recordevent = null;;
recordevent = (String)property.get(RECORD_EVENT_KEY);
if (recordevent == null)
return;
boolean recordEvent = false;
if (recordevent != null){
recordEvent = Boolean.valueOf(recordevent);
if(recordEvent){
try{
StringBuffer message =
new StringBuffer(localStrings.
getString("logMgmtEventsNotificationListener.prefix"));
String eventType = (String)property.get(EVENT_TYPE_KEY);
if (eventType != null){
message.append (eventType);
message.append (":");
}
String logLevel = (String) property.get(RECORD_LOG_LEVEL_KEY);
if(logLevel == null){
logLevel = Level.FINE.toString();
}
message.append (logLevel);
message.append (":");
Level level = Level.parse(logLevel);
String description = (String) property.get(EVENT_DESCRIPTION_KEY);
if (description != null){
message.append (description);
message.append (":");
}
_logger.log(level, message.toString());
} catch (IllegalArgumentException iae) {
_logger.log(Level.FINE, "Incorrect Log Level set for event. Cannot log event ", iae);
iae.printStackTrace();
} catch (NullPointerException npe){
_logger.log(Level.FINE, "Incorrect Log Level set for event. Cannot log event ", npe);
npe.printStackTrace();
}
}
}