{"id":18062163,"url":"https://github.com/messeb/mssentrycocoalumberjack","last_synced_at":"2025-09-02T11:08:56.692Z","repository":{"id":56920813,"uuid":"59849889","full_name":"messeb/MSSentryCocoaLumberjack","owner":"messeb","description":"Custom logger for CocoaLumberjack that logs to Sentry","archived":false,"fork":false,"pushed_at":"2024-03-29T21:57:10.000Z","size":194,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-13T17:58:44.127Z","etag":null,"topics":[],"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/messeb.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,"publiccode":null,"codemeta":null}},"created_at":"2016-05-27T16:53:47.000Z","updated_at":"2016-05-27T16:55:39.000Z","dependencies_parsed_at":"2024-12-18T19:23:00.656Z","dependency_job_id":"957a8a93-7c13-4247-bf90-6d341b2a70da","html_url":"https://github.com/messeb/MSSentryCocoaLumberjack","commit_stats":{"total_commits":4,"total_committers":2,"mean_commits":2.0,"dds":0.25,"last_synced_commit":"2dc1000a79bcadd6214cf7fe62c72fbda28a2f8d"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/messeb/MSSentryCocoaLumberjack","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/messeb%2FMSSentryCocoaLumberjack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/messeb%2FMSSentryCocoaLumberjack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/messeb%2FMSSentryCocoaLumberjack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/messeb%2FMSSentryCocoaLumberjack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/messeb","download_url":"https://codeload.github.com/messeb/MSSentryCocoaLumberjack/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/messeb%2FMSSentryCocoaLumberjack/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273272611,"owners_count":25075999,"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","status":"online","status_checked_at":"2025-09-02T02:00:09.530Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-10-31T05:06:01.307Z","updated_at":"2025-09-02T11:08:56.667Z","avatar_url":"https://github.com/messeb.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MSSentryCocoaLumberjack\n\n[![CI Status](http://img.shields.io/travis/messeb/MSSentryCocoaLumberjack.svg?style=flat)](https://travis-ci.org/messeb/MSSentryCocoaLumberjack)\n[![Version](https://img.shields.io/cocoapods/v/MSSentryCocoaLumberjack.svg?style=flat)](http://cocoapods.org/pods/MSSentryCocoaLumberjack)\n[![License](https://img.shields.io/cocoapods/l/MSSentryCocoaLumberjack.svg?style=flat)](http://cocoapods.org/pods/MSSentryCocoaLumberjack)\n[![Platform](https://img.shields.io/cocoapods/p/MSSentryCocoaLumberjack.svg?style=flat)](http://cocoapods.org/pods/MSSentryCocoaLumberjack)\n\nMSSentryLogger is a custom logger for [CocoaLumberjack](https://github.com/CocoaLumberjack/CocoaLumberjack) that logs to [Sentry](https://www.getsentry.com/).\n\nIt contains a mapping from the CocoaLumberJack `DDLogFlag` to the `RavenLogEvent`. You can call the CocoaLumberjack logging function and it will produce a corresponding event in Sentry.\n\n### Mapping\n\n| CocoaLumberjack | Sentry |\n|-----------------|--------|\n| DDLogDebug      | Debug  |\n| DDLogInfo       | Info   |\n| DDLogWarn       | Warning|\n| DDLogError      | Error  |\n\n### Custom tags and extra\n\nYou can add custom tags und extra data in your CocoaLumberjack message.\n\nCustom tags can be added as semicolon seperated list in square brackets, like\n```\n[id=userId;version=1.2.0;filename=Class.swift]\n```\n\nCustom extra data can be added as semicolon seperated list in curly brackets, like\n```\n{device=iPhone7;action=readFile}\n```\n\nA complete message can be:\n```\nFatal error message, can execute action [id=userId;version=1.2.0;filename=Class.swift] {device=iPhone7;action=readFile}\n```\n\n\n##Installation\n\nUsing [CocoaPods](http://www.cocoapods.org):\n\n```ruby\npod \"MSSentryCocoaLumberjack\"\n```\n\n\n## Usage\n\nYou need a [Sentry](https://getsentry.com) account.\n\nImport the pod and create a new `MSSentryLogger` instance with your credentials (DSN)\n\n```\nimport MSSentryCocoaLumberjack\n\n// ... \n\nlet sentryLogger = MSSentryLogger(dsn: \u003cYOUR DSN\u003e)\n\n```\n\nThan add the new logger to the CocoaLumberjack loggers\n\n```\nDDLog.addLogger(sentryLogger)\n```\n\nNow you can call the CocoaLumberjack logging functions (`DDLogDebug`, `DDLogInfo`, `DDLogWarn`, `DDLogError`) and a Sentry log event will be created.\n\nIf you only want to see a certain level, such as errors, add with a level\n\n```\nDDLog.addLogger(sentryLogger, withLevel: .Error)\n```\n\n### Sentry properties\n\nOn the `MSSentryLogger` instance you can modify values for `user`, `tags` and `extra`. These are `[String: AnyObject]` dictionaries and the set values will be send in the next requests.\n\n```\n// user has predefined keys by Sentry\nsentryLogger?.user = [\"id\": \"4711\", \"username\": \"John Doe\", \"email\": \"john.doe@example.com\", \"ip_address\": \n\"127.0.0.1\"]\n\nsentryLogger?.tags = [\"tag1\": \"value1\", \"tag2\": \"value2\"]\n\nsentryLogger?.extra = [\"extra1\": \"\"valueXYZ\"]\n\n```\n\nYou can always set new values to `user`, `tags` and `extra`. For more information take a look at the Sentry documentation: [https://docs.getsentry.com/hosted/learn/context/](https://docs.getsentry.com/hosted/learn/context/)\n\n## Example\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\nIn the example app you can add your credentials and trigger logs to Sentry:\n\n![Sentry Example App](./docs/example_app.png)\n\nYou will see the event instantly in your Sentry account\n\n## Author\n\nmesseb\n\n## License\n\nMSSentryCocoaLumberjack is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmesseb%2Fmssentrycocoalumberjack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmesseb%2Fmssentrycocoalumberjack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmesseb%2Fmssentrycocoalumberjack/lists"}