{"id":13596617,"url":"https://github.com/PoShLog/PoShLog","last_synced_at":"2025-04-09T16:33:25.932Z","repository":{"id":48983418,"uuid":"199258540","full_name":"PoShLog/PoShLog","owner":"PoShLog","description":":nut_and_bolt:  PoShLog is PowerShell cross-platform logging module. It allows you to log structured event data into console, file and much more places easily. It's built upon great C# logging library Serilog - https://serilog.net/","archived":false,"fork":false,"pushed_at":"2022-11-21T09:49:12.000Z","size":638,"stargazers_count":199,"open_issues_count":9,"forks_count":18,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-11-06T19:46:14.450Z","etag":null,"topics":["enrichers","error-log","error-reporting","event","events","log","logger","logging","logs","module","powershell","powershell-logging-module","powershell-module","serilog","serilog-extension","serilog-for-powershell","serilog-sink","sinks","wrapper"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","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/PoShLog.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}},"created_at":"2019-07-28T07:50:29.000Z","updated_at":"2024-11-04T16:00:05.000Z","dependencies_parsed_at":"2023-01-22T16:00:32.926Z","dependency_job_id":null,"html_url":"https://github.com/PoShLog/PoShLog","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PoShLog%2FPoShLog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PoShLog%2FPoShLog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PoShLog%2FPoShLog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PoShLog%2FPoShLog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PoShLog","download_url":"https://codeload.github.com/PoShLog/PoShLog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248068022,"owners_count":21042402,"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":["enrichers","error-log","error-reporting","event","events","log","logger","logging","logs","module","powershell","powershell-logging-module","powershell-module","serilog","serilog-extension","serilog-for-powershell","serilog-sink","sinks","wrapper"],"created_at":"2024-08-01T16:02:36.105Z","updated_at":"2025-04-09T16:33:20.914Z","avatar_url":"https://github.com/PoShLog.png","language":"PowerShell","readme":"[![icon](https://github.com/PoShLog/PoShLog/blob/master/images/icons/poshlog-icon-64.png?raw=true)](https://github.com/PoShLog/PoShLog)\n\n# PoShLog\n\n[![psgallery](https://img.shields.io/powershellgallery/v/poshlog.svg)](https://www.powershellgallery.com/packages/PoShLog/) [![psgallery](https://img.shields.io/powershellgallery/dt/poshlog.svg)](https://www.powershellgallery.com/packages/PoShLog/) [![Discord](https://img.shields.io/discord/693754316305072199?color=orange\u0026label=discord)](https://discord.gg/FVdVxuw) [![Build Status](https://tomlabscloud.visualstudio.com/PoShLog/_apis/build/status/PoShLog.PoShLog%20-%20BuildOnly?branchName=master)](https://tomlabscloud.visualstudio.com/PoShLog/_build/latest?definitionId=17\u0026branchName=master) [![Support](https://img.shields.io/badge/%24-Support-blueviolet)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=GRARVRTVNEUHS)\n\n\u003eSerilog for powershell\n\nPoShLog is powershell cross-platform logging module. PoShLog allows you to log structured event data into **console**, **file** and much more [places](https://github.com/PoShLog/PoShLog/wiki/Sinks) easily.\nIt's built upon great C# logging library [Serilog](https://serilog.net/).\n\n## Key Features\n\n* [x] Structured log event data\n* [x] Clean and easy to use [API](https://github.com/PoShLog/PoShLog/wiki/Cmdlets)\n* [x] Cross-platform\n* [x] Easily extensible\n\n## Getting started\n\nIf you are familiar with PowerShell, skip to [Installation](#installation) section. For more detailed installation instructions check out [Getting started](https://github.com/PoShLog/PoShLog/wiki/Getting-started) wiki.\n\n### Installation\n\nTo install PoShLog, run following snippet from powershell:\n\n```ps1\nInstall-Module PoShLog\n```\n\n## Usage\n\nSetup logger using pipeline fluent API and write some log messages(*in this case into file and console*):\n\n```ps1\nImport-Module PoShLog\n\n# Create new logger\n# This is where you customize, when and how to log\nNew-Logger |\n    Set-MinimumLevel -Value Verbose | # You can change this value later to filter log messages\n    # Here you can add as many sinks as you want - see https://github.com/PoShLog/PoShLog/wiki/Sinks for all available sinks\n    Add-SinkConsole |   # Tell logger to write log messages to console\n    Add-SinkFile -Path 'C:\\Data\\my_awesome.log' | # Tell logger to write log messages into file\n    Start-Logger\n\n# Test all log levels\nWrite-VerboseLog 'Test verbose message'\nWrite-DebugLog 'Test debug message'\nWrite-InfoLog 'Test info message'\nWrite-WarningLog 'Test warning message'\nWrite-ErrorLog 'Test error message'\nWrite-FatalLog 'Test fatal message'\n\nClose-Logger\n```\n\n![poshlog_example_fullversion](images/poshlog_example_fullversion.png)\n\n[*For detailed documentation see wiki*](https://github.com/PoShLog/PoShLog/wiki)\n\nYou can(*and you should*) log formatted data:\n\n```ps1\nWrite-InfoLog 'Current date and time is {DateTime}' -PropertyValues (Get-Date)\n\n# Some example data\n$position = @{\n    Latitude = 25\n    Longitude = 134\n}\n$elapsedMs = 34\n\nWrite-InfoLog 'Processed {@Position} in {Elapsed:000} ms.' -PropertyValues $position, $elapsedMs\n```\n\n![poshlog_example_simplest_console](images/poshlog_example_structured_data.png)\n\nFluent API is too bulky? You don't need extra sinks? Use short setup version(*logs into console and [file](poshlog_example_simplest_file.png)*):\n\n```ps1\n# Create and start new logger\nStart-Logger -FilePath 'C:\\Data\\my_awesome.log' -Console\n\nWrite-InfoLog 'Hurrray, my first log message!'\n\n# Don't forget to close the logger\nClose-Logger\n```\n\n![poshlog_example_simplest_console](images/poshlog_example_simplest_console.png)\n\n### Extendability\n\nPoShLog is extensible just like Serilog. All available extensions can be found [here](https://github.com/PoShLog/PoShLog/wiki/Extension-modules).\n\n### Documentation\n\nThese examples are just to get you started fast. For more detailed documentation please check [wiki](https://github.com/PoShLog/PoShLog/wiki).\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\n### Show your support\n\n* :star: Star the PoShLog repository. This is the least you can do to support this project.\n* :thumbsup: Give us some feedback or suggest features using [Discussions](https://github.com/PoShLog/PoShLog/discussions) or [discord](https://discord.gg/FVdVxuw)\n* :mag_right: Test PoShLog and raise [issues](https://github.com/PoShLog/PoShLog/issues)\n* Contribute :rocket: you can start with [good first issues](https://github.com/PoShLog/PoShLog/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22)\n\n### Contributors\n\n* [Michael Zimmerli](https://github.com/gitbute)\n* [Martin Dennhardt](https://github.com/mamidenn)\n* [Brady Shober](https://github.com/BradyShober)\n* [Chris Hunt](https://github.com/cdhunt)\n\n### Building Locally\n\n1. Install PoShLog.Tools\n\n        Install-Module -Name PoShLog.Tools -Force -Verbose -Scope CurrentUser\n\n2. Import PoShLog.Tools\n\n        Import-Module -Name PoShLog.Tools\n\n3. Bootstrap the required modules\n\n        Bootstrap '.\\cd\\RequiredModules.psd1'\n\n4. Run the build script\n\n        Invoke-Build '.\\src\\PoShLog.Build.ps1' -Configuration '(Dev/Prod)' -Task Clean, BuildDependencies, CopyModuleFiles -ModuleVersion \"$(MajorVersion).$(MinorVersion).$(BugfixVersion)\"\n        \n\n## Authors\n\n* [**Tomáš Bouda**](http://tomasbouda.cz)\n\n## Release Notes\n\n* [v2.1.1](releaseNotes/v2.1.1.md)\n* [v2.1.0](releaseNotes/v2.1.0.md)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Credits\n\n* Serilog - [serilog.net](https://serilog.net/)\n* Icon made by [Smashicons](https://smashicons.com/) from [www.flaticon.com](https://www.flaticon.com/).\n","funding_links":["https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=GRARVRTVNEUHS"],"categories":["PowerShell","🔍 Logging","Logging"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPoShLog%2FPoShLog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPoShLog%2FPoShLog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPoShLog%2FPoShLog/lists"}