package com.persagy.server.labsl.utils

import org.slf4j.LoggerFactory

/**
 * 日志工具
 *
 * @author  wx
 * @date  2020/9/9 16:47
 */
object LoggerUtils {

      var logSign = true
    /**
     * debug 模式日志
     */
    fun debug( clazz: Class<Any>,content: String){
        if (logSign){
            val logger = LoggerFactory.getLogger(clazz)
            logger.debug(content)
        }
    } // Fun

    /**
     * debug 模式日志
     */
    fun debug( clazz: Class<Any>,key: String, content: String){
        if (logSign) {
            val logger = LoggerFactory.getLogger(clazz)
            logger.debug(key, content)
        }
    } // Fun

    /**
     * error 模式日志
     */
    fun error( clazz: Class<Any>,content: String){
        if (logSign) {
            val logger = LoggerFactory.getLogger(clazz)
            logger.error(content)
        }
    } // Fun

    /**
     * error 模式日志
     */
    fun error( clazz: Class<Any>,key: String, content: String){
        if (logSign) {
            val logger = LoggerFactory.getLogger(clazz)
            logger.error(key, content)
        }
    } // Fun

    /**
     * info 模式日志
     */
    fun info( clazz: Class<Any>,content: String){
        if (logSign) {
            val logger = LoggerFactory.getLogger(clazz)
            logger.info(content)
        }
    } // Fun

    /**
     * info 模式日志
     */
    fun info( clazz: Class<Any>,key: String, content: String){
        if (logSign) {
            val logger = LoggerFactory.getLogger(clazz)
            logger.info(key, content)
        }
    } // Fun

    /**
     * warn 模式日志
     */
    fun warn( clazz: Class<Any>,content: String){
        if (logSign) {
            val logger = LoggerFactory.getLogger(clazz)
            logger.warn(content)
        }
    } // Fun

    /**
     * warn 模式日志
     */
    fun warn( clazz: Class<Any>,key: String, content: String){
        if (logSign) {
            val logger = LoggerFactory.getLogger(clazz)
            logger.warn(key, content)
        }
    } // Fun





} // Object LoggerUtils