AppInfo 0.2.0
dotnet add package AppInfo --version 0.2.0
NuGet\Install-Package AppInfo -Version 0.2.0
<PackageReference Include="AppInfo" Version="0.2.0" />
<PackageVersion Include="AppInfo" Version="0.2.0" />
<PackageReference Include="AppInfo" />
paket add AppInfo --version 0.2.0
#r "nuget: AppInfo, 0.2.0"
#:package AppInfo@0.2.0
#addin nuget:?package=AppInfo&version=0.2.0
#tool nuget:?package=AppInfo&version=0.2.0
AppInfo
AppInfo is a support library that outputs information about the application and its conditions during startup.
Have you ever received a bug without knowing what version of the application was running, or what environment it was running in?
Then this library can help you.
This library provides a simple and customizable way to output information about the application and its conditions during startup. A simple set of text-based information that can be easily copy-pasted into bug reports, used by sysadmins and devops teams, confirm deployments, troubleshoot environmental behavior and much more.
When starting the application, this library will output detailed information about the hosting application:
Application created with context:
Product: AppInfo Demo - Basic
Version: 1.0.0+e112654fd1f985e1f7cb11e0ab76165b54a7e590
Assembly: basic
File Name: basic.dll
Is Release: false
64-bit: true
Location: /home/Reyhn3/Projects/AppInfo/examples/Basic/bin/Debug/net8.0
Base: /home/Reyhn3/Projects/AppInfo/examples/Basic/bin/Debug/net8.0/
Environment: Production
MachineName: devmachine
OSVersion: Unix 7.1.8.200
ClrVersion: 8.0.29
ProcessId: 2536696
Usage
- Add the package to the application project.
dotnet package add AppInfo
- Build an
IAppInfoand output it in theMainmethod:
using AppInformation;
AppInfo.BuildAndOutputDefault();
Ideally, this should be done at or near the top of the application entry point; as early as possible in the application startup in order to provide as much value as possible.
- Run the application.
Optionally configure the IAppInfo before building it to provide customized information.
Features
Text first <br/>All information is key-value pairs that are rendered as text that can easily be understood and copied.
Non-invasive <br/>This library is designed to be as unobtrusive as possible, while still providing a wealth of information about the application and its running conditions.
Fail-safe <br/>All operations (information extraction, assembly and outputting) are wrapped in
try-catchto ensure this library can never break your application.Customizable <br/> Add custom information to the output.
Configurable <br/> Configure where and how to output the information.
Extensible <br/> Extend the library with custom information providers.
Examples
The examples folder contains runnable demo projects for different types of host applications and usages:
- Basic <br/> The most rudimentary usage example.
- Custom <br/> Demonstrates how to customize the information and output.
- Manual <br/> AppInfo can be constructed using traditional syntax, which demonstrates that extracting information and outputting it are two separate steps.
- Fluent <br/> Demonstrates the different ways to use the fluent syntax and convenience methods.
- Generic Host <br/> Demonstrates integration with the Generic Host.
- Logging <br/> Shows how simple it is to output to the logger of your choice.
- Web
<br/> Demonstrates the integration with an ASP.NET Core Web Host, and how the
IAppInfoinstance can be used in a request. - Azure Functions <br/> Demonstrates the integration with an Azure Functions app host.
Design
There are two phases to this library: information extraction and rendering. The information extraction phase is responsible for gathering all the information about the application and its running conditions. The rendering phase is responsible for writing the information toward the configured targets.
Gathering information is done by using a builder pattern. The InputBuilder class collects the IExtractor objects that can be added using fluent convenience methods. These are then used to assemble the information into a single AppInfo object that can be used by the outputting phase.
Outputting is also done by using a builder pattern. The OutputBuilder class collect the IRenderer objects that can be added using fluent convenience methods. When calling the Write method, the OutputBuilder will use the IRenderer objects to write the information toward the configured targets.
Licence
<a href="https://ai-free.io"><img decoding="async" src="https://ai-free.io/AI-free.io-CODE.png" width="80"/></a>
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. 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 is compatible. 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. |
-
net10.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
For a full changelog, please visit https://github.com/Reyhn3/AppInfo/blob/main/CHANGELOG.md