monasca_log_api.reference.v2 package

monasca_log_api.reference.v2 module

class Logs[source]

Bases: monasca_log_api.api.logs_api.LogsApi

Logs Api V2.

SUPPORTED_CONTENT_TYPES = set(['application/json', 'text/plain'])
VERSION = 'v2.0'
get_envelope(log, tenant_id)[source]
get_log(request)[source]
on_post(*args, **kwargs)[source]

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

new_log_envelope(log_object, tenant_id)[source]
parse_application_type(app_type)[source]
parse_dimensions(dimensions)[source]

Table Of Contents

Previous topic

monasca_log_api.api package

Next topic

monasca_log_api.reference.v3 package

Project Source

This Page