focalboard/server/services/mlog/levels.go
Doug Lauder 66975bdfe9
First pass linter cleanup (#603)
* first pass linter cleanup

* address review comments
2021-06-21 11:21:42 +02:00

42 lines
1.1 KiB
Go

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
//nolint:gomnd
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"}
Metrics = Level{ID: 501, Name: "metrics"}
)
// Combinations for LogM (log multi).
var (
/* Example
MAuditAll = []Level{AuditAPI, AuditContent, AuditPerms, AuditCLI}
*/
)