mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 02:15:48 +02:00
feat(logging): add LogHandler for structured logging and improve error handling in getLatestRelease
This commit is contained in:
parent
5c2621aaa6
commit
f4b32d9538
2 changed files with 6 additions and 0 deletions
4
main.go
4
main.go
|
@ -116,6 +116,10 @@ func main() {
|
|||
}
|
||||
logger.Error(kind, err)
|
||||
},
|
||||
LogHandler: func(logLevel risefront.LogLevel, kind string, args ...any) {
|
||||
args = append([]any{kind}, args...)
|
||||
logger.Info(args...)
|
||||
},
|
||||
})
|
||||
if err != nil && !errors.Is(err, context.DeadlineExceeded) &&
|
||||
!errors.Is(err, context.Canceled) &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue