package com.njcn.gather.system.log.pojo.enums;

import lombok.Getter;

/**
 * @author caozehui
 * @data 2025-02-12
 */
@Getter
public enum LogLevelEnum {
    DEBUG(1, "DEBUG"),
    INFO(2, "INFO"),
    WARN(3, "WARN"),
    ERROR(4, "ERROR"),
    FATAL(5, "FATAL");

    private final int code;
    private final String msg;

    LogLevelEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static LogLevelEnum getEnum(int code) {
        return LogLevelEnum.values()[code - 1];
    }
}
