All Downloads are FREE. Search and download functionalities are using the official Maven repository.

nl.cloudfarming.client.logging.AppLogFactory Maven / Gradle / Ivy

Go to download

AgroSense logging module, contains a log TopComponent and an extention of the java.util.Logger (AppLogger) which logs to that log window

There is a newer version: 13.03-beta
Show newest version
/**
 * 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 ;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy