All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dahua.eco.base.spring.http.log.domain.LogContent Maven / Gradle / Ivy

package com.dahua.eco.base.spring.http.log.domain;

import com.dahua.eco.base.core.entity.BaseEntity;
import com.dahua.eco.base.spring.http.log.TraceInfo;

import java.util.Date;

public class LogContent extends BaseEntity {
    private static final long serialVersionUID = -6018740636888111287L;

    public static final String LOG_LEVEL_INFO = "INFO";
    public static final String LOG_LEVEL_ERROR = "ERROR";

    private Date time;

    private String className;

    private String methodName;

    private Integer lineNumber;

    private String threadName;

    private String level;

    private TraceInfo traceInfo;

//	private String spanId = "0";

    private SpanInfo spanInfo;

    private String desc;

    private String errorCode;


    public LogContent() {
        this.time = new Date();
    }

    public LogContent(String level) {
        this.time = new Date();
        if (LOG_LEVEL_INFO.equalsIgnoreCase(level)) {
            this.level = LOG_LEVEL_INFO;
        } else if (LOG_LEVEL_ERROR.equalsIgnoreCase(level)) {
            this.level = LOG_LEVEL_ERROR;
        }
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public String getMethodName() {
        return methodName;
    }

    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    public Integer getLineNumber() {
        if (lineNumber == null) {
            lineNumber = 0;
        }
        return lineNumber;
    }

    public void setLineNumber(Integer lineNumber) {
        this.lineNumber = lineNumber;
    }

    public String getThreadName() {
        return threadName;
    }

    public void setThreadName(String threadName) {
        this.threadName = threadName;
    }

    public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level;
    }

    public TraceInfo getTraceInfo() {
        return traceInfo;
    }

    public void setTraceInfo(TraceInfo traceInfo) {
        this.traceInfo = traceInfo;
    }

//	public String getSpanId() {
//		return spanId;
//	}
//
//	public void setSpanId(String spanId) {
//		this.spanId = spanId;
//	}
//
//	public String getPSpanId() {
//		return pSpanId;
//	}
//
//	public void setPSpanId(String pSpanId) {
//		this.pSpanId = pSpanId;
//	}

    public String getDesc() {
        return desc;
    }

    public SpanInfo getSpanInfo() {
        return spanInfo;
    }

    public void setSpanInfo(SpanInfo spanInfo) {
        this.spanInfo = spanInfo;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy