This function logs a message with ERROR level in the Siemplify logs (both in log files and in Elasticsearch).

error(message)

Parameters:

Param Name Param Type Possible Values Comments Mandatory Parameter
message string (python 3.7) / unicode (python 2.7)
The message to log Yes

In addition to the message param, additional custom parameters can be passed. The added parameters will be displayed in the matching Elasticsearch document, under the args key and can be used to log additional information regarding the log entry, i.e: the line number, the alert id, etc.

Return Type

NoneType

Example:

Sample Code
from SiemplifyLogger import SiemplifyLogger
sb = SiemplifyLogger()
message = "Error Message"
sb.error(message, alert_id=123)
Result Behavior
"Error Message" will be logged with level ERROR in the log file and a matching document will be created in Elasticsearch with args.alert_id field with value of 123. 
Result Value
None