UserLogMessage
Inject a message into the ApertureDB log file.
Parameters
- text: The message to be logged.
- type: The log level from INFO, WARNING, ERROR. Default is "INFO".
Details
This command will add a message into the Aperture DB log file. The message will be tagged with the level specified in the command. The message will be visible in the log file and can be seen in the ApertureDB Logging dashboard. It can also be seen as an annotation on the ApertureDB Status dashboard if the appropriate options are selected.
It is useful for debugging and monitoring the ApertureDB system. Suggested usage is to log messages at the INFO level for general information, at the WARNING level for warnings, and at the ERROR level for errors.
- An INFO message should be sent at the start of a process, including configuration parameters.
- An INFO messages should be sent at the end of a process, including performance metrics.
- An INFO message can also be sent at the start of a significant phase in a long-running process.
- A WARNING message should be sent when a non-critical or recoverable error occurs, such as retrying a failed operation.
- An ERROR message should be sent when a critical or unrecoverable error occurs, such as aborting a failed process.
Examples
[{
"UserLogMessage": {
"text": "Beginning ingestion process for dataset 'my_dataset'",
"type": "INFO"
}
}]
[{
"UserLogMessage": {
"text": "Foo command failed. Retrying...",
"type": "WARNING"
}
}]
[{
"UserLogMessage": {
"text": "Too many retries. Aborting ingestion process for dataset 'my_dataset'",
"type": "ERROR"
}
}]
Successful response:
[{
"UserLogMessage": {
"status": 0
}
}]