Logger SDK Installation
Before you begin
You'll need:
- A ByteHide account and project token
- .NET SDK installed - ByteHide.Logger supports .NET Standard 2.0+, .NET Framework 4.7.2+, .NET 6+, ASP.NET, .NET MAUI
Installation Options
Add the ByteHide Logger SDK to your project using one of these methods:
NuGet Package Manager
Install-Package ByteHide.Logger
.NET CLI
dotnet add package ByteHide.Logger
PackageReference
<PackageReference Include="ByteHide.Logger" Version="latest" />
Basic Integration Example
using Bytehide.Logger.Core;
using Bytehide.Logger.Common.Models;
// Initialize with basic settings
Log.Initialize(new LogSettings
{
MinimumLevel = LogLevel.Info,
ConsoleEnabled = true
});
// Set your project token
Log.SetProjectToken("your-project-token");
// Start logging
Log.Info("Application started successfully!");
Verify Installation
After initializing the SDK, you can verify it's working by logging a test message:
using Bytehide.Logger.Core;
using Bytehide.Logger.Common.Models;
// Initialize the logger
Log.Initialize(new LogSettings
{
MinimumLevel = LogLevel.Info,
ConsoleEnabled = true
});
Log.SetProjectToken("your-project-token");
try
{
// Test logging
Log.Info("ByteHide Logger initialized successfully!");
Log.Debug("Debug message - this won't appear with Info level");
Log.Warn("Warning message");
Log.Error("Error message for testing");
Console.WriteLine("Logger is working correctly!");
}
catch (Exception ex)
{
Console.WriteLine($"Error initializing logger: {ex.Message}");
}
Package Compatibility
ByteHide.Logger is compatible with:
- .NET Standard 2.0+: For cross-platform libraries
- .NET Framework 4.7.2+: For Windows applications
- .NET 6, 7, 8, 9: Modern .NET applications
- ASP.NET Core: Web applications - Integration guide
- ASP.NET Framework: Legacy web applications - Integration guide
- .NET MAUI: Mobile and desktop applications - Integration guide
- Blazor: WebAssembly and Server applications - Integration guide
- Entity Framework Core: Database operations logging - Integration guide
- Entity Framework 6: Database operations logging - Integration guide
- Unity 2018.1+: Game development
- Xamarin: Mobile applications