monasca_log_api.reference.v2 package¶
monasca_log_api.reference.v2 module¶
monasca_log_api.reference.v2 module¶
-
class
LogCreator
[source]¶ Bases:
object
Transforms logs,
Takes care of transforming information received via HTTP requests into log and log envelopes objects.
For more details see following:
-
new_log
(application_type, dimensions, payload, content_type='application/json', validate=True)[source]¶ Creates new log object.
Parameters: - application_type (str) – origin of the log
- dimensions (dict) – dictionary of dimensions (any data sent to api)
- payload (stream) – stream to read log entry from
- content_type (str) – actual content type used to send data to server
- validate (bool) – by default True, marks if log should be validated
Returns: log object
Return type: dict
Keyword: log_object
-