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

webhook周りのログ #825

Open
H1rono opened this issue Dec 26, 2024 · 2 comments
Open

webhook周りのログ #825

H1rono opened this issue Dec 26, 2024 · 2 comments
Assignees

Comments

@H1rono
Copy link
Member

H1rono commented Dec 26, 2024

#815 (comment)

Jomon/service/webhook.go

Lines 84 to 87 in 0a3f9e2

err := json.Unmarshal(resBody, resApp)
if err != nil {
return
}

こことか ログを残す

@Hueter57 Hueter57 self-assigned this Dec 29, 2024
@H1rono
Copy link
Member Author

H1rono commented Dec 30, 2024

Handlersのメソッドと同様に... って思ったけどwebhookだとHandlersにアクセスできないのか

Jomon/router/request.go

Lines 155 to 156 in a637f70

if err != nil {
h.Logger.Info("could not parse query parameter `until` as time.Time", zap.Error(err))

c.Logger()からやりたいところだけど、e.Loggerに手を入れてないから怪しいかもな

@H1rono
Copy link
Member Author

H1rono commented Jan 3, 2025

#844 のおかげでようやくタックルできる
loggerecho.Contextから↓で取り出せるようになった

import "github.com/Jomon/logging"

ctx := c.Request().Context()
logger := logging.GetLogger(ctx)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants