{"id":18752992,"url":"https://github.com/spotify/ulogger","last_synced_at":"2026-02-10T21:32:28.760Z","repository":{"id":48976506,"uuid":"109312552","full_name":"spotify/ulogger","owner":"spotify","description":"A simple micrologging framework","archived":false,"fork":false,"pushed_at":"2024-05-21T07:01:06.000Z","size":76,"stargazers_count":18,"open_issues_count":3,"forks_count":5,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-12-26T16:51:11.392Z","etag":null,"topics":["logging"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spotify.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-11-02T19:57:29.000Z","updated_at":"2025-12-11T18:18:23.000Z","dependencies_parsed_at":"2023-11-29T21:25:55.089Z","dependency_job_id":"311d2e4a-e28e-477c-83ed-b1216ccd7a01","html_url":"https://github.com/spotify/ulogger","commit_stats":{"total_commits":38,"total_committers":4,"mean_commits":9.5,"dds":0.4473684210526315,"last_synced_commit":"aafe6dd302efabe59f407ce2e4640d5fc121d92d"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/spotify/ulogger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spotify%2Fulogger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spotify%2Fulogger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spotify%2Fulogger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spotify%2Fulogger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spotify","download_url":"https://codeload.github.com/spotify/ulogger/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spotify%2Fulogger/sbom","scorecard":{"id":842238,"data":{"date":"2025-08-11","repo":{"name":"github.com/spotify/ulogger","commit":"6ff7f68ba8da89799be63da26abd061165a8eb23"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.3,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":9,"reason":"Found 11/12 approved changesets -- score normalized to 9","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/main.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/spotify/ulogger/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/spotify/ulogger/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/spotify/ulogger/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/spotify/ulogger/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:48: update your workflow using https://app.stepsecurity.io/secureworkflow/spotify/ulogger/main.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:52: update your workflow using https://app.stepsecurity.io/secureworkflow/spotify/ulogger/main.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:64: update your workflow using https://app.stepsecurity.io/secureworkflow/spotify/ulogger/main.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:29","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:30","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:31","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:58","Warn: pipCommand not pinned by hash: .github/workflows/main.yml:59","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   5 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":6,"reason":"4 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-8qvm-5x2c-j2w7","Warn: Project is vulnerable to: PYSEC-2022-42969","Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T20:44:14.639Z","repository_id":48976506,"created_at":"2025-08-23T20:44:14.639Z","updated_at":"2025-08-23T20:44:14.639Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29317956,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T20:44:44.282Z","status":"ssl_error","status_checked_at":"2026-02-10T20:44:43.393Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["logging"],"created_at":"2024-11-07T17:23:39.108Z","updated_at":"2026-02-10T21:32:28.728Z","avatar_url":"https://github.com/spotify.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ulogger\n\n[![Build Status](https://github.com/spotify/ulogger/actions/workflows/main.yml/badge.svg)](https://github.com/spotify/ulogger/actions/workflows/main.yml) [![Test Coverage](https://codecov.io/github/spotify/ulogger/branch/master/graph/badge.svg)](https://codecov.io/github/spotify/ulogger)\n\nA micro Python logging library.\n\nSupported handlers:\n\n* stream (stdout)\n* syslog\n* [stackdriver](https://cloud.google.com/logging/) (_optional_)\n\n## Requirements\n\n* Python 3.7. Tests also pass on Python 3.8.  PyPy support has been removed due to upstream issues with the grpcio module.\n* Support for Linux \u0026 OS X\n\n## To Use\n\n    ```sh\n    (env) $ pip install ulogger\n    # To use the stackdriver handler, you need to specify an extra dependency:\n    (env) $ pip install \"ulogger[stackdriver]\"\n    ```\n\n    ```python\n    import logging\n    from ulogger import setup_logging\n\n    # one handler\n    setup_logging('my_program', 'INFO', ['syslog'])\n\n    # multiple handlers\n    setup_logging('my_program', 'INFO', ['syslog', 'stream'])\n\n    # use a different logging facility for syslog (default 16/LOG_LOCAL0)\n    setup_logging('my_program', 'INFO', ['syslog'], facility=1)\n    setup_logging('my_program', 'INFO', ['syslog'], facility=logging.handlers.SysLogHandler.LOG_USER)\n\n    # then log messages normally\n    logging.info('ohai')\n    ```\n\nTo just setup a specific handler, e.g. Syslog:\n\n    ```python\n    import logging\n    from ulogger import syslog\n\n    logger = logging.getLogger('my_logger')\n    handler = syslog.get_handler('my_program')\n    logger.addHandler(handler)\n    ```\n\nTo setup a Syslog handler with a specific address:\n\n    ```python\n    import logging\n    from ulogger import syslog\n\n    logger = logging.getLogger('my_logger')\n\n    syslog_addr = ('10.99.0.1', 9514)  # (host, port) tuple\n    # if just a host is given, the default port 514 is used\n    syslog_addr = ('localhost', None)  # (host, port)\n    # filepath is supported\n    syslog_addr = '/dev/log'\n\n    handler = syslog.get_handler('my_program', address=syslog_addr)\n\n    # env vars are also supported, but will be overwritten if `address` is explicitly given\n    os.environ['SYSLOG_HOST'] = 'localhost'\n    os.environ['SYSLOG_PORT'] = 325\n    handler = syslog.get_handler('my_program')\n\n    # TCP \u0026 UDP are supported\n    proto = 1  # TCP\n    proto = socket.SOCK_STREAM  # TCP\n    proto = 2  # UDP - default\n    proto = socket.SOCK_DGRAM  #  UDP - default\n\n    handler = syslog.get_handler('my_program', address=syslog_addr, proto=proto)\n    logger.addHandler(handler)\n    ```\n\n### Formatting\n\n#### Default\n\nThe default date format for all handlers is the following: `'%Y-%m-%dT%H:%M:%S'` (example `2017-11-02T09:51:33.792`).\n\nThe default log format is slightly different depending on the handler you select:\n\n##### Stream Handler Log Format\n\n    ```python\n    '%(asctime)s.%(msecs)03dZ \u003cPROGNAME\u003e (%(process)d) %(levelname)s: %(message)s'\n    ```\n\nExample:\n\n    ```text\n    2017-11-02T09:51:33.792Z my_awesome_program (63079) INFO: Beginning awesome program v3.\n    ```\n\n##### Syslog Handler Log Format on Linux\n\n    ```python\n    '%(asctime)s.%(msecs)03dZ \u003cPROGNAME\u003e (%(process)d): %(message)s'\n    ```\n\nExample:\n\n    ```text\n    2017-11-02T09:51:33.792Z my_awesome_program (63079): Beginning awesome program v3.\n    ```\n\n##### Syslog Handler Log Format on OS X\n\n    ```python\n    '\u003cPROGNAME\u003e (%(process)d): %(message)s'\n    ```\n\nExample:\n\n    ```text\n    Aug 25 13:00:51 my-host.example.net my_awesome_program (63079): Beginning awesome program v3.\n    ```\n\n**NOTE**: Default syslog on OS X appends the date and hostname to the log record.\n\n##### Stackdriver Handler Log Format\n\n    ```python\n    '%(asctime)s.%(msecs)03d \u003cHOST\u003e \u003cPROGNAME\u003e (%(process)d): %(message)s'\n    ```\n\nExample:\n\n    ```text\n    2017-11-02T19:00:55.850 my-gcp-host my_awesome_program (63079): Beginning awesome program v3\"\n    ```\n\n#### Custom\n\nTo add your custom log and/or date formatter:\n\n    ```python\n    import logging\n    from ulogger import setup_logging\n\n    log_fmt = '%(created)f %(levelno)d %(message)s'\n    log_date_fmt = '%Y-%m-%dT%H:%M:%S'\n\n    setup_logging('my_program', 'INFO', ['syslog'], log_fmt, log_date_fmt)\n    ```\n\n## Development\n\nFor development and running tests, your system must have all supported versions of Python installed. We suggest using [pyenv](https://github.com/yyuu/pyenv).\n\n### Setup\n\n    ```sh\n    $ git clone git@github.com:spotify/ulogger.git \u0026\u0026 cd ulogger\n    # make a virtualenv\n    (env) $ pip install -r dev-requirements.txt\n    ```\n\n### Running tests\n\nTo run the entire test suite:\n\n    ```sh\n    # outside of the virtualenv\n    # if tox is not yet installed\n    $ pip install tox\n    $ tox\n    ```\n\nIf you want to run the test suite for a specific version of Python:\n\n    ```sh\n    # outside of the virtualenv\n    $ tox -e py37\n    ```\n\nTo run an individual test, call `pytest` directly:\n\n    ```sh\n    # inside virtualenv\n    (env) $ pytest tests/test_syslog.py\n    ```\n\n## Code of Conduct\n\nThis project adheres to the [Open Code of Conduct][code-of-conduct]. By participating, you are expected to honor this code.\n\n[code-of-conduct]: https://github.com/spotify/code-of-conduct/blob/master/code-of-conduct.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspotify%2Fulogger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspotify%2Fulogger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspotify%2Fulogger/lists"}