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

[BUG] - slog.Any does not handle interfaces #26

Closed
OrHayat opened this issue Dec 7, 2023 · 1 comment
Closed

[BUG] - slog.Any does not handle interfaces #26

OrHayat opened this issue Dec 7, 2023 · 1 comment

Comments

@OrHayat
Copy link

OrHayat commented Dec 7, 2023

{
....
	g := map[any]any{"a": 2, 1: true}
	logger := slog.New(handler)
	logger.LogAttrs(context.Background(), slog.LevelError, "test", slog.Any("test", g))
}

output:
ERROR test
M test: 2 map[interface {}]interface {}
1: Unknown type: interface
a: Unknown type: interface

expected output:
ERROR test
M test: 2 map[interface {}]interface {}
a: 2
1:true

@OrHayat OrHayat changed the title [BUG] - slog.Any does not handle interfaces [BUG] - slog.Any does not handle interfaces/any type Dec 7, 2023
@OrHayat OrHayat changed the title [BUG] - slog.Any does not handle interfaces/any type [BUG] - slog.Any does not handle interfaces Dec 7, 2023
@david-littlefarmer
Copy link
Collaborator

@noppawitt resolved it in #27. Thank you.

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