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

Add gentle deprecation to debug_log_message #25683

Merged
merged 1 commit into from
Feb 28, 2023

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Add gentle deprecation to debug_log_message

Before

Civi::log() is preferred but how would people have known?

After

Marked as deprecated, I added some docs https://docs.civicrm.org/dev/en/latest/framework/logging/

Technical Details

Comments

@civibot
Copy link

civibot bot commented Feb 28, 2023

(Standard links)

@civibot civibot bot added the master label Feb 28, 2023
@demeritcowboy
Copy link
Contributor

But civi::log->X() calls debug_log_message - am I missing something?

@eileenmcnaughton
Copy link
Contributor Author

@demeritcowboy yeah - it does - unless people use (e.g) monolog to change that - but hopefully this will encourage every other function to go via Civi::log

@demeritcowboy
Copy link
Contributor

Would @internal be closer to what is happening?

@demeritcowboy demeritcowboy merged commit d01aa62 into civicrm:master Feb 28, 2023
@demeritcowboy
Copy link
Contributor

I'm being too picky here. It's just there's a large amount of extension code that uses this. There's still a large amount that uses CRM_Core_BAO_Setting::getItem.

@eileenmcnaughton eileenmcnaughton deleted the logging_dep branch February 28, 2023 01:36
@eileenmcnaughton
Copy link
Contributor Author

@demeritcowboy yeah I guess what we would ideally do is change the order to debug_info calls Civi::log rather than vice versa - but I think this is just intended to be a low-level nudge without getting too cosy with Peter & Bugs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants