{"id":20757209,"url":"https://github.com/vapor-community/multilogging","last_synced_at":"2025-04-29T08:53:05.749Z","repository":{"id":63921203,"uuid":"138269413","full_name":"vapor-community/MultiLogging","owner":"vapor-community","description":"Logging utility package for Vapor 3","archived":false,"fork":false,"pushed_at":"2019-08-21T06:29:13.000Z","size":21,"stargazers_count":5,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-14T20:43:34.444Z","etag":null,"topics":["logging","logging-library","spm","swfit","vapor","vapor-3"],"latest_commit_sha":null,"homepage":null,"language":"Swift","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/vapor-community.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}},"created_at":"2018-06-22T07:21:26.000Z","updated_at":"2021-11-06T08:49:10.000Z","dependencies_parsed_at":"2023-01-14T14:15:20.579Z","dependency_job_id":null,"html_url":"https://github.com/vapor-community/MultiLogging","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vapor-community%2FMultiLogging","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vapor-community%2FMultiLogging/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vapor-community%2FMultiLogging/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vapor-community%2FMultiLogging/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vapor-community","download_url":"https://codeload.github.com/vapor-community/MultiLogging/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251470281,"owners_count":21594523,"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":["logging","logging-library","spm","swfit","vapor","vapor-3"],"created_at":"2024-11-17T09:40:45.808Z","updated_at":"2025-04-29T08:53:05.727Z","avatar_url":"https://github.com/vapor-community.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MultiLogging\n[![Vapor 3](https://img.shields.io/badge/vapor-3.0-blue.svg?style=flat)](https://vapor.codes)\n[![Swift 4.1](https://img.shields.io/badge/swift-4.2-orange.svg?style=flat)](http://swift.org)\n\n##\n\nMultiLogging is a Vapor 3 utility package for logging. It allows you to log to files, Discord and Slack next to the default console logger. Next to that it allows you to run multiple loggers at once, so you can log to, for example, both Console and Discord\n\n## Installation\nMultiLogging can be installed using SPM\n```swift\n.package(url: \"https://github.com/vapor-community/MultiLogging.git\", from: \"0.0.1\")\n```\n\n## Usage\nSetting up MultiLogging is easy to do and requires only little code.\n\n### Registering a logger\nIn your `Configure.swift` file, add the following for each logger you want to use:\n```swift\nservices.register(LoggerNameConfig(\u003cparams\u003e))\nservices.register(LoggerName.self)\n```\nSo for the Discord logger that'd be something like this:\n```swift\nservices.register(DiscordLoggerConfig(prodURL: \"webhookURL\", useEmbeds: true))\nservices.register(DiscordLogger.self)\n```\n\n### Setting which loggers to use\nIf you only want to use one logger, prefer that logger in your config like so:\n```swift\nconfig.prefer(DiscordLogger.self, for: Logger.self)\n```\nIf you however want to use multiple, say the discord logger and the default console logger, add the following:\n```swift\nservices.register(MultiLoggerConfig(types: [.discord, .console])) // Order does not matter\nservices.register(MultiLogger.self)\nconfig.prefer(MultiLogger.self, for: Logger.self)\n```\n\n### Advanced\n\nCOMMING SOON","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvapor-community%2Fmultilogging","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvapor-community%2Fmultilogging","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvapor-community%2Fmultilogging/lists"}