{"id":20512016,"url":"https://github.com/gjedlicska/structlog-to-seq","last_synced_at":"2026-04-19T12:31:47.557Z","repository":{"id":53809802,"uuid":"234950516","full_name":"gjedlicska/structlog-to-seq","owner":"gjedlicska","description":"A collection of structlog event processors, that help bridge the gap between structlog and Seq log server.","archived":false,"fork":false,"pushed_at":"2021-03-12T11:19:09.000Z","size":158,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-16T09:08:37.928Z","etag":null,"topics":["docker","gelf-python","seq","seqlog","structlog"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gjedlicska.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-19T19:07:12.000Z","updated_at":"2024-11-10T01:06:27.000Z","dependencies_parsed_at":"2022-08-22T05:40:55.682Z","dependency_job_id":null,"html_url":"https://github.com/gjedlicska/structlog-to-seq","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gjedlicska%2Fstructlog-to-seq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gjedlicska%2Fstructlog-to-seq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gjedlicska%2Fstructlog-to-seq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gjedlicska%2Fstructlog-to-seq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gjedlicska","download_url":"https://codeload.github.com/gjedlicska/structlog-to-seq/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242117649,"owners_count":20074435,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","gelf-python","seq","seqlog","structlog"],"created_at":"2024-11-15T20:39:23.244Z","updated_at":"2026-04-19T12:31:42.510Z","avatar_url":"https://github.com/gjedlicska.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":".. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n   :target: https://github.com/psf/black\n   :alt: Code style: black\n\nMotivation\n----------\n\nThe main motivation for the project is to be able to use structlog as a standard logging\nsolution for both applications and packages, while a the end our application logs are\nsent to a Seq server.\nKeeping in mind the Twelve Factor App's guide on logging: https://12factor.net/logs.\n\nObstacles to overcome:\n\n* If using Seq's official logging solution `seqlog \u003chttps://seqlog.readthedocs.io/\u003e`_\nyou have to rely on the full robust solution, with logging, handlers and a server.\nThis makes logging too robust for my taste.\n* with containerized python applications using structlog for creating log entries,\nand Seq server ingesting log events.\n\nUse case\n--------\n\nApplication and package logs are collected and formatted with a structlog formatter chain,\nwhere the structlog_seq_formatters are added towards the end of the chain.\nFor docker container based applications using structlog JsonRenderer as the final formatter is sufficient,\nafter that, docker's GELF log-driver forwards the event to the Seq server, thus the application only logs to stdout.\nDocker gelf docs: https://docs.docker.com/config/containers/logging/gelf/\n\nFor local development, instead of rendering an event to JSON, the CLEF renderer can be used.\n\nDemo\n----\n\nPrerequisites\n*************\n* `Docker \u003chttps://docs.docker.com/get-started/\u003e`_\n* `Docker-compose \u003chttps://docs.docker.com/compose/\u003e`_\n\nRun the demo\n************\n\n* Run the SEQ server: ``docker-compose -f seq_test_server/docker-compose.yml up -d``\n* Run the demo script: ``docker-compose -up``\n* Open local `Seq server \u003chttp://localhost\u003e`_\n\n\nGoals\n-----\n\n- [ ] a formatter implementation that can be added to the structlog formatter chain. Its purpose is\n      to convert the event dictionary to the CLEF format.\n- [ ] a formatter that adds renderings for the message template tokens, ie.: round float values.\n      A basic rendering should be to call __str__() on the object.\n      This implementation should take type specific formatters as external dependencies.\n- [ ] a renderer implementation that can be added to the end of the formatter chain, that provides readable\n      rendered format from CLEF. This is mainly useful for local testing.\n\n\nIdeas\n-----\n- [ ] Exception message formatter, where the exception object itself can be the body of the message. or it is part of a\n      message template. Take some form of string representation of the exception, and add traceback as exc_info to the\n      event dict.\n\nNot in scope\n------------\n\n* Log handler that uses tcp/udp connection to deliver events to the Seq server.\n\n\nContribute\n----------\n\nAll contributions are welcome.\n\n\nGetting started\n---------------\nThis package uses Poetry for package and dependency management. I recommend reading the official documentation first:\nhttps://python-poetry.org/docs/\n\nPlace Celf format spec here\n---------------------------\n\n\nPython 2.x\n----------\n\nSorry but no python 2.x support is planned, its 2020. Python 2.7 support ended on the 1st of January 2020.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgjedlicska%2Fstructlog-to-seq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgjedlicska%2Fstructlog-to-seq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgjedlicska%2Fstructlog-to-seq/lists"}