HuntGlitch 1.0.0-beta
dotnet add package HuntGlitch --version 1.0.0-beta
NuGet\Install-Package HuntGlitch -Version 1.0.0-beta
<PackageReference Include="HuntGlitch" Version="1.0.0-beta" />
<PackageVersion Include="HuntGlitch" Version="1.0.0-beta" />
<PackageReference Include="HuntGlitch" />
paket add HuntGlitch --version 1.0.0-beta
#r "nuget: HuntGlitch, 1.0.0-beta"
#addin nuget:?package=HuntGlitch&version=1.0.0-beta&prerelease
#tool nuget:?package=HuntGlitch&version=1.0.0-beta&prerelease
HuntGlitch C# Project
HuntGlitch is a C# library built on .NET Core 2.1 designed to detect and analyze visual glitches within applications or graphical outputs. This package provides tools to identify potential rendering issues, screen tearing, and other visual anomalies.
Table of Contents
Installation
To use HuntGlitch in your .NET Core 2.1 project, you can install it via NuGet Package Manager.
Using NuGet Package Manager Console:
Install-Package HuntGlitch
Using .NET CLI:
dotnet add package HuntGlitch
Prerequisites:
.NET Core 2.1 SDK or later installed. A compatible IDE (e.g., Visual Studio) or a text editor.
Usage
To run the application, execute the following command:
dotnet run
GitHub Repository: https://github.com/ipstushard/HuntGlitch-Net
Configuration
To use HuntGlitch, you need to configure it properly. Follow these steps to set up your account and integrate HuntGlitch into your project.
Step 1: Register a New Account
- Go to app.huntglitch.com/register and create a new account.
- After registering, log in with your credentials at app.huntglitch.com/login.
Step 2: Create a New Project
- Once logged in, navigate to the "All Projects" page at app.huntglitch.com/project/list.
- Click on the "Add Project" button.
- Enter the "Project Name" and "Deliverables" in the respective fields.
- Click "Save" to create the project.
Step 3: View Your Project
- Go back to the project list, and you will see your newly created project.
- Click on your project to preview log information.
Step 4: Obtain Your Keys
- ProjectKey: This is your unique project identifier provided by HuntGlitch.
- DeliverableKey: This is your unique deliverable identifier associated with the project.
Step 5: Configure Your Application
Add the following settings to your appsettings.json
file:
{
"HuntGlitchSettings": {
"ProjectKey": "YOUR_PROJECT_KEY",
"DeliverableKey": "YOUR_DELIVERABLE_KEY"
}
}
Step 6: Register HuntGlitch Services
To integrate HuntGlitch effectively, you need to register its services within your application's Startup.cs
(or Program.cs
in .NET 6+).
Add HuntGlitch services to the service collection:
// In Startup.cs (ConfigureServices method) or Program.cs (builder.Services)
// Bind app-settings to your AppSettings class (if applicable)
builder.Services.AddHuntGlitch(builder.Configuration);
Usage
After installing and configuring the package, you can start using the HuntGlitch library in your C# code. Here's a basic example of how to use it:
Note: some of the code is conceptual and may need to be adjusted to fit your project's structure.
Controller DI
//This is the sample data form which you can use in your controller file.
private readonly IHuntGlitchLog _huntGlitchLogs;
//Constructor
public TestController(IHuntGlitchLog huntGlitchLogs)
{
_huntGlitchLogs = huntGlitchLogs;
}
DebugAsync
//Log debug without additional data or tags
await _huntGlitchLogs.DebugAsync();
//Log debug with additional data
await _huntGlitchLogs.DebugAsync(additionalData);
//Log debug with tag data
await _huntGlitchLogs.DebugAsync(tagData);
//Log debug with additional data and tag data
await _huntGlitchLogs.DebugAsync(additionalData, tagData);
WarningAsync
//Log warning without additional data or tags
await _huntGlitchLogs.WarningAsync();
//Log warning with additional data
await _huntGlitchLogs.WarningAsync(additionalData);
//Log warning with tag data
await _huntGlitchLogs.WarningAsync(tagData);
//Log warning with additional data and tag data
await _huntGlitchLogs.WarningAsync(additionalData, tagData);
NoticeAsync
//Log notice without additional data or tags
await _huntGlitchLogs.NoticeAsync();
//Log notice with additional data
await _huntGlitchLogs.NoticeAsync(additionalData);
//Log notice with tag data
await _huntGlitchLogs.NoticeAsync(tagData);
//Log notice with additional data and tag data
await _huntGlitchLogs.NoticeAsync(additionalData, tagData);
InformationAsync
//Log information without additional data or tags
await _huntGlitchLogs.InfoAsync();
//Log information with additional data
await _huntGlitchLogs.InfoAsync(additionalData);
//Log information with tag data
await _huntGlitchLogs.InfoAsync(tagData);
//Log information with additional data and tag data
await _huntGlitchLogs.InfoAsync(additionalData, tagData);
ErrorAsync
//Log error with exception only
await _huntGlitchLogs.ErrorAsync(exception);
//Log error with exception and additional data
await _huntGlitchLogs.ErrorAsync(exception, additionalData);
//Log error with exception and tag data
await _huntGlitchLogs.ErrorAsync(exception, tagData);
//Log error with exception, additional data, and tag data
await _huntGlitchLogs.ErrorAsync(exception, additionalData, tagData);
Example of Additional and Tag Data:
private static Dictionary<string, object> additionalData = new Dictionary<string, object>()
{
{ "user_data", new { name = "John", id = 1 } },
{ "order_data", new { order_id = "001" } },
{ "error_data", new { eventId = "002" } }
};
private static Dictionary<string, string> tagData = new Dictionary<string, string>()
{
{ "environment", "production" },
{ "module", "authentication" },
{ "feature", "login" }
{ "logger", "csharp" },
{ "csharp-version", Environment.Version.ToString() }
};
Extracted Information
HuntGlitch extracts various pieces of information from the HTTP context to provide detailed logs. This includes:
- Request Body
- Request Headers
- Request Method Type
- Request URL
Additionally, it extracts browser name and version from the User-Agent header and the operating system from the sec-ch-ua-platform
header.
Exception Handling
HuntGlitch provides detailed logging for exceptions. When an exception is logged, the following information is captured:
- Error Message
- File Name where the error occurred
- Line Number of the error
- Error Code (hash code of the exception)
- Exception Class and Method Name
This information helps in diagnosing and resolving issues effectively.
Important Notes:
Refer to the official documentation or the source code in the GitHub repository for detailed information on the available classes, methods, and properties within the HuntGlitch library. Ensure your project targets .NET Core 2.1 or a compatible framework. replace the conceptual code with the real HuntGlitch API.
Contact
For any questions or issues, please open an issue on the GitHub repository.
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 | 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.AspNetCore.Http.Abstractions (>= 2.3.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 9.0.1)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.1)
- Microsoft.Extensions.Http (>= 9.0.1)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 9.0.1)
- Newtonsoft.Json (>= 13.0.3)
- System.Text.Json (>= 9.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0-beta | 156 | 4/17/2025 |
An official .NET Library created for HuntGlitch to log the Errors, Info, Notice, Debug etc. This Package is compatible with all the .NET Core 3.1 and above as well as .NET 5 and above version.Created the base method which you can access in your any .NET Core project without worring about the boilerplate code. Just install the nuget package in your project. Do the required DI and that's it. It's ready to use. Please check the Readme file for more information.