13 Commits
v1.0.1 ... main

Author SHA1 Message Date
mc
a8c04bdcf9 Update README.md
Some checks failed
Pack and Push NuGet Package / publish (push) Failing after 51s
2025-07-06 20:05:02 +00:00
mc
6d1064bb9a Update README.md
Some checks failed
Pack and Push NuGet Package / publish (push) Failing after 45s
2025-07-05 16:48:31 +00:00
049300a74d Wording.
Some checks failed
Pack and Push NuGet Package / publish (push) Failing after 45s
2025-07-05 01:41:12 +02:00
a112992a51 Wording.
Some checks failed
Pack and Push NuGet Package / publish (push) Failing after 43s
2025-07-05 01:40:29 +02:00
366f03dae8 Assets.
Some checks failed
Pack and Push NuGet Package / publish (push) Failing after 44s
2025-07-05 01:39:05 +02:00
mc
8361aa095e Update README.md
Some checks failed
Pack and Push NuGet Package / publish (push) Failing after 44s
Added shield.io badges.
2025-07-02 10:08:45 +00:00
c29513079f Removed obsolete comment and solution file added to reference the build steps.
Some checks failed
Pack and Push NuGet Package / publish (push) Failing after 45s
2025-07-01 19:45:48 +02:00
44e41a183b License file added to repo (MIT).
Some checks failed
Pack and Push NuGet Package / publish (push) Failing after 46s
2025-07-01 18:04:42 +02:00
mc
d5b151a8a7 Update README.md
Some checks failed
Pack and Push NuGet Package / publish (push) Failing after 46s
2025-07-01 15:56:03 +00:00
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
10 changed files with 48 additions and 5 deletions

7
LICENSE Normal file
View File

@ -0,0 +1,7 @@
Copyright 2024 Ondřej Mašita
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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.
[!["give me a tip"](https://img.shields.io/badge/give%20me%20a%20-tip-FFD200)](https://paypal.me/emsicz) [!["see my github"](https://img.shields.io/badge/see%20my%20-github-1F2328)](https://github.com/masiton?tab=repositories)
Portaloggy is 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`
## 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: 11 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

View File

@ -12,8 +12,6 @@
logger.Error("This is an error with exception.", new ArgumentException("Exception message."));
logger.Debug("This is a debug message.");
logger.Trace("This is a trace message.");
// dotnet nuget push "C:\Git\portaloggy\code\portaloggy\bin\Debug\portaloggy.1.0.2.nupkg" -s https://bagetter.masita.net/v3/index.json -k nikdysenebavtespolicii
}
}
}

View File

@ -7,6 +7,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "portaloggy", "portaloggy\po
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "portaloggy.Tester", "portaloggy.Tester\portaloggy.Tester.csproj", "{4BE8310F-EC55-443C-A5AF-3C2D065E314C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8EC462FD-D22E-90A8-E5CE-7E832BA40C5D}"
ProjectSection(SolutionItems) = preProject
..\.gitea\workflows\publish-nuget.yml = ..\.gitea\workflows\publish-nuget.yml
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU

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>