org.mule.agent.Log4jNotificationLoggerAgent Maven / Gradle / Ivy
/*
* $Id: Log4jNotificationLoggerAgent.java 19356 2010-09-03 18:49:51Z ddossot $
* --------------------------------------------------------------------------------------
* Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com
*
* The software in this package is published under the terms of the CPAL v1.0
* license, a copy of which has been included with this distribution in the
* LICENSE.txt file.
*/
package org.mule.agent;
import java.util.HashMap;
import java.util.Map;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;
import org.apache.log4j.xml.DOMConfigurator;
import org.mule.api.context.notification.ServerNotification;
import org.mule.api.lifecycle.InitialisationException;
import org.mule.util.MapUtils;
import org.mule.util.StringUtils;
/**
* AbstractNotificationLoggerAgent
Receives Mule server notifications
* and logs them and can optionally route them to an endpoint
*/
public class Log4jNotificationLoggerAgent extends AbstractNotificationLoggerAgent
{
protected static final int DEFAULT_DESCRIPTION_BUFFER_SIZE = 64;
protected Logger eventLogger;
private String logName = Log4jNotificationLoggerAgent.class.getName();
private String logFile = null;
private String logConfigFile = null;
private String chainsawHost = "localhost";
private int chainsawPort = -1;
private final Map, ?> levelMappings = new HashMap
© 2015 - 2024 Weber Informatics LLC | Privacy Policy