mirror of
https://github.com/mattermost/focalboard.git
synced 2025-02-01 19:14:35 +02:00
417de9f837
- structured, asynchronous logging - supports discreet log levels, including custom levels - supports output to console, files, and all common log aggregators. - supports JSON, plain text and GELF formats - lazy formatting and writing
41 lines
1.0 KiB
Go
41 lines
1.0 KiB
Go
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
package mlog
|
|
|
|
import "github.com/mattermost/logr/v2"
|
|
|
|
// Standard levels
|
|
var (
|
|
Panic = logr.Panic // ID = 0
|
|
Fatal = logr.Fatal // ID = 1
|
|
Error = logr.Error // ID = 2
|
|
Warn = logr.Warn // ID = 3
|
|
Info = logr.Info // ID = 4
|
|
Debug = logr.Debug // ID = 5
|
|
Trace = logr.Trace // ID = 6
|
|
StdAll = []Level{Panic, Fatal, Error, Warn, Info, Debug, Trace}
|
|
)
|
|
|
|
// Register custom (discrete) levels here.
|
|
// !!!!! Custom ID's must be between 20 and 32,768 !!!!!!
|
|
var (
|
|
/* Example
|
|
// used by the audit system
|
|
AuditAPI = Level{ID: 100, Name: "audit-api"}
|
|
AuditContent = Level{ID: 101, Name: "audit-content"}
|
|
AuditPerms = Level{ID: 102, Name: "audit-permissions"}
|
|
AuditCLI = Level{ID: 103, Name: "audit-cli"}
|
|
*/
|
|
|
|
// add more here ...
|
|
Telemetry = Level{ID: 500, Name: "telemetry"}
|
|
)
|
|
|
|
// Combinations for LogM (log multi)
|
|
var (
|
|
/* Example
|
|
MAuditAll = []Level{AuditAPI, AuditContent, AuditPerms, AuditCLI}
|
|
*/
|
|
)
|