{"id":21846602,"url":"https://github.com/binarybirds/swift-log-env","last_synced_at":"2026-05-16T21:08:50.510Z","repository":{"id":224782540,"uuid":"764205298","full_name":"BinaryBirds/swift-log-env","owner":"BinaryBirds","description":"Create custom loggers using a subsystem identifier and a log level.","archived":false,"fork":false,"pushed_at":"2024-02-27T17:21:17.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-19T13:17:13.332Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","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/BinaryBirds.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-02-27T17:03:32.000Z","updated_at":"2024-02-29T15:48:24.000Z","dependencies_parsed_at":"2024-02-27T18:49:02.697Z","dependency_job_id":null,"html_url":"https://github.com/BinaryBirds/swift-log-env","commit_stats":null,"previous_names":["binarybirds/swift-log-env"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinaryBirds%2Fswift-log-env","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinaryBirds%2Fswift-log-env/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinaryBirds%2Fswift-log-env/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BinaryBirds%2Fswift-log-env/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BinaryBirds","download_url":"https://codeload.github.com/BinaryBirds/swift-log-env/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244831061,"owners_count":20517620,"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":[],"created_at":"2024-11-27T23:14:41.022Z","updated_at":"2026-05-16T21:08:50.505Z","avatar_url":"https://github.com/BinaryBirds.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Swift Logging Environment\n\nCreate custom loggers scoped by subsystem and log level. Provides precise, fine-grained control over logging behavior across different environments.\n\n[![Release: 2.0.0](https://img.shields.io/badge/Release-2.0.0-F05138)]( https://github.com/binarybirds/swift-log-env/releases/tag/2.0.0)\n\n## Requirements\n\n![Swift 6.1+](https://img.shields.io/badge/Swift-6%2E1%2B-F05138)\n![Platforms: macOS, iOS, tvOS, watchOS, visionOS](https://img.shields.io/badge/Platforms-macOS_%7C_iOS_%7C_tvOS_%7C_watchOS_%7C_visionOS-F05138)\n\n- Swift 6.1+\n- Platforms:\n  - Linux\n  - macOS 15+\n  - iOS 18+\n  - tvOS 18+\n  - watchOS 11+\n  - visionOS 2+\n\n## Installation\n\nUse Swift Package Manager; add the dependency to your `Package.swift` file:\n\n```swift\n.package(url: \"https://github.com/binarybirds/swift-log-env\", from: \"2.0.0\"),\n```\n\nThen add `LoggingEnvironment` to your target dependencies:\n\n```swift\n.product(name: \"LoggingEnvironment\", package: \"swift-log-env\"),\n```\n\nUpdate the packages and you are ready.\n\n## Usage\n\n[![DocC API documentation](https://img.shields.io/badge/DocC-API_documentation-F05138)](https://binarybirds.github.io/swift-log-env)\n\nAPI documentation is available at the following link.\n\n## Basic example\n\n```swift\nimport LoggingEnvironment\n\nlet libLogger = Logger.subsystem(\"my-lib\", .notice)\nlet appLogger = Logger.subsystem(\"my-app\", .notice)\n\n// LOG_LEVEL=info MY_LIB_LOG_LEVEL=trace swift run MyApp\n```\n\nThis imports `LoggingEnvironment` and creates two loggers scoped to `my-lib` and `my-app` with a default `.notice` level. At runtime, environment variables override these levels: `LOG_LEVEL` sets a global minimum, while `MY_LIB_LOG_LEVEL` applies a more specific level to the `my-lib` subsystem, enabling per-subsystem logging control without code changes.\n\n## Development\n\n- Build: `swift build`\n- Test:\n  - local: `swift test`\n  - using Docker: `make docker-test`\n- Format: `make format`\n- Check: `make check`\n\n## Contributing\n\n[Pull requests](https://github.com/BinaryBirds/swift-log-env/pulls) are welcome. Please keep changes focused and include tests for new logic.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinarybirds%2Fswift-log-env","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinarybirds%2Fswift-log-env","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinarybirds%2Fswift-log-env/lists"}