{"id":15410521,"url":"https://github.com/sergio0694/bigwatson","last_synced_at":"2025-04-19T09:28:13.389Z","repository":{"id":88679632,"uuid":"83203136","full_name":"Sergio0694/BigWatson","owner":"Sergio0694","description":"A complete, ligthweight and self-contained .NET Standard 2.0 offline exception logging library, powered by Realm","archived":false,"fork":false,"pushed_at":"2018-11-07T18:18:12.000Z","size":294,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-23T21:42:33.815Z","etag":null,"topics":["android-library","asp-net","aspnetcore","csharp","dll","ios-lib","netstandard","netstandard20","realm","uwp","uwp-applications","uwp-apps","windows-10","windows-uwp","xamarin","xamarin-android","xamarin-ios","xamarin-library","xamarin-studio"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Sergio0694.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":"2017-02-26T11:19:43.000Z","updated_at":"2024-05-26T22:45:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"658b0580-f84f-4970-a1b8-50e8a3049d80","html_url":"https://github.com/Sergio0694/BigWatson","commit_stats":{"total_commits":129,"total_committers":2,"mean_commits":64.5,"dds":"0.15503875968992253","last_synced_commit":"f4330084be8a048a35e4f1ede0c48e272fbf3309"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sergio0694%2FBigWatson","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sergio0694%2FBigWatson/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sergio0694%2FBigWatson/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sergio0694%2FBigWatson/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sergio0694","download_url":"https://codeload.github.com/Sergio0694/BigWatson/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241399760,"owners_count":19956951,"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":["android-library","asp-net","aspnetcore","csharp","dll","ios-lib","netstandard","netstandard20","realm","uwp","uwp-applications","uwp-apps","windows-10","windows-uwp","xamarin","xamarin-android","xamarin-ios","xamarin-library","xamarin-studio"],"created_at":"2024-10-01T16:44:52.616Z","updated_at":"2025-03-01T17:30:39.874Z","avatar_url":"https://github.com/Sergio0694.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"![](https://i.imgur.com/W6bf5Ja.png)\n[![NuGet](https://img.shields.io/nuget/v/BigWatson.svg)](https://www.nuget.org/packages/BigWatson/) [![NuGet](https://img.shields.io/nuget/dt/BigWatson.svg)](https://www.nuget.org/stats/packages/BigWatson?groupby=Version) [![AppVeyor](https://img.shields.io/appveyor/ci/Sergio0694/bigwatson.svg)](https://ci.appveyor.com/project/Sergio0694/bigwatson) [![AppVeyor tests](https://img.shields.io/appveyor/tests/Sergio0694/bigwatson.svg)](https://ci.appveyor.com/project/Sergio0694/bigwatson) [![Twitter Follow](https://img.shields.io/twitter/follow/Sergio0694.svg?style=flat\u0026label=Follow)](https://twitter.com/SergioPedri)\n\nA .NET Standard 2.0 library to easily log and review offline exception reports and messages for an app.\n\n# Table of Contents\n\n- [Installing from NuGet](#installing-from-nuget)\n- [Quick start](#quick-start)\n  - [Setup](#setup) \n  - [Browse reports](#browse-reports)\n  - [Event logs](#event-logs)\n  - [External databases](#external-databases)\n- [Dependencies](#dependencies)\n- [Credits](#credits)\n\n# Installing from NuGet\n\nTo install **BigWatson**, run the following command in the **Package Manager Console**\n\n```\nInstall-Package BigWatson\n```\n\nMore details available [here](https://www.nuget.org/packages/BigWatson).\n\n## Quick start\n\nThe library exposes various APIs to easily log exceptions and then manage the logs database.\n\n### Setup\n\nThe only thing that's needed to get started with the library is to add an event handler to log the exceptions:\n\n```C#\nthis.UnhandledException += (s, e) =\u003e BigWatson.Instance.Log(e.Exception);\n```\n\nAnd that's it! The library will now automatically log every exception thrown by the app and build a complete database with all the crash reports and their useful info, including the app version and the app memory usage.\n\n**NOTE:** on some frameworks, the APIs used by the library to retrieve the amount of used memory are not supported and will cause a crash at runtime. In order to solve this, the `BigWatson` class exposes a `Func\u003clong\u003e MemoryParser` property that can be used to assign an arbitrary method, using the appropriate APIs for the target platform. Moreover, on some platforms it might be necessary to manually specify how to retrieve the correct app version as well. As an example, on UWP:\n\n```C#\nBigWatson.MemoryParser = () =\u003e (long)Windows.System.MemoryManager.AppMemoryUsage;\nBigWatson.VersionParser = () =\u003e\n{\n    PackageVersion version = Package.Current.Id.Version;\n    return new Version(version.Major, version.Minor, version.Build, version.Revision);\n}; \n```\n\n### Browse reports\n\nIt is possible to load the complete list of previous exception reports, sorted by app versions, using:\n\n```C#\nvar reports = await BigWatson.Instance.LoadExceptionsAsync();\n```\n\nTo load only the reports of a specific type, just use the following overload:\n\n```C#\nvar reports = await BigWatson.Instance.LoadExceptionsAsync\u003cInvalidOperationException\u003e();\n```\n\nIt is also possible to trim the local exceptions database by deleting old reports that are no longer needed:\n\n```C#\nawait BigWatson.Instance.TrimAsync(TimeSpan.FromDays(30));\n```\n\n### Event logs\n\nUsing **BigWatson** it is also possible to save event reports, which can be useful for analytics or debugging purposes:\n\n```C#\nBigWatson.Instance.Log(EventPriority.Info, \"The user used the app 2 times today\");\n```\n\n## External databases\n\nIf you want to share your crash reports database with someone else, or if you'd like your customers to be able to send their reports database to you, the library has some APIs to quickly share a database and load an external database file:\n\n```C#\n// Client-side\nawait BigWatson.Instance.ExportAsync(pathToExportDatabase);\n\n// Developer side\nIReadOnlyLogger logger = BigWatson.Load(pathToDatabase);\nvar reports = await logger.LoadExceptionsAsync();\n```\n\n## Dependencies\n\nThe libraries use the following libraries and NuGet packages:\n\n* [Realm.Database](https://www.nuget.org/packages/Realm.Database/)\n* [Newtonsoft.Json](https://www.nuget.org/packages/newtonsoft.json/)\n* [Ben.Demystifier](https://www.nuget.org/packages/Ben.Demystifier/)\n* [JetBrains.Annotations](https://www.nuget.org/packages/JetBrains.Annotations/)\n\n## Credits\n\nBigWatson UWP is an extension of the [LittleWatson](https://www.alexhardwicke.com/little-watson/) class by Alex Hardwicke. In addition to that, this updated library also includes an internal Realm database to store and retrieve previous logs, and additional APIs.\nThe icon base image was made by Aldric Rodríguez from [thenounproject.com](https://thenounproject.com/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergio0694%2Fbigwatson","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsergio0694%2Fbigwatson","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergio0694%2Fbigwatson/lists"}