Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a8c04bdcf9 | |||
| 6d1064bb9a | |||
| 049300a74d | |||
| a112992a51 | |||
| 366f03dae8 | |||
| 8361aa095e | |||
| c29513079f | |||
| 44e41a183b | |||
| d5b151a8a7 | |||
| 03aebc8ca1 | |||
| 17442ae6ba | |||
| 9cbb6488d2 | |||
| d0eb095ebc |
7
LICENSE
Normal file
7
LICENSE
Normal 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.
|
||||
24
README.md
24
README.md
@ -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.
|
||||
[](https://paypal.me/emsicz) [](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`.
|
||||
|
||||

|
||||
|
||||
## 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
BIN
assets/example-use-1.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 63 KiB |
BIN
assets/portaloggy-icon.128.png
Normal file
BIN
assets/portaloggy-icon.128.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
BIN
assets/portaloggy-icon.128.psd
Normal file
BIN
assets/portaloggy-icon.128.psd
Normal file
Binary file not shown.
BIN
assets/portaloggy-icon.256.png
Normal file
BIN
assets/portaloggy-icon.256.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
BIN
assets/portaloggy-icon.256.psd
Normal file
BIN
assets/portaloggy-icon.256.psd
Normal file
Binary file not shown.
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -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
|
||||
|
||||
@ -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>
|
||||
|
||||
Reference in New Issue
Block a user