Skip to content

Commit

Permalink
1. Switched to TradeWindsCommon
Browse files Browse the repository at this point in the history
2. Added icon
  • Loading branch information
DavidThielen committed Oct 3, 2024
1 parent 87e9c92 commit e6db170
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 9 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Here is why we ended up with this. We started with Serilog but it had (may be fi

So I created this. If you face the same problem, or for some other reason, need a basic simple LoggerProvider, here it is. It writes to File and Blob. It is in use and is fast and has very little overhead.

> This is under the MIT license. If you find this very useful I ask (not a requirement) that you consider reading my book [I DON’T KNOW WHAT I’M DOING!: How a Programmer Became a Successful Startup CEO](https://a.co/d/bEpDlJR).
>
> And if you like it, please review it on Amazon and/or GoodReads. The number of legitimate reviews helps a lot. Much appreciated.
### Mapping configuration to your LoggerProvider

The magic is the `ProviderAlias`:
Expand All @@ -20,8 +24,4 @@ I have no idea how to write unit tests for a LoggerProvider as it's all part of

We did test this thoroughly. But the testing was as part of our web app, including stepping through in places with the debugger.

### License

This is under the MIT license. If you find this very useful I ask (not a requirement) that you consider reading my book [I DON’T KNOW WHAT I’M DOING!: How a Programmer Became a Successful Startup CEO](https://a.co/d/bEpDlJR).

And if you like it, please review it on Amazon and/or GoodReads. The number of legitimate reviews helps a lot. Much appreciated.
2 changes: 1 addition & 1 deletion TradeWindsLoggerProvider/BlobLoggerProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
using Azure.Storage.Blobs;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using TradeWindsExtensions;
using TradeWindsCommon.Extensions;

namespace TradeWindsLoggerProvider
{
Expand Down
2 changes: 1 addition & 1 deletion TradeWindsLoggerProvider/BlobQueueWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
using System.Text;
using Azure.Storage.Blobs;
using Azure.Storage.Blobs.Specialized;
using TradeWindsExtensions;
using TradeWindsCommon.Extensions;

namespace TradeWindsLoggerProvider
{
Expand Down
2 changes: 1 addition & 1 deletion TradeWindsLoggerProvider/FileLoggerProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using TradeWindsExtensions;
using TradeWindsCommon.Extensions;

namespace TradeWindsLoggerProvider
{
Expand Down
2 changes: 1 addition & 1 deletion TradeWindsLoggerProvider/LoggerBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
using System.Text;
using System.Text.RegularExpressions;
using Microsoft.Extensions.Logging;
using TradeWindsExtensions;
using TradeWindsCommon.Extensions;

namespace TradeWindsLoggerProvider
{
Expand Down
31 changes: 30 additions & 1 deletion TradeWindsLoggerProvider/TradeWindsLoggerProvider.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,41 @@
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>1.0.0.2</Version>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Title>LoggerProvider for File and Azure Blob</Title>
<Authors>DavidThielen</Authors>
<Company>Trade Winds Studios</Company>
<Description>LoggerProviders: for File and Azure Blob sinks</Description>
<Copyright>MIT</Copyright>
<PackageProjectUrl>https://github.com/DavidThielen/TradeWindsLoggerProvider</PackageProjectUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
<RepositoryUrl>https://github.com/DavidThielen/TradeWindsLoggerProvider</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>LoggerProvider; Azure BLOB Storage</PackageTags>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
<PackageIcon>books_blue.png</PackageIcon>
</PropertyGroup>

<ItemGroup>
<None Include="..\books_blue.png">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
<None Include="..\LICENSE.txt">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
<None Include="..\README.md">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Azure.Storage.Blobs" Version="12.22.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Configuration" Version="8.0.0" />
<PackageReference Include="TradeWindsExtensions" Version="1.0.0.1" />
<PackageReference Include="TradeWindsCommon" Version="1.0.0.2" />
</ItemGroup>

</Project>
Binary file added books_blue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e6db170

Please sign in to comment.