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

Stg plg system debug log category mode #5146

Conversation

okonomiyaki3000
Copy link
Contributor

Like #2253 but for staging instead of master.

Basically, since JLog now supports category exclusion instead of just inclusion, the logging feature in this plugin should also give that option. Exclusion is much more useful than inclusion in this case anyway because you probably want to see most logs but you will never want to see databasequery logs and you might get tired of looking at deprecated logs.

@okonomiyaki3000
Copy link
Contributor Author

Setup

  • Turn on debug mode.
  • In the debug plugin settings, set logging to log all all priorities.
  • Don't set a category because categories are like a box of chocolates, you never know what you're gonna get (but you do know which ones you don't want).

Before

You will see logs for every category. Mostly databasequery and deprecated

After

You can set categories to exclude and list the ones you don't want to see. This definitely includes databasequery because the debug plugin is listing them all anyway and it might also include deprecated unless you're on a mission to fix all that deprecated code. What's left will be a short, sweet list of logs that you might actually care about.

@waader
Copy link
Contributor

waader commented Nov 22, 2014

@test success

@okonomiyaki3000
Copy link
Contributor Author

Thanks!

@zero-24
Copy link
Contributor

zero-24 commented Nov 29, 2014

@okonomiyaki3000 i think we should use class="btn-group btn-group-yesno" for the Include/Exclude Button.

Can we move the logging options to the logging file set?
https://github.com/joomla/joomla-cms/blob/staging/plugins/system/debug/debug.xml#L81-108

https://github.com/joomla/joomla-cms/blob/staging/plugins/system/debug/debug.xml#L168

Or should we do this with in a different PR?

@okonomiyaki3000

if i add 'jcontroller' or 'controller' i still get a 'jcontroller.log.php'

Have i something missconfigured / missunderstanded?
debug_options

@okonomiyaki3000
Copy link
Contributor Author

Good point about btn-group.

If you want it in the logging field set, that's a different PR but not one that I'm going to make.

Yes, you have misunderstood what this is about. This has nothing to do with witing logs to files. This about displaying logs in the debug "console" or whatever it's called.

@zero-24
Copy link
Contributor

zero-24 commented Nov 29, 2014

Yes, you have misunderstood what this is about. This has nothing to do with witing logs to files. This about displaying logs in the debug "console" or whatever it's called.

Ok 👍 Now @test success.

Please add the class="btn-group btn-group-yesno" and this is good to go i think.

@brianteeman
Copy link
Contributor

Multiple good tests setting to RTc - thanks

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

@brianteeman brianteeman added the RTC This Pull Request is Ready To Commit label Nov 30, 2014
@zero-24
Copy link
Contributor

zero-24 commented Dec 1, 2014

@Comitter please let @okonomiyaki3000 time to add the class="btn-group btn-group-yesno" to the include / exclude button.

@roland-d
Copy link
Contributor

@okonomiyaki3000 @zero-24 Looking at this PR, it was correct to suggest to use the button group for the Include/Exclude. However I would like to see the Include/exclude swapped. It looks weird that Include is red and exclude is green.

@zero-24
Copy link
Contributor

zero-24 commented Jan 17, 2015

@roland-d is it better if we change it?

include -> green
exclude -> red

or other colors?

@roland-d
Copy link
Contributor

@zero-24 Indeed,
Include -> Green
Exclude -> Red

just like:
Yes -> Green
No -> Red

@zero-24
Copy link
Contributor

zero-24 commented Jan 17, 2015

@okonomiyaki3000 @roland-d

Can you have a look into this PR against this branche?: okonomiyaki3000#1 This should implement it.

but maybe a css fix is better?

@okonomiyaki3000
Copy link
Contributor Author

I'd like to hear some opinions on @zero-24 's PR. I don't have a problem with it but, it may cause a change to expected behavior in some cases (I can go into more detail if it's not obvious). I don't think it's a big deal so, unless there are any objections, I'll accept the PR.

@zero-24
Copy link
Contributor

zero-24 commented Jan 19, 2015

ok PR is closed based on comment by @roland-d to keep backwards compatible. but maybe we can add a comment that this should be changed with 4.0 @okonomiyaki3000 ?

@roland-d
Copy link
Contributor

@zero-24 I have added the label to reevaluate for v4.0. This way it won't be forgotten.

@zero-24
Copy link
Contributor

zero-24 commented Jan 19, 2015

Yes @roland-d this makes more sense. Thanks!

@okonomiyaki3000
Copy link
Contributor Author

But there's actually no BC issue unless we insist on swapping the colors which, to me, is totally arbitrary. It's not really that 'include' is affirmative while 'exclude' is negative. They're just two different modes. We don't even need colors at all, this option could just be a select.

@roland-d
Copy link
Contributor

Leaving it as-is isn't a problem either is it? I can't find it but there was something said about selects only for large listings, and button groups for 2 or 3 options.

@okonomiyaki3000
Copy link
Contributor Author

It's not really a problem to leave it as-is but 'exclude' mode is far more useful than 'include' mode.

@roland-d
Copy link
Contributor

@okonomiyaki3000 I think you missed something. The exclude option has been merged into the core already.

@okonomiyaki3000
Copy link
Contributor Author

Really? Great! What are we talking about then? Just changing the values so the colors will be different? Then I'm done because I do not care about that at all.

@okonomiyaki3000 okonomiyaki3000 deleted the stg-plg_system_debug-log_category_mode branch January 22, 2015 04:06
@zero-24 zero-24 modified the milestones: Joomla! 3.4.0, Joomla 4.0 Aug 24, 2015
@zero-24 zero-24 removed the RTC This Pull Request is Ready To Commit label Oct 14, 2015
@zero-24 zero-24 modified the milestone: Joomla 4.0 Oct 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants