AzureBlobLogger 0.10.3
dotnet add package AzureBlobLogger --version 0.10.3
NuGet\Install-Package AzureBlobLogger -Version 0.10.3
<PackageReference Include="AzureBlobLogger" Version="0.10.3" />
<PackageVersion Include="AzureBlobLogger" Version="0.10.3" />
<PackageReference Include="AzureBlobLogger" />
paket add AzureBlobLogger --version 0.10.3
#r "nuget: AzureBlobLogger, 0.10.3"
#:package AzureBlobLogger@0.10.3
#addin nuget:?package=AzureBlobLogger&version=0.10.3
#tool nuget:?package=AzureBlobLogger&version=0.10.3
AzureBlobLogger
AzureBlobLogger is a simple and light utility for logging then upload to Azure Storage.
Can I use
AzureBlobLogger is developped by .Net Standard 2.0. You can use it whether your project is developped by .Net Core, .Net Framework, Xamarin or Mono, etc.
Add it into your project
Get it via nuget (Recommand)
If you use Visual Studio to manage your projects. You could get this tool from nuget package manager. Just search AzureBlobLogger
and install it.
Or, you could use nuget command line by the command below:
PM> Install-Package AzureBlobLogger
Download and install it
Check the release page to download a latest nupkg
or zip
file.
If you use nupkg
file, you could install it via nuget command line.
If you use zip
file, there is a dll
file in the zip
file. Add it as a reference to your project. (If you take this way, you might meet some dependency problem)
How to use
After you add AzureBlobLogger library to your project, and resolve all the problems about the dependency.
Add
using AzureBlobLogger
to the top of the code that you need to use the library.Before use it, inilialize as like this:
var log = new BlobLogger(constr, container, blobname);
constr
is your connection string to the Azure Storage.container
is the container name where you want to upload your logs.blobname
is the blob name or the path you want to upload your logs.
Append your log:
- Append a line of text:
log.Append("This is a log", LogLevel.Information);
- Append a object:
// If you pass an object to the first parameter while calling // Append, it would automatically convert the object to string // with object.ToString() function. log.Append(new DateTime(2020, 05, 18), LogLevel.Debug);
- LogLevel has several levels, it could be
Text
,Debug
,Information
,Warning
,Error
,Fatal
.
You need to flush it manually (Upload to the remote server), by using
log.Flush()
. Be carefully, if the logger try to upload 3 times and still failed. An Exception would be throw.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.Azure.Storage.Blob (>= 11.1.5)
- Microsoft.Azure.Storage.Common (>= 11.1.5)
- System.Collections (>= 4.3.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Fix bugs and add documents.