Fault Log Masking
API Prototype
ascend-fd blacklist Subcommand
Description
This API adds a masking rule that contains fault keywords to prevent information containing fault keywords from being recorded in the file after cleaning logs.
- Currently, only ERROR-level logs of CANN App logs can be masked.
- If you need to customize a path for storing the file that contains masking rules for fault keywords, see Customizing the Home Directory of MindCluster Ascend FaultDiag.
Parameters
Parameter |
Abbreviation |
Required (Yes/No) |
Value Type |
Description |
|---|---|---|---|---|
--add |
-a |
Yes. These parameters are mutually exclusive. That is, only one parameter can be specified. |
String |
Adds a masking rule that contains keywords.
|
--file |
-f |
String |
Imports a JSON file of masking rules. If you add a masking rule by importing a JSON file, the imported JSON file will overwrite the original JSON file in the system. |
|
--delete |
-d |
Integer |
Deletes a masking rule. You can use spaces to separate multiple rules for simultaneous deletion. |
|
--show |
-s |
String |
Views existing masking rules. |
|
--force |
None |
No |
Bool |
If this parameter is specified to delete a masking rule or replace a file, no message is displayed for confirmation. NOTE:
It must be used together with --delete or --file. |
--help |
-h |
No |
- |
Queries help information. |
Return Value
Example: Returns the existing masking rules.
[BLACKLIST] 0. ERROR2, ERROR3, ERROR3 1. ERR1, ERR2, ERR3, ERR4