Skip to content

Commit

Permalink
make pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
DimaGolomozy committed Apr 15, 2024
1 parent 5e20c7d commit dc06a44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions slog_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type source struct {
type logMessage struct {
Message string `json:"message"`
Data map[string]any `json:"data,omitempty"`
Source source `json:"source,omitempty"`
Source *source `json:"source,omitempty"`
}

func NewCoralogixHandler(privateKey, applicationName, subsystemName string, opts *slog.HandlerOptions) *CoralogixHandler {
Expand Down Expand Up @@ -76,7 +76,7 @@ func (h *CoralogixHandler) Handle(ctx context.Context, r slog.Record) error {
}

if h.opts.AddSource {
log.Source = source{
log.Source = &source{
Function: f.Function,
File: f.File,
Line: f.Line,
Expand Down

0 comments on commit dc06a44

Please sign in to comment.