OSK.Functions.Outputs.Logging
1.5.2
dotnet add package OSK.Functions.Outputs.Logging --version 1.5.2
NuGet\Install-Package OSK.Functions.Outputs.Logging -Version 1.5.2
<PackageReference Include="OSK.Functions.Outputs.Logging" Version="1.5.2" />
paket add OSK.Functions.Outputs.Logging --version 1.5.2
#r "nuget: OSK.Functions.Outputs.Logging, 1.5.2"
// Install OSK.Functions.Outputs.Logging as a Cake Addin #addin nuget:?package=OSK.Functions.Outputs.Logging&version=1.5.2 // Install OSK.Functions.Outputs.Logging as a Cake Tool #tool nuget:?package=OSK.Functions.Outputs.Logging&version=1.5.2
OSK.Functions.Outputs
The library is meant to faciliate easy to use output responses from various APIs, functions, and other types of calls that can occur in an application. These outputs can provide quick and meaningful information to a caller beyond a simple exception or other error data. Error information can include specific error messages, exceptions, http status codes, and more.
Abstractions
The abstraction layer should allow libraries that only need access to the interfaces to avoid adding a dependency on the core output logic, thus reducing unnecessary dependency requirements. An application should add the core logic and any extra libraries being added can simply add the dependency for the abstractions project.
Usage: Consumers
The central focal point to this library is the IOutputFactory
and IOutputFactory<T>
objects. By adding a dependency to the Outputs.Logging
or base Outputs
,
an application will gain access to the functionality through dependency injection. IOutputFactory
is a basic implementation that avoids a dependency on
Microsoft's Logging mechanism, while IOutputFactory<T>
will use an ILogger to record error responses. Some useful shortcuts to creating outputs can be found in the
OutputFactoryExtensions
. Callers can add the dependency by using AddFunctionOutputs
or AddLoggingFunctionOutputs
functions on a service collection.
Notes:
** The internal logic will prevent creating an error output that has error information attached (i.e. exception data, error strings, etc.)
** OriginationSource
on the IOutput status code is meant to convey the base application where the error orignated from. This does not need to be used, but can help provide extra debug information should issues/errors occur in an application's lifetime. Being a string can help to ensure broad usage of identification to most projects in the wild.
** DetailCode
is meant to help convey a bit more information to callers at a glance. For example, DetailCode.DownStreamError
would represent an error that originated outside of the current application (i.e. service A calls service B and B returns an error to A, A can return to the call of service A or handle this specific use case for retrying on transient errors)
** PaginatedOutput
can help to make list style calls return extra data relating to total items in the data set, skip/take, etc. and can facilitate pagination for front-end usage
** ErrorInformation
will only be available on an IOutput
that was unsuccessful.
Mocks
The mocks project is meant to be a simple implementation to the library that simply returns basic responses for test purposes. It may be similar to the base Output project, but they can differ as iterations are made. For main application use outside of test purposes, users should prefer the base Output or Logging projects.
Contributions and Issues
Any and all contributions are appreciated! Please be sure to follow the branch naming convention OSK-{issue number}-{deliminated}-{branch}-{name} as current workflows rely on it for automatic issue closure. Please submit issues for discussion and tracking using the github issue tracker.
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. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | 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.1
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.0)
- OSK.Functions.Outputs (>= 1.5.2)
- OSK.Functions.Outputs.Logging.Abstractions (>= 1.5.2)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on OSK.Functions.Outputs.Logging:
Package | Downloads |
---|---|
OSK.Storage.Local
An implementation of a storage service that is specific to local machine storage in .NET |
|
OSK.UML.Exporters.PlantUML
A .NET library that provides a uml diagram exporter that is based on an integration with PlantUML. |
GitHub repositories
This package is not used by any popular GitHub repositories.