HiLog
|
int Debug(const HiLogLabel &label, const char *fmt, ...)
|
Generates debug logs.
Input arguments:
- label: Identifies the log type, service domain, and tag.
- format: Indicates the constant format, including the parameter type and privacy identifier. If the privacy identifier is not specified, a parameter is treated as a privacy parameter by default.
- fmt: Indicates the string describing the format variable parameter.
Output arguments: none
Return value: Returns a value greater than or equal to 0 if the operation is successful; returns a value less than 0 otherwise.
|
int Info(const HiLogLabel &label, const char *fmt, ...)
|
Generates info logs.
Arguments: See argument description of the Debug function.
|
int Warn(const HiLogLabel &label, const char *fmt, ...)
|
Generates warn logs.
Arguments: See argument description of the Debug function.
|
int Error(const HiLogLabel &label, const char *fmt, ...)
|
Generates error logs.
Arguments: See argument description of the Debug function.
|
int Fatal(const HiLogLabel &label, const char *fmt, ...)
|
Generates fatal logs.
Arguments: See argument description of the Debug function.
|
boolean IsLoggable(unsigned int domain, const char *tag, LogLevel level)
|
Checks whether logs of the specified service domain, tag, and level can be printed.
Input arguments:
- domain: Indicates the service domain of logs.
- tag: Indicates the log tag.
- level: Indicates the log level.
Output arguments: none
Return value: Returns true if the specified logs can be printed; returns false otherwise.
|
HiLogLabel
|
struct HiLogLabel
|
Initializes log tag parameters.
Members:
- type: Indicates the log type.
- domain: Indicates the service domain of logs.
- tag: Indicates the log tag.
|