func (manager *LoggerManager) AddLogLine(Severity uint, Text interface{}, Category string, ClassName string, MethodName string, ThreadId string) {
    if manager.LogsBufferLength() < MaxLogBufferSize {
        if Severity < Level.DEBUG || Severity > Level.CRITICAL {
            Severity = Level.INFO
        }
        if Text == nil || Text == "" {
            Text = "EMPTY_STRING"
        }
        if Category == "" {
            Category = LogCategory
        }

        NewLogRecord := Log{
            float64(time.Now().Unix())*1000.0 + manager.TimeDelta,
            Severity,
            MessageToString(Text),
            Category,
            ClassName,
            MethodName,
            ThreadId,
        }

        if MaxLogChunkSize <= uint64(NewLogRecord.Size()) {
            DebugLogger.Printf(
                "AddLogLine(): received log message too big of size= %d MB, bigger than max_log_chunk_size= %d; throwing...\n",
                NewLogRecord.Size()/(1024*1024),
                MaxLogChunkSize,
            )
            return
        }

        manager.LogsBuffer = append(manager.LogsBuffer, NewLogRecord)
    }
}
// AddLogLine push log record to buffer
AddLogLine push log record to buffer
// AddLogLine push log record to buffer
func (manager *LoggerManager) AddLogLine(Severity uint, Text interface{}, Category string, ClassName string, MethodName string, ThreadId string) {
    if manager.LogsBufferLength() < MaxLogBufferSize {
        if Severity < Level.DEBUG || Severity > Level.CRITICAL {
            Severity = Level.INFO
        }
        if Text == nil || Text == "" {
            Text = "EMPTY_STRING"
        }
        if Category == "" {
            Category = LogCategory
        }
        NewLogRecord := Log{
            float64(time.Now().Unix())*1000.0 + manager.TimeDelta,
            Severity,
            MessageToString(Text),
            Category,
            ClassName,
            MethodName,
            ThreadId,
        }
        if MaxLogChunkSize <= uint64(NewLogRecord.Size()) {
            DebugLogger.Printf(
                "AddLogLine(): received log message too big of size= %d MB, bigger than max_log_chunk_size= %d; throwing...\n",
                NewLogRecord.Size()/(1024*1024),
                MaxLogChunkSize,
            )
            return
        }
        manager.LogsBuffer = append(manager.LogsBuffer, NewLogRecord)
    }
}
func ( manager * LoggerManager ) AddLogLine ( Severity uint , Text interface { } , Category string , ClassName string , MethodName string , ThreadId string ) { if manager . LogsBufferLength ( ) < MaxLogBufferSize { if Severity < Level . DEBUG || Severity > Level . CRITICAL { Severity = Level . INFO } if Text == nil || Text == " " { Text = " " } if Category == " " { Category = LogCategory } NewLogRecord := Log { float64 ( time . Now ( ) . Unix ( ) ) * 1000.0 + manager . TimeDelta , Severity , MessageToString ( Text ) , Category , ClassName , MethodName , ThreadId , } if MaxLogChunkSize <= uint64 ( NewLogRecord . Size ( ) ) { DebugLogger . Printf ( " \n " , NewLogRecord . Size ( ) / ( 1024 * 1024 ) , MaxLogChunkSize , ) return } manager . LogsBuffer = append ( manager . LogsBuffer , NewLogRecord ) } }
AddLogLine push log record to buffer
AddLogLine push log record to buffer