Skip to main content

Module that emits CEF logs

Project description

Most Mozilla Services applications need to generate CEF logs. A CEF Log is a formatted log that can be used by ArcSight, a central application used by the infrasec team to manage application security.

The cef module provide a log_cef function that can be used to emit CEF logs:

log_cef(message, severity, environ, config, [username,

[signature]], **kw)

Creates a CEF record, and emit it in syslog or another file.

  • message: message to log

  • severity: integer from 0 to 10

  • environ: the WSGI environ object

  • config: configuration dict

  • signature: CEF signature code, defaults to ‘AuthFail’

  • username: user name, defaults to ‘none’

  • extra keywords: extra keys used in the CEF extension


>>> from cef import log_cef
>>> log_cef('SecurityAlert!', 5, environ, config,
...         msg='Someone has stolen my chocolate')

With environ and config provided by the web environment.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cef-0.1.tar.gz (5.5 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page