? ? Pending
Pull Request for # 5165

User tests: Successful: Unsuccessful:

avatar codeling
codeling
23 Nov 2014

As recommended in #5165, rebased the adding of categories for all log entries on staging branch.

For the intent, see above linked pull request

avatar codeling codeling - open - 23 Nov 2014
avatar jissues-bot jissues-bot - change - 23 Nov 2014
Labels Added: ?
avatar zero-24
zero-24 - comment - 23 Nov 2014

thanks @codeling can you add a step by step way to reproduce the issue and / or test you patch?

avatar waader
waader - comment - 23 Nov 2014

I activated logging in the options menu of com_finder and checked the entries in log/indexer.php.

Example of an entry before applying the patch:
2014-11-23T16:22:33+00:00 INFO 127.0.0.1 - Starting the indexer

and after applying the patch:
2014-11-23T16:24:45+00:00 INFO 127.0.0.1 com_finder Starting the indexer

I also scanned the code for any typos as I also didnĀ“t know what more I could do. I am wondering if there is anywhere a list with all categories used in core joomla. You referenced http://docs.joomla.org/Using_JLog which explained the mechanism quite well, but I found no list of categories.

Being curious: did you come up with the category names "com_finder", "image", "daemon" or where the already present?

avatar codeling
codeling - comment - 25 Nov 2014

I might have actually gone a bit overboard here; however I do think the changes I made are very useful. Let me elaborate:

What I did notice in my extensions' custom log were messages like this

 2014-03-24T14:37:38+00:00 INFO FinderIndexerAdapter::getTypeId

typically, I would get multiple of them (upon closer inspection, exactly 5) in quick succession.

Checking the JLog::addEntry code I came to the conclusion that it would actually only make sense for very rare error messages to really have no category - namely if they really should appear in each log file (because that is what will happen if no category is specified, unless the log level prevents it); so I simply added the category everywhere (without being able to tell exactly how to test each instance). To be honest, I cannot even tell how exactly to reproduce the messages shown above; I can only say that they occasionally appear on my production system.

And yes, I did come up with those category names, I'd also be curious about whether there is a list of existing/approved ones?

avatar roland-d roland-d - change - 4 Sep 2015
Rel_Number 5165
Relation Type Pull Request for
avatar n9iels
n9iels - comment - 10 Oct 2015

@codeling can you provide test instructions for this pull request? So when can this this on the Dutch Joomla! Pizza Bugs and Fun

avatar zero-24 zero-24 - change - 10 Oct 2015
Labels Added: ?
avatar codeling
codeling - comment - 13 Oct 2015

@n9iels No unfortunately I can't. As I said above: "I cannot even tell how exactly to reproduce the messages shown above; I can only say that they occasionally appear on my production system."

avatar roland-d
roland-d - comment - 22 Oct 2015

@codeling There is no list of existing/approved category names.

Looking at the changes, only a category has been added which is actually an optional argument. Specifying no category means the same as specifying a category that is supported by a logger.

Although we do need a way to test this before we can merge it.

avatar w13ear w13ear - test_item - 12 Dec 2015 - Not tested
avatar w13ear
w13ear - comment - 12 Dec 2015

I have not tested this item.

Hello @codeling

Thank you for your contribution.

The last comment here was on 22 oct 2015. So the question is, Is this issue/pull request still valid?
if so please provide clear test instructions to be able to test / reproduce this issue.
If no reply is received within 4 weeks we will close this issue.

Thanks for understanding!


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5170.

avatar brianteeman brianteeman - change - 12 Dec 2015
Status Pending Information Required
avatar brianteeman brianteeman - change - 29 Jan 2016
Status Information Required Needs Review
avatar brianteeman
brianteeman - comment - 29 Jan 2016

Its very unclear if this is correct or desired and can not be tested - setting to Needs Review for a Maintainer to make a decision on closing or merging


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/5170.

avatar roland-d roland-d - close - 1 Feb 2016
avatar roland-d
roland-d - comment - 1 Feb 2016

I am going to close this PR, since there is no proper way to reproduce this issue. Forcing a category shouldn't be necessary if you want it all in one log. Perhaps it would be better to not write to logs that have a category assigned but that would require a new pull request.

@codeling Thank you for your contribution.

avatar roland-d roland-d - change - 1 Feb 2016
Status Needs Review Closed
Closed_Date 0000-00-00 00:00:00 2016-02-01 07:14:10
Closed_By roland-d
avatar roland-d roland-d - close - 1 Feb 2016
avatar mbabker
mbabker - comment - 1 Feb 2016

Part of the problem (I don't remember if that has been fixed either) is a log message with no category will be broadcast to all loggers regardless of include/exclude configuration. So one should ensure log messages are always assigned to a category and that JLog handles a no-category scenario correctly. This should be re-opened and merged.

avatar codeling
codeling - comment - 1 Feb 2016

I am going to close this PR, since there is no proper way to reproduce this issue.

OK.

Forcing a category shouldn't be necessary if you want it all in one log.

I don't want all in one logfile, I want a separate logfile which should not get entries without categories.

Perhaps it would be better to not write to logs that have a category assigned but that would require a new pull request.

That could be a solution. But where then would log entries with no category get logged? Nowhere? Or one would have to have a specific "catch-all" category...
The simplest solution to me still is to have proper log categories for all log entries.

Add a Comment

Login with GitHub to post a comment