mirror of
https://github.com/NotAShelf/catApi.git
synced 2025-10-12 19:59:38 +00:00
rewrite in go
This commit is contained in:
parent
5203a18d2d
commit
05642cb93b
743 changed files with 334055 additions and 55 deletions
31
vendor/github.com/sagikazarmark/slog-shim/record.go
generated
vendored
Normal file
31
vendor/github.com/sagikazarmark/slog-shim/record.go
generated
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
// Copyright 2022 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build go1.21
|
||||
|
||||
package slog
|
||||
|
||||
import (
|
||||
"log/slog"
|
||||
"time"
|
||||
)
|
||||
|
||||
// A Record holds information about a log event.
|
||||
// Copies of a Record share state.
|
||||
// Do not modify a Record after handing out a copy to it.
|
||||
// Call [NewRecord] to create a new Record.
|
||||
// Use [Record.Clone] to create a copy with no shared state.
|
||||
type Record = slog.Record
|
||||
|
||||
// NewRecord creates a Record from the given arguments.
|
||||
// Use [Record.AddAttrs] to add attributes to the Record.
|
||||
//
|
||||
// NewRecord is intended for logging APIs that want to support a [Handler] as
|
||||
// a backend.
|
||||
func NewRecord(t time.Time, level Level, msg string, pc uintptr) Record {
|
||||
return slog.NewRecord(t, level, msg, pc)
|
||||
}
|
||||
|
||||
// Source describes the location of a line of source code.
|
||||
type Source = slog.Source
|
Loading…
Add table
Add a link
Reference in a new issue