No Code Attached Yet bug
avatar brianteeman
brianteeman
5 Sep 2022

Steps to reproduce the issue

In global configuration set up custom logging as shown in the screenshot

image

perfrom a variety of things such as unpublishing content, filtering content etc etc

check the contents of the administrator/logs folder

Expected result

files that contain the logs of the database quries etc etc

Actual result

nothing at all

Additional comments

Am i missing something?

avatar brianteeman brianteeman - open - 5 Sep 2022
avatar joomla-cms-bot joomla-cms-bot - change - 5 Sep 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 5 Sep 2022
avatar brianteeman brianteeman - change - 5 Sep 2022
The description was changed
avatar brianteeman brianteeman - edited - 5 Sep 2022
avatar Kostelano
Kostelano - comment - 5 Sep 2022

I can confirm that the requests are not in the log file. This functionality is still quite crude and "intersects" a little in the parameters. I described in more detail in post #37677, I will note for communication.

avatar brianteeman
brianteeman - comment - 5 Sep 2022

except you stated

Created file custom-logging.php, which mostly contains category deprecated entries.

and I dont get that file at all

avatar Kostelano
Kostelano - comment - 5 Sep 2022

At me it is created and now, with it there are no problems.

avatar Kostelano
Kostelano - comment - 5 Sep 2022

I take my words back, indeed logging is not working correctly now. For example, having the deprecated category in a field does NOT allow the system to log it until the option above is enabled. However, they do not need to be linked. Definitely something is wrong.

avatar Fedik
Fedik - comment - 5 Sep 2022

The field have an outdated description. On quick search "database", "databasequery" etc categories not used in J4 for every DB query, maybe because Joomla moved to freamwork database library. I found only a couple use in com_joomlaupdate. However some extensions also may use it.
Other categories should work, example jerror.
The categories not fixed, it can be anything you use while call Log::add().

For example, having the deprecated category in a field does NOT allow the system to log it until the option above is enabled.

Deprecated loging have a dedicated "switch" for a reason and loged separately, and better use that. Because it will produce a realy huge log file.
Also It is explicitely disabled when that switch is off, for prefomance reason.

// Check deprecation logging
if (empty($config->log_deprecated)) {
// Reset handler for E_USER_DEPRECATED
set_error_handler(null, E_USER_DEPRECATED);
} else {
// Make sure handler for E_USER_DEPRECATED is registered
set_error_handler(['Joomla\CMS\Exception\ExceptionHandler', 'handleUserDeprecatedErrors'], E_USER_DEPRECATED);
}

avatar brianteeman
brianteeman - comment - 5 Sep 2022

so there is no way any more to log the queries that are taking place?

avatar Fedik
Fedik - comment - 6 Sep 2022

Enable debug, and make sure Debug plugin have "Queries => Show".
image

It does not use JLog, but use DB QueryMonitor.

avatar alikon
alikon - comment - 6 Sep 2022

probably removed when switched to the new system debug plugin phpdebugbar (i mean the .sql file with executed queries)

avatar brianteeman
brianteeman - comment - 6 Sep 2022

@Fedik that doesnt help if you want to see the sql that took place between a page load. For example do any batch changes and then find out the sql that was run

avatar Fedik
Fedik - comment - 6 Sep 2022

that doesnt help if you want to see the sql that took place between a page load

it is, click this litle icon, and choose stored data to view:
image

Example POST request of saving an article:
image

avatar brianteeman
brianteeman - comment - 6 Sep 2022

Thanks - didnt know about that. It solves my personal problem but it doesnt resolve the issue

avatar Fedik
Fedik - comment - 6 Sep 2022

it doesnt resolve the issue

I think it would be enough to update the field description, or?

avatar Hackwar Hackwar - change - 17 Feb 2023
Labels Added: bug
avatar Hackwar Hackwar - labeled - 17 Feb 2023

Add a Comment

Login with GitHub to post a comment