-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #15126: Add verbosity level in the rudder logger
- Loading branch information
Showing
2 changed files
with
108 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
##################################################################################### | ||
# Copyright 2013-2015 Normation SAS | ||
##################################################################################### | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, Version 3. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
# | ||
##################################################################################### | ||
|
||
# @name Log_v3_mode | ||
# @description Standard logging output, with class_parameter passed as an argument | ||
# | ||
# @parameter mode The verbosity mode to use | ||
# @parameter message The common part of the message to display | ||
# @parameter class_parameter The class parameter used for reporting to support iterator | ||
# @parameter old_class_prefix The prefix of the class for different states (<4.3 version) | ||
# @parameter class_prefix The prefix of the class for different states (4.3 version) | ||
# @parameter args The arguments used to call the generic method (slist) | ||
# | ||
# The args parameter is used: | ||
# * to be able to make reports when calling the same method with the same class parameter several times | ||
# * to be able to display detailed reports | ||
# | ||
# The class_prefix is used in priority, with a fallback on the old_class_prefix if empty. | ||
# | ||
# @class_prefix | ||
# @class_parameter old_class_prefix | ||
|
||
bundle agent _log_v3_mode(mode, message, class_parameter, old_class_prefix, class_prefix, args) | ||
{ | ||
methods: | ||
# Report using the appropriate bundle(s) | ||
"wrapper for ${configuration.enabled_loggers}" | ||
usebundle => log_rudder_mode("${mode}", "${message}", "${class_parameter}", "${old_class_prefix}", "${class_prefix}", "@{args}"), | ||
#usebundle => ${configuration.enabled_loggers}("${mode}", "${message}", "${class_parameter}", "${old_class_prefix}", "${class_prefix}", "@{args}"), | ||
comment => "Call the ${method} bundle with arguments ${old_class_prefix}, ${class_prefix}, @{args}"; | ||
} |