{"id":22504895,"url":"https://github.com/u1035/disklogger","last_synced_at":"2026-05-16T17:36:45.953Z","repository":{"id":62251203,"uuid":"559121480","full_name":"u1035/DiskLogger","owner":"u1035","description":"Lightweight logger that writes data to files","archived":false,"fork":false,"pushed_at":"2023-03-02T06:24:45.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-03T12:38:51.625Z","etag":null,"topics":["csharp","log","logger","logging","logging-library","netstandard20","nuget-package"],"latest_commit_sha":null,"homepage":"https://www.nuget.org/packages/DiskLogger","language":"C#","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/u1035.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2022-10-29T05:50:42.000Z","updated_at":"2023-03-04T14:54:29.000Z","dependencies_parsed_at":"2025-02-02T01:37:20.737Z","dependency_job_id":null,"html_url":"https://github.com/u1035/DiskLogger","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/u1035%2FDiskLogger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/u1035%2FDiskLogger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/u1035%2FDiskLogger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/u1035%2FDiskLogger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/u1035","download_url":"https://codeload.github.com/u1035/DiskLogger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245938756,"owners_count":20697086,"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":["csharp","log","logger","logging","logging-library","netstandard20","nuget-package"],"created_at":"2024-12-07T00:11:04.714Z","updated_at":"2025-10-12T20:45:28.787Z","avatar_url":"https://github.com/u1035.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Nuget (with prereleases)](https://img.shields.io/nuget/vpre/DiskLogger)](https://www.nuget.org/packages/DiskLogger)\n[![Nuget](https://img.shields.io/nuget/dt/DiskLogger)](https://www.nuget.org/packages/DiskLogger)\n![GitHub](https://img.shields.io/github/license/u1035/DiskLogger)\n\n# DiskLogger\nLightweight application log library that writes debug files to disk.\nTargets .NET Standard 2.0 and can be used with different kinds of projects.\nProduces new file for each day, can use file prefix, writes information about log function caller ([CallerMemberName], [CallerFilePath], [CallerLineNumber]), adds timezone info to log record timestamp.\n\n(under slow lazy development)\n\nInspired by NLog, but I wanted to create simple solution by myself.\n\n## Usage\n\nAt first we need to initialize LogManager somewhere at application entry point:\n```csharp\nLogManager = new LogManager(\"C:\\\\Logs\", \"myApp\");\n```\nThis will make logger to create log files like\n```\nC:\\Logs\\myApp-2022-10-29.log\nC:\\Logs\\myApp-2022-10-30.log\n...\n```\n\nThen we need to create logger for class or context we need:\n```csharp\nvar _logger = LogManager.ForContext\u003cWorkerClass\u003e();\n//or\nvar _logger = LogManager.ForContext(\"SomeContext\");\n```\n\nIn code you can use logger like this:\n```csharp\n_logger.Trace(\"Some trace message\"); \n_logger.Notice(\"Some notice message\"); \n_logger.Debug(\"Some debug message\"); \n_logger.Info(\"Some info message\"); \n_logger.Warning(\"Some warning message\"); \n_logger.Error($\"Some error message: {exception.Message}\"); \n_logger.Fatal(\"Some fatal error message\"); \n```\nand get the following line in your log file:\n\n\u003e 2022-10-29T22:41:22.5116388+03:00|WorkerClass|PrintInfo|MainViewModel.cs|17|Debug|Message text\n\nWhere you will find time of event, context, name of function, source file name and line, severity of the message, and your message.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fu1035%2Fdisklogger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fu1035%2Fdisklogger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fu1035%2Fdisklogger/lists"}