-
-
Notifications
You must be signed in to change notification settings - Fork 579
bug: LogLvl property seems to be ignored #2368
Comments
I just tested it and it worked perfectly with my environment. However, I guess I understand what happened in your environment. Could you please post the output of By the way, the hint is your log output. This is not the format of Buffalo's logger but the default format of Pop, which means the logs were printed not by Buffalo but by Pop. Recently, we changed Pop's logging system to include connection/transaction information (ID) when it prints SQL logs. See gobuffalo/pop/issues/794 and gobuffalo/pop/issues/795 for details. After the change on Pop, we decoupled Buffalo and Pop completely, then fixed Buffalo-pop's logging feature to support the new transaction-aware logging system to make them work together properly. (gobuffalo/buffalo-pop/pull/77) Please check your If the issue is not fixed with the version update, please let me know and post your result of |
Thanks @sio4 for your help. Here the
I also add the warnig message when populate data in a custom User model:
|
Indeed, this is weird. You already use Pop v6.1.1 and Buffalo-pop v3.0.7 in your What I wonder is the sentence you wrote: "when populate data in a custom User model". Do you also see this kind of log when you just query any existing data for your model or just call a handler that does not use a database? The reason I asking this is:
So I wonder if you use buffalo-pop middleware or use Pop transaction directly for finer control. If the later is your case, I would like to ask you to check how you configure the logging feature of Pop. With this change, we introduced a new Function to set Could you please check your |
PS. I edited your last comment to make it short in the conversation history by adding |
Yes I'm using transaction, in my
So i tried to set the custom logger with PS: |
Hmm, interesting. The first line of the quoted code in the last comment,
|
FYI, the log should be in the format of the following if the App's log is applied correctly and the log level is Debug.
(I cannot reproduce the issue) |
After some research I founded what was the problem. The Pop log info are generated only in my Thansk anyway for the support! |
Ah! got it! Thank you for sharing the details! |
@sio4 I noticed that if you build a project with
How I can disable POP logs also in migrate command? I don't want that this info are aviable in production builds. Thanks |
Ah! Good point! However, there is no method to disable it for now. One possible workaround is redirecting the standard error to Could it be feasible for your condition? By the way, what is the reason for suppressing those logs? Does it break something? While I understand having more control is better for users, I wonder which specific case it affects badly. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment. Otherwise, this will be closed in 7 days. |
This issue was closed because it has been stalled for 30+7 days with no activity. |
Description
By default all Buffalo projects have warning log. Since the last version (1.1.0) it was simply add this property in the App class definition and change the Log Level:
But with the last release this seems to be ingored and always the warning errors are visible:
To Reproduce
Change LogLvl in App Class
Additional Context
No response
The text was updated successfully, but these errors were encountered: