4267a229创建于 2024年8月2日历史提交
/*
    Copyright (c) [2023] [squallzhao]
    fountain is licensed under APACHE LICENSE, VERSION 2.0.
    You can use this software according to the terms and conditions of the APACHE LICENSE, VERSION 2.0.
    You may obtain a copy of APACHE LICENSE, VERSION 2.0 at: https://www.apache.org/licenses/LICENSE-2.0
*/
package microservice.trace
import std.log.*

public class Logger{
    static let logger: SimpleLogger = SimpleLogger()
    static public func setLevel(level: LogLevel): Unit{
        logger.level = level
    }
    static public func error(s: String): Unit{
        logger.log(LogLevel.ERROR, s)
    }
    static public func warn(s: String): Unit{
        logger.log(LogLevel.WARN, s)
    }
    static public func info(s: String): Unit{
        logger.log(LogLevel.INFO, s)
    }
    static public func debug(s: String): Unit{
        logger.log(LogLevel.DEBUG, s)
    }
    static public func trace(s: String): Unit{
        logger.log(LogLevel.TRACE, s)
    }
}