Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
perxis-go
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Package Registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
perxis
perxis-go
Commits
d3e403b0
Commit
d3e403b0
authored
1 year ago
by
Semyon Krestyaninov
Browse files
Options
Downloads
Patches
Plain Diff
fix typo
parent
8217ecad
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pkg/log/zap/field.go
+5
-2
5 additions, 2 deletions
pkg/log/zap/field.go
with
5 additions
and
2 deletions
pkg/log/zap/field.go
+
5
−
2
View file @
d3e403b0
...
...
@@ -24,8 +24,8 @@ func Event(event string) zapcore.Field {
return
zap
.
String
(
"event"
,
event
)
}
// Object возвращает по
с
ле и устанавливает передаваемый аргумент в качестве идентификатора объекта в формате GlobalID.
// Поддерживает один из типов: string, fmt.Stringer. Если передан аргумент другого типа, в качестве
вызывающего
// Object возвращает поле и устанавливает передаваемый аргумент в качестве идентификатора объекта в формате GlobalID.
// Поддерживает один из типов: string, fmt.Stringer. Если передан аргумент другого типа, в качестве
идентификатора объекта
// будет установлен "unknown".
func
Object
(
v
any
)
zapcore
.
Field
{
var
object
string
...
...
@@ -40,6 +40,9 @@ func Object(v any) zapcore.Field {
return
zap
.
String
(
"object"
,
object
)
}
// Caller возвращает поле и устанавливает передаваемый аргумент в качестве "вызывающего" в формате GlobalID.
// Поддерживает один из типов: string, fmt.Stringer. Если передан аргумент другого типа, в качестве вызывающего
// будет установлен "unknown".
func
Caller
(
v
any
)
zapcore
.
Field
{
var
caller
string
switch
value
:=
v
.
(
type
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment