Rev 1200 | Rev 1267 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1200 | Rev 1207 | ||
---|---|---|---|
Line 185... | Line 185... | ||
185 | } |
185 | } |
186 | return true; |
186 | return true; |
187 | } |
187 | } |
188 | 188 | ||
189 | /** |
189 | /** |
190 | * @param string $maskcodes A description of the mask-codes can be found in OIDplusLogger.class.php |
190 | * @param string $maskcodes A description of the mask-codes can be found in doc/developer_notes/logger_maskcodes.md |
191 | * @param string $message The message of the event |
191 | * @param string $message The message of the event |
192 | * @param mixed ...$sprintfArgs If used, %1..%n in $maskcodes and $message will be replaced, like _L() does. |
192 | * @param mixed ...$sprintfArgs If used, %1..%n in $maskcodes and $message will be replaced, like _L() does. |
193 | * @return bool |
193 | * @return bool |
194 | * @throws OIDplusException |
194 | * @throws OIDplusException |
195 | */ |
195 | */ |
Line 245... | Line 245... | ||
245 | $maskcodes_ary = $this->split_maskcodes($maskcodes); |
245 | $maskcodes_ary = $this->split_maskcodes($maskcodes); |
246 | if ($maskcodes_ary === false) { |
246 | if ($maskcodes_ary === false) { |
247 | throw new OIDplusException(_L('Invalid maskcode "%1" (failed to split)',$maskcodes)); |
247 | throw new OIDplusException(_L('Invalid maskcode "%1" (failed to split)',$maskcodes)); |
248 | } |
248 | } |
249 | foreach ($maskcodes_ary as list($sevs,$maskcode)) { |
249 | foreach ($maskcodes_ary as list($sevs,$maskcode)) { |
250 | // At the beginning of each mask code, you can define a severity. |
250 | // At the beginning of each mask code, you must define a severity. |
251 | // If you have a mask code with multiple components, you don't have to place the |
251 | // If you have a mask code with multiple components, you don't have to place the |
252 | // severity for each component. You can just leave it at the beginning. |
252 | // severity for each component. You can just leave it at the beginning. |
253 | // e.g. "[WARN]OID(x)+RA(x)" is equal to "[WARN]OID(x)+[WARN]RA(x)" |
253 | // e.g. "[WARN]OID(x)+RA(x)" is equal to "[WARN]OID(x)+[WARN]RA(x)" |
254 | // You can also put different severities for the components: |
254 | // You can also put different severities for the components: |
255 | // e.g. "[INFO]OID(x)+[WARN]RA(x)" would be a info for the OID, but a warning for the RA. |
255 | // e.g. "[INFO]OID(x)+[WARN]RA(x)" would be a info for the OID, but a warning for the RA. |