Models
- class logmancer.models.SafeJSONField(verbose_name=None, name=None, encoder=None, decoder=None, **kwargs)[source]
Bases:
JSONFieldJSONField that automatically sanitizes data
- class logmancer.models.LogEntry(id, timestamp, level, message, path, method, status_code, user, source, actor_type, meta)[source]
Bases:
Model- timestamp
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- level
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- message
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- path
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- method
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- status_code
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- user
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
- source
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- actor_type
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- meta
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- exception DoesNotExist
Bases:
ObjectDoesNotExist
- exception MultipleObjectsReturned
Bases:
MultipleObjectsReturned
- exception NotUpdated
Bases:
ObjectNotUpdated,DatabaseError
- get_actor_type_display(*, field=<django.db.models.fields.CharField: actor_type>)
- get_level_display(*, field=<django.db.models.fields.CharField: level>)
- get_next_by_timestamp(*, field=<django.db.models.fields.DateTimeField: timestamp>, is_next=True, **kwargs)
- get_previous_by_timestamp(*, field=<django.db.models.fields.DateTimeField: timestamp>, is_next=False, **kwargs)
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>
- user_id
LogEntry Model
- class logmancer.models.LogEntry(id, timestamp, level, message, path, method, status_code, user, source, actor_type, meta)[source]
The main log entry model that stores all logged events in the database.
Fields:
- timestamp
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- level
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- message
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- path
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- method
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- status_code
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- user
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
- source
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- actor_type
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- meta
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
Methods:
- timestamp
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- level
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- message
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- path
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- method
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- status_code
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- user
Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parentis aForwardManyToOneDescriptorinstance.
- source
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- actor_type
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- meta
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- exception NotUpdated
- get_actor_type_display(*, field=<django.db.models.fields.CharField: actor_type>)
- get_level_display(*, field=<django.db.models.fields.CharField: level>)
- get_next_by_timestamp(*, field=<django.db.models.fields.DateTimeField: timestamp>, is_next=True, **kwargs)
- get_previous_by_timestamp(*, field=<django.db.models.fields.DateTimeField: timestamp>, is_next=False, **kwargs)
- id
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
- objects = <django.db.models.manager.Manager object>
- user_id