package cn.reghao.devops.web.mgr.log.model.vo;

import cn.reghao.devops.web.mgr.log.model.po.AppLog;
import cn.reghao.jutil.jdk.converter.DateTimeConverter;
import lombok.Getter;

/**
 * @author reghao
 * @date 2023-10-23 16:18:26
 */
@Getter
public class AppLogVO {
    private String app;
    private String host;
    private String timestamp;
    private String level;
    private String thread;
    private String logger;
    private String message;

    public AppLogVO(AppLog appLog) {
        this.app = appLog.getApp();
        this.host = appLog.getHost();
        this.timestamp = DateTimeConverter.format(appLog.getTimestamp());
        this.level = appLog.getLevel();
        this.thread = appLog.getThread();
        this.logger = appLog.getLogger();
        this.message = appLog.getMessage();
    }
}
