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

com.taobao.diamond.utils.LogUtils Maven / Gradle / Ivy

There is a newer version: 3.2.4
Show newest version
package com.taobao.diamond.utils;

import com.taobao.middleware.logger.Level;
import com.taobao.middleware.logger.Logger;
import com.taobao.middleware.logger.LoggerFactory;

/**
 * Created by dingjoey on 14-6-30.
 */
public class LogUtils {

    static {
        // logger init
        Logger logger = LoggerFactory.getLogger("com.taobao.diamond.client");
        logger.setLevel(Level.INFO);
        logger.setAdditivity(false);
        logger.activateAppenderWithTimeAndSizeRolling("diamond-client", "diamond-client.log", "GBK", "100MB"); //TODO
    }

   public static Logger logger(Class clazz) {
       return LoggerFactory.getLogger(clazz);
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy