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

Message is not string casting problem #1

Closed
gimasi opened this issue Jul 23, 2023 · 1 comment · Fixed by #2
Closed

Message is not string casting problem #1

gimasi opened this issue Jul 23, 2023 · 1 comment · Fixed by #2
Assignees
Labels
bug Something isn't working

Comments

@gimasi
Copy link

gimasi commented Jul 23, 2023

Hello,
Just started using your module - since we where looking for DB Logger...
First bug I've found is that sometimes the msg is a valid string... and we get an error even if it continues running..
We patched the logger_psql.ex, function insert_log like this...

changeset =
metadata
|> Map.merge(%{
level: to_string(level),
time: DateTime.from_unix!(Keyword.get(md, :time), :microsecond),
message: String.slice("#{inspect(msg)}",0,255),
metadata: metadata
})
|> Log.changeset()

Massimo

@er-jpg
Copy link
Owner

er-jpg commented Jul 24, 2023

Hello,

Thanks for using this library!

Thanks for letting me know, I'll try to patch this in this week itself, if you are in a hurry, feel free to open a merge request and I'll gladly review and merge it.

@er-jpg er-jpg self-assigned this Jul 24, 2023
@er-jpg er-jpg added the bug Something isn't working label Jul 24, 2023
@er-jpg er-jpg linked a pull request Jul 25, 2023 that will close this issue
@er-jpg er-jpg closed this as completed in #2 Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants