Skip to main content

Sentry Logs allows you to send Logs to Sentry, only Nginx error log is currently supported, but I’m planning to extend the library to support more logs file.

How it works

To install sentrylogs you can use pip or easy_install:

pip install sentrylogs

or:

easy_install sentrylogs

This will install the module and you will have a new command line available:

sentrylogs -h


usage: sentrylogs [-h] [--follow FOLLOW] [--sentrydsn SENTRYDSN] [--daemonize]
                  [--nginxerrorpath NGINXERRORPATH]

Send logs to Django Sentry.

optional arguments:
  -h, --help            show this help message and exit
  --follow FOLLOW, -f FOLLOW
                        Which logs to follow, default ALL (for now only ALL is available)
  --sentrydsn SENTRYDSN, -s SENTRYDSN
                        The Sentry DSN string
  --daemonize, -d       Run this script in background
  --nginxerrorpath NGINXERRORPATH, -n NGINXERRORPATH
                        Nginx error log path

you must provide a Sentry DSN to make it works; at this moment you have 2 possibilities:

set up an environment variable:

$ export SENTRY_DSN=”protocol://public:secret@example.com/#” $ sentrylogs

or use the –sentrydsn argument:

$ sentrylogs –sentrydsn “protocol://public:secret@example.com/#”

By defauld it will seach for nginx log at /var/log/nginx/error.log, but you can change it using –nginxerrorpath

If you use –daemonize the command will daemonize itself and will run in background.

Download files

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

Source Distribution

SentryLogs-0.1.0.tar.gz (7.1 kB view details)

Uploaded Source

File details

Details for the file SentryLogs-0.1.0.tar.gz.

File metadata

  • Download URL: SentryLogs-0.1.0.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for SentryLogs-0.1.0.tar.gz
Algorithm Hash digest
SHA256 837c84aa53c46614fceea1d0ad744cb552d50fbd6806b2dbfbcd24dc73f6aaac
MD5 e23c3f959b28224cce97294d061c19b5
BLAKE2b-256 d1706985c8128038af6b3bd8bcc0d2e84094a78b7dfd263118ea1d605a7a6c40

See more details on using hashes here.

Release history Release notifications | RSS feed

0.5.0

2 files

0.4.0

1 file

0.3.0

1 file

0.2.0

1 file

This release

0.1.0 This release

1 file

0.0.9

1 file

0.0.8

1 file

0.0.7

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page