Make TDLib log output easily
This commit is contained in:
parent
b2327b9644
commit
469cae3b44
|
@ -37,17 +37,14 @@ func WithProxy(req *AddProxyRequest) Option {
|
|||
}
|
||||
}
|
||||
|
||||
func SetLogVerbosityLevel(level int32) Option {
|
||||
return func(client *Client) {
|
||||
client.SetLogVerbosityLevel(&SetLogVerbosityLevelRequest{
|
||||
func SetLogLevel(level int32) {
|
||||
_, _ = SetLogVerbosityLevel(&SetLogVerbosityLevelRequest{
|
||||
NewVerbosityLevel: level,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func SetFilePath(path string) Option {
|
||||
return func(client *Client) {
|
||||
client.SetLogStream(&SetLogStreamRequest{
|
||||
func SetFilePath(path string) {
|
||||
_, _ = SetLogStream(&SetLogStreamRequest{
|
||||
LogStream: &LogStreamFile{
|
||||
Path: path,
|
||||
MaxFileSize: 10485760,
|
||||
|
@ -55,7 +52,6 @@ func SetFilePath(path string) Option {
|
|||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func NewClient(authorizationStateHandler AuthorizationStateHandler, options ...Option) (*Client, error) {
|
||||
client := &Client{
|
||||
|
|
Loading…
Reference in a new issue