nl.cloudfarming.client.logging.AppLogFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of logging Show documentation
Show all versions of logging Show documentation
AgroSense logging module, contains a log TopComponent and an extention of the java.util.Logger (AppLogger) which logs to that log window
/**
* Copyright (C) 2010 Cloudfarming
*
* Licensed under the Eclipse Public License - v 1.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.eclipse.org/legal/epl-v10.html
*
* 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 nl.cloudfarming.client.logging;
import java.util.logging.Level;
/**
*
* @author Timon Veenstra
*/
public class AppLogFactory {
private AppLogFactory(){}
public static AppLogger getLogger(Class clazz){
AppLogger logger = new AppLogger(clazz.getName(), clazz);
logger.addHandler(LogController.getInstance());
logger.addHandler(SystemLogController.getInstance());
logger.setLevel(Level.ALL);
return logger ;
}
}