org.springframework.context.event.ConsoleListener Maven / Gradle / Ivy
/*
* Copyright 2002-2006 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.context.event;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;
/**
* Simple listener for debug use only that logs messages
* to the console.
*
* Note: The ApplicationContext implementations included
* in the framework do quite heavy debug-level logging via
* Log4J, including published events. Thus, this listener
* isn't necessary for debug logging.
*
* @author Rod Johnson
* @since January 21, 2001
* @deprecated since Spring 1.2.7: doesn't serve any purpose
*/
public class ConsoleListener implements ApplicationListener {
public void onApplicationEvent(ApplicationEvent event) {
System.out.println(event.toString());
}
}