Skip to main content

SeqLog enables logging from Python to Seq.

Project description

SeqLog

https://github.com/tintoy/seqlog/actions/workflows/tox.yml/badge.svg https://img.shields.io/pypi/v/seqlog.svg https://img.shields.io/travis/tintoy/seqlog.svg Documentation Status

SeqLog enables logging from Python to Seq.

It also adds support for logging with named format arguments (via keyword arguments) in the same way "{arg1}".format(arg1="foo") does.

History

0.4.3 (2025-07-26)

  • Implement CI and automatic package publishing to PyPI (tintoy/seqlog#94).

0.4.2 (2025-07-26)

  • A bugfix to correctly propagate MessageTemplate / @mt to Seq (tintoy/seqlog#88).

0.4.1 (2025-05-11)

  • A bugfix to catch ValueErrors when formatting messages (tintoy/seqlog#87).

0.4.0 (2024-12-08)

  • You can enable and disable all of the feature flags at runtime

  • Added support for the CLEF submission format.

  • Fixed a bug wherein configure_from_file would not propagate feature flags

  • You can pass bare strings in the exc_info field (although this serves the same purpose as enabling STACK_INFO and using that variable)

  • A bugfix wherein configure_from_file would not relay it’s arguments to configure_from_dict in the correct order

0.3.31 (2024-04-27)

  • Fix incorrect stack-trace in logged exceptions (tintoy/seqlog#69).

0.3.30 (2023-10-28)

  • Hide errors caused by unavailable Seq server (tintoy/seqlog#61).

0.3.29 (2023-08-24)

  • Fix type-hint on set_global_log_properties (tintoy/seqlog#60).

0.3.28 (2023-08-13)

  • Improve behaviour of best_effort_json_encode so it does not convert JSON to a string (tintoy/seqlog#59).

0.3.27 (2023-08-03)

  • StructuredLogRecord now converts non-string msg to string (tintoy/seqlog#51).

  • Improve logging-error logging behaviour when a failure handler has been registered (tintoy/seqlog#52).

  • Improve implementation of SeqLogHandler._build_event_data() (tintoy/seqlog#42).

0.3.26 (2023-04-20)

  • Don’t attempt to JSON-encode log event properties that are already strings (tintoy/seqlog#42, tintoy/seqlog#48).

0.3.25 (2023-04-18)

  • Temporarily revert changes for including stack_info (if present) in event payloads sent to Seq (tintoy/seqlog#42).

0.3.24 (2023-04-14)

  • Include stack_info (if present) in event payloads sent to Seq (tintoy/seqlog#42).

0.3.22 (TBA)

  • Add support for handling extra log properties via the extra argument (tintoy/seqlog#41).

0.3.21 (TBA)

  • added checking if None was passed as element of a message

  • fixed #13

0.3.20 (2020-10-15)

  • Added a callable to be called each time log submission fails

0.3.19 (2020-10-15)

  • Fixed logging messages containing braces

0.3.18 (2020-09-13)

  • Add an option to specify a callable in global properties

0.3.17 (2020-02-14)

  • Improve handling of log entries with log-record arguments of type “bytes” (tintoy/seqlog#25).

0.3.16 (2019-11-02)

  • Pass exception details when posting events to Seq (tintoy/seqlog#22).

0.3.15 (2018-11-20)

  • Fix deprecated use of yaml.load (tintoy/seqlog#20).

0.3.13 (2018-11-20)

  • Explicitly set Content-Type header to application/json when posting events to Seq (tintoy/seqlog#17).

0.3.12 (2018-11-19)

  • If logging fails to submit an event to Seq then log the response body, if available (tintoy/seqlog#17).

0.3.11 (2018-09-22)

  • Support custom JSONEncoder implementations (tintoy/seqlog#7 and tintoy/seqlog#13).

0.3.10 (2018-08-11)

  • Fix incorrect behaviour when configuring logging from a file (tintoy/seqlog#10). Breaking change: Configuring logging from file or dict will now by default override the default logger class to be StructuredLogger (this can be reverted to previous behaviour by passing use_structured_logger=False).

0.3.9 (2018-01-09)

  • Add PyYAML as a dependency (tintoy/seqlog#6).

0.3.8 (2018-01-05)

  • Improve documentation for logging configuration from file (#3)

0.3.7 (2018-01-05)

  • Implement and document logging configuration from file (#3)

0.3.4 (2017-11-27)

  • Fix sample code (#2).

0.3.3 (2016-11-18)

  • Use streaming mode when posting to Seq (#1)

0.3.2 (2016-11-18)

  • Updated release notes

0.3.1 (2016-11-18)

  • Further work relating to intermittent “RuntimeError: The content for this response was already consumed” when publishing log entries (#1)

0.3.0 (2016-11-16)

  • Fix for intermittent “RuntimeError: The content for this response was already consumed” when publishing log entries (#1)

0.2.0 (2016-07-09)

  • Support for configuring additional log handlers when calling log_to_seq.

  • Support for global log properties (statically-configured properties that are added to all outgoing log entries).

0.0.1 (2016-07-07)

  • First release on PyPI.

0.0.7 (2016-07-09)

  • log_to_seq now returns the SeqLogHandler to enable forced flushing of log records to Seq.

  • Change auto_flush_timeout to a float representing seconds (instead of milliseconds).

  • Update testharness.py to actually log to Seq. You can override the server URL and API key using the SEQ_SERVER_URL and SEQ_API_KEY environment variables.

  • Update usage information in documentation.

  • Python 3 only for now (sorry, but logging in Python 2 doesn’t have all the required extensibility points). If the need to support Python 2 becomes great enough then I’ll try to find a way.

0.1.0 (2016-07-09)

  • Proper versioning starts today :)

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

seqlog-0.4.3.tar.gz (33.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

seqlog-0.4.3-py2.py3-none-any.whl (16.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file seqlog-0.4.3.tar.gz.

File metadata

  • Download URL: seqlog-0.4.3.tar.gz
  • Upload date:
  • Size: 33.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for seqlog-0.4.3.tar.gz
Algorithm Hash digest
SHA256 d53341e1ac24211d4f715fd824e2e5b38378709d90363f85f65a63de166c7c0e
MD5 55e2f85cf5162458e9d6b28256298f00
BLAKE2b-256 d3206a18d2e10c4fc8d13aa493055b92fb5e3deee6049005a223be7f0bbce91a

See more details on using hashes here.

Provenance

The following attestation bundles were made for seqlog-0.4.3.tar.gz:

Publisher: publish-packages.yml on tintoy/seqlog

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file seqlog-0.4.3-py2.py3-none-any.whl.

File metadata

  • Download URL: seqlog-0.4.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 16.1 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for seqlog-0.4.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 789ab07c7512965b57019f8bb80d6e4f8782475ce3dfb5a25cb0e462fb72afc2
MD5 46e1490c9dae7b7fefb7dd1c7ea94952
BLAKE2b-256 e2220aabf997df27c016a698042b6e8b7ed8117dd65c86ea8a2d66d3d8d3814e

See more details on using hashes here.

Provenance

The following attestation bundles were made for seqlog-0.4.3-py2.py3-none-any.whl:

Publisher: publish-packages.yml on tintoy/seqlog

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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