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

com.github.javaclub.configcenter.client.util.LogUtil Maven / Gradle / Ivy

There is a newer version: 2.2.0
Show newest version
package com.github.javaclub.configcenter.client.util;

import java.io.IOException;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


public class LogUtil {
	
	private static final Logger logger = LoggerFactory.getLogger("cfg-client");
	
	static {
		try {
			init();
		} catch (Exception e) {
		}
	}
	private static  void init() throws IOException{
		/*PatternLayout layout = new PatternLayout();
		layout.setConversionPattern("%d %-5p [%c] %m%n");
		DailyRollingFileAppender appender = new DailyRollingFileAppender();
		appender.setLayout(layout);
		appender.setName("cfg-client");
		appender.setAppend(true);
		appender.setFile(LocalFileUtils.getLocalLogDirPath() + "/cfg-client.log");
		appender.setDatePattern("'.'yyyy-MM-dd'.log'");
		appender.activateOptions();
		logger.addAppender(appender);
		logger.setAdditivity(false);
		logger.setLevel(Level.INFO);*/
	}
	
	public static Logger getLogger(){
		return logger;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy