4 Commits

Author SHA1 Message Date
03aebc8ca1 License and icons added.
All checks were successful
Pack and Push NuGet Package / publish (push) Successful in 44s
2025-07-01 17:46:14 +02:00
mc
17442ae6ba Update README.md
Some checks failed
Pack and Push NuGet Package / publish (push) Failing after 47s
2025-07-01 14:22:39 +00:00
9cbb6488d2 Usage example image added.
Some checks failed
Pack and Push NuGet Package / publish (push) Failing after 48s
2025-07-01 16:10:28 +02:00
mc
d0eb095ebc Update README.md
Some checks failed
Pack and Push NuGet Package / publish (push) Failing after 46s
2025-07-01 14:08:06 +00:00
7 changed files with 36 additions and 3 deletions

View File

@ -1,3 +1,25 @@
# portaloggy
A highly-portable, multi-platform, system-agnostic logging abstraction. Use portaloggy.ILogger everywhere. Make use of portaloggy.LoggerExtensions. Already contains ConsoleLogger for dead-simple console logging and AggregatedLogger for simultaneous logging to your own implementation of ILogger.
A minimal, highly-portable, thread-safe .NET logging abstraction and implementation. Use `portaloggy.ILogger` everywhere. Make use of `portaloggy.LoggerExtensions` to make easy logging even easier. Already contains `ConsoleLogger` for dead-simple console logging and `AggregatedLogger` for simultaneous logging to multiple instances of `ILogger`.
![Screenshot of example use of the library.](https://gitea.masita.net/mc/portaloggy/raw/commit/9cbb6488d2ca1a71877902ca51b056c93eb81ffc/assets/example-use-1.jpg)
## Why
Existing logging solutions were too complicated for me. I want something I just instantiate, it has no decorators, formatters, loaders, configs, extensions for init, and tons of other garbage just so it can log a fucking message to a console window.
## How to use
Add nuget resource to Visual Studio, install the package and write `var logger = new ConsoleLogger();` it's literally this simple. It will straight up start logging (pretty) messages to console, with accurate time, severity, message and even exception formatting and stacktrace if you provide the arguments.
You are free to provide additional implementations for `ILogger` interface, i.e. Serilog, log4net or others. Portaloggy, however, maintains absolutely minimal footprint in your assemblies, doesn't require generic instantiation and yet figures out Exception stacks all the same. It's just dead simple to use everywhere and wire existing, bulky, complicated logging solutions only at bootstrap.
### NuGet source
`https://gitea.masita.net/api/packages/mc/nuget/index.json`
You must provide login credentials.
## How it works
See `ILogger` interface. It's really simple. Use [extensions](https://gitea.masita.net/mc/portaloggy/src/commit/9cbb6488d2ca1a71877902ca51b056c93eb81ffc/code/portaloggy/LoggerExtensions.cs) to provide friendlier use for usual usecases separated by severity (`Warning()`, `Error()`, etc.).

BIN
assets/example-use-1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

View File

@ -6,9 +6,20 @@
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Title>portaloggy</Title>
<Authors>mc</Authors>
<AssemblyVersion>1.0.1</AssemblyVersion>
<AssemblyVersion>1.0.2</AssemblyVersion>
<Version>$(AssemblyVersion)</Version>
<Description>A highly-portable, multi-platform, system-agnostic logging abstraction. Use portaloggy.ILogger everywhere. Make use of portaloggy.LoggerExtensions. Already contains ConsoleLogger for dead-simple console logging and AggregatedLogger for simultaneous logging to your own implementation of ILogger.</Description>
<Description>A minimal, highly-portable, thread-safe .NET logging abstraction and implementation.</Description>
<Copyright>mc @ 2024</Copyright>
<PackageProjectUrl>https://gitea.masita.net/mc/portaloggy</PackageProjectUrl>
<PackageIcon>portaloggy-icon.128.png</PackageIcon>
<RepositoryUrl>https://gitea.masita.net/mc/portaloggy</RepositoryUrl>
<PackageTags>log;logging;console</PackageTags>
<PackageLicenseExpression>MIT-0</PackageLicenseExpression>
</PropertyGroup>
<ItemGroup>
<None Include="..\..\assets\portaloggy-icon.128.png">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>
</Project>