Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

returned field methods to public #1531

Merged
merged 1 commit into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
* Returned log.XXX methods for create fields, removed from public at v3.85.0

## v3.89.1
* Added option `ydb.WithSharedBalancer(*Driver)` for child drivers

Expand Down
43 changes: 43 additions & 0 deletions log/field.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package log

import (
"fmt"
"time"

"github.com/ydb-platform/ydb-go-sdk/v3/internal/kv"
)

Expand All @@ -27,3 +30,43 @@ func appendFieldByCondition(condition bool, ifTrueField Field, fields ...Field)

return fields
}

func String(k, v string) Field {
return kv.String(k, v)
}

func Int(k string, v int) Field {
return kv.Int(k, v)
}

func Int64(k string, v int64) Field {
return kv.Int64(k, v)
}

func Bool(k string, v bool) Field {
return kv.Bool(k, v)
}

func Duration(k string, v time.Duration) Field {
return kv.Duration(k, v)
}

func Strings(k string, v []string) Field {
return kv.Strings(k, v)
}

func NamedError(k string, v error) Field {
return kv.NamedError(k, v)
}

func Error(v error) Field {
return kv.Error(v)
}

func Any(k string, v any) Field {
return kv.Any(k, v)
}

func Stringer(k string, v fmt.Stringer) Field {
return kv.Stringer(k, v)
}
Loading