Change level of repetitive log#324
Merged
zachdaniel merged 4 commits intoash-project:mainfrom Jun 17, 2025
Merged
Conversation
zachdaniel
reviewed
Jun 15, 2025
zachdaniel
reviewed
Jun 16, 2025
zachdaniel
reviewed
Jun 16, 2025
| e -> | ||
| Logger.error("Failed to display value:\n#{Exception.format(:error, e, __STACKTRACE__)}") | ||
| "<display error>" | ||
| if @log_failed_to_display_value_error do |
Contributor
There was a problem hiding this comment.
Lets also turn these into debug logs that way it doesn't clutter up production logs.
Contributor
Author
There was a problem hiding this comment.
Yeah my main issue was it showing up in prod. I didn't want to change the log level since that would affect others but honestly probably makes the most sense.
I'll push up a change that removes the config and just changes to Logger.debug
zachdaniel
reviewed
Jun 16, 2025
| import AshAdmin.Helpers | ||
| import AshAdmin.CoreComponents | ||
|
|
||
| @log_failed_to_display_value_error Application.compile_env( |
Contributor
There was a problem hiding this comment.
lets document this configuration somewhere.
Contributor
Author
There was a problem hiding this comment.
Per this: #324 (comment)
I'll remove the config but if we want it back I'll definitely document somewhere
zachdaniel
approved these changes
Jun 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey,
I've seen a bunch of error logs like the following:
I added specific handling the Postgrex.Range struct but also happens for others defined in my app, e.g.
While minor, I figure having a quick configuration option to simply ignore these might be useful since (at least in my case) it doesn't hinder the functionality of the admin UI.
Let me know if this needs any improvements or close if not wanted :)
Contributor checklist
Leave anything that you believe does not apply unchecked.