HuntGlitch 1.0.0-beta

This is a prerelease version of HuntGlitch.
dotnet add package HuntGlitch --version 1.0.0-beta
                    
NuGet\Install-Package HuntGlitch -Version 1.0.0-beta
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="HuntGlitch" Version="1.0.0-beta" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="HuntGlitch" Version="1.0.0-beta" />
                    
Directory.Packages.props
<PackageReference Include="HuntGlitch" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add HuntGlitch --version 1.0.0-beta
                    
#r "nuget: HuntGlitch, 1.0.0-beta"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=HuntGlitch&version=1.0.0-beta&prerelease
                    
Install HuntGlitch as a Cake Addin
#tool nuget:?package=HuntGlitch&version=1.0.0-beta&prerelease
                    
Install HuntGlitch as a Cake Tool

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

  1. Go to app.huntglitch.com/register and create a new account.
  2. After registering, log in with your credentials at app.huntglitch.com/login.

Step 2: Create a New Project

  1. Once logged in, navigate to the "All Projects" page at app.huntglitch.com/project/list.
  2. Click on the "Add Project" button. Screenshot 1
    Screenshot 2
  3. Enter the "Project Name" and "Deliverables" in the respective fields.
  4. Click "Save" to create the project.

Step 3: View Your Project

  1. Go back to the project list, and you will see your newly created project. Screenshot
  2. Click on your project to preview log information. Screenshot

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.