log-session-id-at-sessionid #251

Merged
lash merged 4 commits from log-session-id-at-sessionid into master 2025-01-06 08:01:21 +01:00
Member

Makes session id(phone number ) and africastalking session id available in the logs.

Resolves:

#240

Makes session id(phone number ) and africastalking session id available in the logs. Resolves: #240
carlos added 2 commits 2025-01-06 06:55:45 +01:00
lash requested changes 2025-01-06 07:46:34 +01:00
Dismissed
lash left a comment
Owner

I thought we were going to make a logging wrapper as a separate package?

e.g. something like (not tested):

package logging

type ContextLogger logging.Logger

func NewContextLogger(domain string) logging.Logger{
   var logg ContextLogger 
   logg = logging.NewVanilla().WithDomain(domain).WithContextKey("SessionId").WithContextKey("ATSessionId")
   return logg
}
I thought we were going to make a logging wrapper as a separate package? e.g. something like (not tested): ``` package logging type ContextLogger logging.Logger func NewContextLogger(domain string) logging.Logger{ var logg ContextLogger logg = logging.NewVanilla().WithDomain(domain).WithContextKey("SessionId").WithContextKey("ATSessionId") return logg } ```
@ -11,3 +11,3 @@
var (
logg = logging.NewVanilla().WithDomain("atserver")
logg = logging.NewVanilla().WithDomain("atserver").WithContextKey("AT-SessionId")
Owner

We will need both SessionId and AT-Sessionid in the AT part, otherwise SessionId will not be logged.

We will need both SessionId and AT-Sessionid in the AT part, otherwise SessionId will not be logged.
Owner

let's push logging instance to later, put in issue: #252

so let's just make sure we have sessionid everywhere.

let's push logging instance to later, put in issue: https://git.grassecon.net/urdt/ussd/issues/252 so let's just make sure we have sessionid everywhere.
carlos added 1 commit 2025-01-06 07:54:57 +01:00
lash requested changes 2025-01-06 07:56:21 +01:00
Dismissed
@ -11,3 +11,3 @@
var (
logg = logging.NewVanilla().WithDomain("httpserver")
logg = logging.NewVanilla().WithDomain("httpserver").WithContextKey("at-session-id")
Owner

And then this is wrong..

And then this is wrong..
carlos added 1 commit 2025-01-06 08:00:02 +01:00
lash approved these changes 2025-01-06 08:01:13 +01:00
lash merged commit c995143543 into master 2025-01-06 08:01:21 +01:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: urdt/ussd#251
No description provided.