{"id":15101957,"url":"https://github.com/markus-lamm/hv-sos100-logger","last_synced_at":"2026-02-06T08:01:34.521Z","repository":{"id":221564287,"uuid":"754631778","full_name":"markus-lamm/hv-sos100-logger","owner":"markus-lamm","description":"NuGet package used in SOA project. This package streamlines logging in the parent SOA project by automatically logging through an api or locally.","archived":false,"fork":false,"pushed_at":"2024-02-24T14:38:54.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-29T01:39:43.044Z","etag":null,"topics":["api","logging","nuget-package"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/markus-lamm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-02-08T13:16:42.000Z","updated_at":"2024-08-18T07:26:45.000Z","dependencies_parsed_at":"2024-02-13T14:37:53.930Z","dependency_job_id":"6d0a4603-2c66-4400-afb5-7d4c077fea03","html_url":"https://github.com/markus-lamm/hv-sos100-logger","commit_stats":{"total_commits":27,"total_committers":2,"mean_commits":13.5,"dds":0.2222222222222222,"last_synced_commit":"6c7cb09efe9dab244c37f830cbe6fead7596e4ef"},"previous_names":["markus-lamm/hv-sos100-logger"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/markus-lamm/hv-sos100-logger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markus-lamm%2Fhv-sos100-logger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markus-lamm%2Fhv-sos100-logger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markus-lamm%2Fhv-sos100-logger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markus-lamm%2Fhv-sos100-logger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markus-lamm","download_url":"https://codeload.github.com/markus-lamm/hv-sos100-logger/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markus-lamm%2Fhv-sos100-logger/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29155107,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T07:18:23.844Z","status":"ssl_error","status_checked_at":"2026-02-06T07:13:32.659Z","response_time":59,"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":["api","logging","nuget-package"],"created_at":"2024-09-25T18:43:41.504Z","updated_at":"2026-02-06T08:01:34.484Z","avatar_url":"https://github.com/markus-lamm.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Guide for the use of Hv.Sos100.Logger\n\n## Installation\n\nIn the top menu of Visual Studio select **Tools -\u003e NuGet Package Manager -\u003e Manage NuGet Packages for Solution**.\n\nSearch for **Hv.Sos100.Logger** and install the latest version of the NuGet package.\n\n## Using the logger\n\nThe logger should be used when any important information that should be recorded is created.\n\n\u003e [!IMPORTANT]\n\u003e If the log is created with the api it will be placed in the database of Group 6. If the log is created locally the log file will be avaliable in the computer running the system at `C:\\Temp\\Hv.Sos100.Logger.LocalLogs\\Log.txt`.\n\n1. Add the using statement\n \n```csharp\nusing Hv.Sos100.Logger;\n```\n\n2. Create an instance of the LogService\n\n```csharp\nvar logger = new LogService();\n```\n\n3. Call on the logging method using the LogService object. The first method can be used anywhere. The second method can only be used where an exception object is created, such as inside a try catch block.\n\n```csharp\nawait logger.CreateLog(\"mySystem\", LogService.Severity.Error, \"this is a message\");\n//OR\nawait logger.CreateLog(\"mySystem\", exception);\n```\n\n4. If you wish to specify where the logging should occour use the LogType parameter. The LogType parameter is optional and the method will default to Both if unspecified. Meaning it will attempt to create an api log and only a local log if unsuccessful.\n\n ```csharp\nawait logger.CreateLog(\"mySystem\", LogService.Severity.Error, \"this is a message\", LogService.LogType.Api);\n```\n\n\u003e [!NOTE]\n\u003e The NuGet consists of two public log methods both named `CreateLog`. Invoke the right method based on the parameters you use to call the method. One method expects an exception object, only use this variant inside a try catch block. The other method can be used universally and also inside a try catch block if you only want to use one variant of the method globally.\n\n## Example\n\n```csharp\n// Simulating a failed operation inside a try catch block\ntry\n{\n    //Api call or other non-guaranteed operation fails\n}\ncatch (Exception ex)\n{\n    // Create an instance of the LogService\n    var logger = new LogService();\n\n    // Call the api to log the issue\n    await logger.CreateLog(\"mySystem\", exception);\n}\n\n// Logging outside a try catch block\nif(true)\n{\n    await logger.CreateLog(\"mySystem\", LogService.Severity.Info, \"this is a message\");\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkus-lamm%2Fhv-sos100-logger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkus-lamm%2Fhv-sos100-logger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkus-lamm%2Fhv-sos100-logger/lists"}