{"id":17041614,"url":"https://github.com/varon/fslogger","last_synced_at":"2025-04-12T14:33:13.921Z","repository":{"id":52714412,"uuid":"56584103","full_name":"varon/FSLogger","owner":"varon","description":"A rich, simple, and efficient purely functional micro logging library for F#","archived":false,"fork":false,"pushed_at":"2024-05-22T13:48:56.000Z","size":374,"stargazers_count":12,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-26T09:05:48.183Z","etag":null,"topics":["fsharp","logger","logging","logging-library","logs"],"latest_commit_sha":null,"homepage":"","language":"F#","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/varon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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-04-19T09:35:42.000Z","updated_at":"2024-05-22T13:48:59.000Z","dependencies_parsed_at":"2024-05-22T14:53:46.885Z","dependency_job_id":null,"html_url":"https://github.com/varon/FSLogger","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/varon%2FFSLogger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/varon%2FFSLogger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/varon%2FFSLogger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/varon%2FFSLogger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/varon","download_url":"https://codeload.github.com/varon/FSLogger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248581361,"owners_count":21128155,"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":["fsharp","logger","logging","logging-library","logs"],"created_at":"2024-10-14T09:12:54.964Z","updated_at":"2025-04-12T14:33:13.897Z","avatar_url":"https://github.com/varon.png","language":"F#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# F#ing Simple Logger\n\nAn rich, simple, and efficient micro logging library for F#.\n\nThis isn't frequently updated because it's literally perfect (well, probably, almost).\n\nThis is used in several production systems. It's great. It's perfect, and you should use it!\n\n## Is this any good?\nf\nYes and you should use it.\n\n## Is this still maintained?\n\nYes, as of 2024 - we're just mostly feature complete here. How complicated could logging be anyway?\n\n## Installation\n\nYou can install it via NuGet. You should already know how to do that.\nThis runs on .NET Core, 6.0, 7.0, 8.0, etc. Go forth and use it.\n\n\n## HOW TO LOG STUFF:\n\n```fsharp\n\nlet smartDevCount = 5\nlet devCount = 5\n\nopen FSLogger\nlet log = Logger.ColorConsole\nlog.I \"Uzing da librariez\" // log to info\n\nlet descr = \"best\"\nlog.N $\"This is the ${descr} library\" // log to notice using 5.0-style interpolation\n\n```\n\n## Is that it?\n\nOkay fine. The library can do a bunch of stuff.  \n\nAlso has some nice colour output by default.\n\n\n## More examples\n\n### Setting a path to log stuff to:\n\n```fsharp\nopen FSLogger\n\nlet log = \n    Logger.ColorConsole\n    |\u003e Logger.withPath \"MyApp\"\n\nmodule SeriousBusiness = \n    let doStuff (log: Logger) (aNumber: int) =\n        // shadow with a better path\n        let log =  log |\u003e Logger.appendPath \"doStuff\"\n        if aNumber \u003e 5 then\n            log.W $\"Oh no, {aNumber} is bigger than 5!\"\n            // do something important\n\t    ignore aNumber\n```\n\n\n### Adding a custom consumer:\n\n```fsharp\nlet enterpriseConsumer (l:LogEntry) = \n\tmatch l.Level with\n\t| LogLevel.Warn -\u003e callManagement(l.Message)\n\t| LogLevel.Error -\u003e blameAnotherDeveloper(l.Message)\n\t| LogLevel.Fatal -\u003e submitNewJobApplication()\n\t| _ -\u003e () // ignore the rest\n\nlet log = \n\tLogger.Console\n\t|\u003e Logger.addConsumer enterpriseConsumer\n```\n\n\n## I want more examples!\n\n[Read the source code! It's super simple and documented.](https://github.com/varon/FSLogger/blob/master/src/FSLogger/Logger.fs)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaron%2Ffslogger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvaron%2Ffslogger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaron%2Ffslogger/lists"}