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

warn(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 = "Warning Message"
sb.warn(message, alert_id=123)
Result Behavior
"Warning Message" will be logged with level WARN 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