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

Pass the RFC 3164 severity level thru to drupal watchdog. #14185

Merged
merged 1 commit into from
May 9, 2019

Conversation

mfb
Copy link
Contributor

@mfb mfb commented May 2, 2019

Overview

When passing log messages thru to Drupal watchdog(), CRM_Core_Error::debug_log_message() logs everything at debug level. However, Pear Log and Drupal both use the same RFC 3164 numeric severity levels. Therefore, we could pass the severity level thru to watchdog().

Before

Everything is logged at debug level.

After

Errors, warnings, notices, info, etc. can be logged appropriately.

@civibot
Copy link

civibot bot commented May 2, 2019

(Standard links)

@civibot civibot bot added the master label May 2, 2019
@JoeMurray
Copy link
Contributor

@mfb we like to trade reviews and have a general focus on trying to advance fixes related to finances as well as trading with people who are active and interested in that. I like this functionality. Should I get @Monish to propose a PR to trade reviews on?

@mfb
Copy link
Contributor Author

mfb commented May 2, 2019

At the moment I am on sabbatical so working on civicrm less than usual, but feel free to suggest something anyways and I'll help out as time permits.

@@ -617,7 +617,7 @@ public static function debug_log_message($message, $out = FALSE, $prefix = '', $
if (!empty(\Civi::$statics[__CLASS__]['userFrameworkLogging'])) {
// should call $config->userSystem->logger($message) here - but I got a situation where userSystem was not an object - not sure why
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mfb It would be nice to try and resolve this comment

@mattwire
Copy link
Contributor

mattwire commented May 9, 2019

Tested this and it works well.

@mattwire mattwire merged commit 96a959a into civicrm:master May 9, 2019
@mfb
Copy link
Contributor Author

mfb commented May 9, 2019 via email

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.

3 participants