package cn.reghao.bnt.web.admin.model.vo;

import cn.reghao.bnt.web.admin.model.po.RuntimeLog;
import cn.reghao.jutil.jdk.converter.DateTimeConverter;
import cn.reghao.jutil.jdk.web.log.AppLog;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * @author reghao
 * @date 2025-04-14 09:41:14
 */
@NoArgsConstructor
@Setter
@Getter
public class RuntimeLogInfo {
    private String requestId;
    private String logTimeStr;
    private String level;
    private String thread;
    private String logger;
    private String message;

    public RuntimeLogInfo(RuntimeLog runtimeLog) {
        this.requestId = runtimeLog.getRequestId();
        this.logTimeStr = DateTimeConverter.format(runtimeLog.getTimestamp());
        this.level = runtimeLog.getLevel();
        this.thread = runtimeLog.getThread();
        this.logger = runtimeLog.getLogger();
        this.message = runtimeLog.getMessage();
    }
}
