KyotoTechLogger 1.2.2
dotnet add package KyotoTechLogger --version 1.2.2
NuGet\Install-Package KyotoTechLogger -Version 1.2.2
<PackageReference Include="KyotoTechLogger" Version="1.2.2" />
<PackageVersion Include="KyotoTechLogger" Version="1.2.2" />
<PackageReference Include="KyotoTechLogger" />
paket add KyotoTechLogger --version 1.2.2
#r "nuget: KyotoTechLogger, 1.2.2"
#:package KyotoTechLogger@1.2.2
#addin nuget:?package=KyotoTechLogger&version=1.2.2
#tool nuget:?package=KyotoTechLogger&version=1.2.2
KyotoTech Logger
Zero-dependency, cross-platform logging library for .NET 8+
Overview
KyotoTech Logger is a production-ready logging library that ships as a single DLL with zero external dependencies. All required libraries are embedded, ensuring hassle-free integration into any .NET 8+ project.
Key Features
- Zero Dependencies - Single DLL deployment with all libraries embedded
- Cross-Platform - Windows, macOS, Linux, iOS, and Android
- Thread-Safe - Singleton pattern with
LogService.Instance - 150+ Log Types - Comprehensive categorization for all application layers
- Local + Remote Logging - File-based storage with server upload capability
- License Tiers - Free, Developer, Professional, and Enterprise
- Async Operations - Non-blocking I/O for optimal performance
- Graceful Degradation - Never crashes your application
Installation
dotnet add package KyotoTechLogger
Or via NuGet Package Manager:
Install-Package KyotoTechLogger
Quick Start
Initialization
Initialize once at application startup with your License Key, API Key, and server URL:
using KyotoTechLogger;
using KyotoTechLogger.Models;
using System.Reflection;
// Synchronous initialization
var result = LogService.Initialize(
licenseKey: "YOUR-LICENSE-KEY",
apiKey: "ktlog_production_your_key_here",
serverUrl: "https://logger.kyototech.co.jp/api/v1/logs");
if (!result.Success)
{
Console.WriteLine($"Init failed: {result.ErrorMessage}");
return;
}
// Async initialization (ASP.NET Core, MAUI)
var result = await LogService.InitializeAsync(
licenseKey: "YOUR-LICENSE-KEY",
apiKey: "ktlog_production_your_key_here",
serverUrl: "https://logger.kyototech.co.jp/api/v1/logs");
// From license file (offline activation)
var result = LogService.InitializeWithFile(
licensePath: "path/to/license.lic",
apiKey: "ktlog_production_your_key_here",
serverUrl: "https://logger.kyototech.co.jp/api/v1/logs");
License Key = Delivered with your subscription (format:
TIER-XXXX-XXXX-XXXX-XXXX) API Key = Created by you on the dashboard under Project Settings (format:ktlog_production_...)
Logging
// Log a message
LogService.Instance.Log(
MethodBase.GetCurrentMethod(),
"User login successful",
LogTypes.AuthLog);
// Log an exception
try
{
// Your code
}
catch (Exception ex)
{
LogService.Instance.Log(
MethodBase.GetCurrentMethod(),
ex,
LogTypes.ErrorLog);
}
// Log with custom metadata (v1.2.0+)
LogService.Instance.Log(
MethodBase.GetCurrentMethod(),
"Order completed",
LogTypes.BusinessLog,
new Dictionary<string, object>
{
["orderId"] = "ORD-12345",
["customerId"] = "CUST-789",
["amount"] = 99.99,
["items"] = new[] { "SKU-001", "SKU-002" }
});
Configuration Options
Pass an options callback during initialization:
var result = LogService.Initialize(licenseKey, apiKey, serverUrl, opts =>
{
opts.ShowConsole = true; // Print logs to console
opts.ShowConsoleDebug = true; // Print to debug output
opts.TimeoutSeconds = 15; // HTTP timeout for uploads
opts.MaxLogAgeDays = 30; // Local log retention
opts.RemoteLogTypes = new List<LogTypes> // Only upload these types
{
LogTypes.ErrorLog,
LogTypes.CrashLog,
LogTypes.SecurityLog
};
});
Runtime configuration changes:
LogService.Instance.SetApiKey("ktlog_production_new_key");
LogService.Instance.ToggleShowConsole(true);
LogService.Instance.SetRemoteLogTypesAllowToSend(new List<LogTypes> { LogTypes.ErrorLog });
LogService.Instance.SetMaxLogsAge(14);
LogService.Instance.SetDefaultServerUrl("https://logger.kyototech.co.jp/api/v1/logs", 30);
Remote Log Upload
// Upload all pending logs
var uploadResult = await LogService.Instance.UploadLogsAsync();
// Upload specific log types only
await LogService.Instance.UploadLogsAsync(new List<LogTypes>
{
LogTypes.ErrorLog,
LogTypes.SecurityLog
});
// Upload previously failed logs
await LogService.Instance.UploadBackupFilesAsync();
// Clean up old local log files
await LogService.Instance.RemoveAllOldLogFilesAsync();
API Reference
Logging
| Method | Description |
|---|---|
Log(MethodBase, string, LogTypes) |
Log a text message |
Log(MethodBase, string, LogTypes, Dictionary<string, object>) |
Log with custom metadata (v1.2.0+) |
Log(MethodBase, Exception, LogTypes) |
Log an exception |
Log(MethodBase, Exception, LogTypes, Dictionary<string, object>) |
Log exception with metadata (v1.2.0+) |
Initialization
| Method | Description |
|---|---|
LogService.Initialize(licenseKey, apiKey, serverUrl) |
Synchronous initialization |
LogService.Initialize(licenseKey, apiKey, serverUrl, options) |
Synchronous with options callback |
LogService.InitializeAsync(licenseKey, apiKey, serverUrl) |
Async initialization |
LogService.InitializeWithFile(licensePath, apiKey, serverUrl) |
Initialize from license file |
LogService.InitializeWithFileAsync(licensePath, apiKey, serverUrl) |
Async from license file |
Runtime Configuration
| Method | Description |
|---|---|
SetApiKey(string) |
Change API key at runtime |
ToggleShowConsole(bool) |
Enable/disable console output |
ToggleShowConsoleDebug(bool) |
Enable/disable debug output |
SetDefaultServerUrl(string, int) |
Set server URL with optional timeout |
SetRemoteLogTypesAllowToSend(List<LogTypes>) |
Configure which types to upload |
SetMaxLogsAge(int) |
Set log retention in days |
GetLicenseInfo() |
Get current license information |
GetHardwareId() |
Get machine hardware ID |
Remote Operations
| Method | Description |
|---|---|
UploadLogsAsync() |
Upload all pending logs |
UploadLogsAsync(List<LogTypes>) |
Upload specific log types |
UploadBackupFilesAsync() |
Upload previously failed logs |
RemoveAllOldLogFilesAsync() |
Remove outdated log files |
Log Types
KyotoTech Logger includes 150+ predefined log types covering:
| Category | Examples |
|---|---|
| Core | ErrorLog, ProtocolLog, DeveloperLog |
| Application | AuthLog, DatabaseLog, CacheLog, UILog |
| Performance | PerformanceLog, NetworkMonitorLog |
| Security | SecurityLog, TokenLog |
| Infrastructure | CloudLog, ContainerLog, CICDLog |
| Data | SQLServerLog, PostgreSQLLog, RedisLog, MongoDBLog |
| AI/ML | MachineLearningLog, NLPLog, ComputerVisionLog |
| Mobile | iOSLog, AndroidLog, AppleCarPlayLog |
Platform Support
| Platform | Status | Frameworks |
|---|---|---|
| Windows | Full support | Console, ASP.NET Core, WPF, WinForms, Blazor |
| macOS | Full support | Console, ASP.NET Core, .NET MAUI |
| Linux | Full support | Console, ASP.NET Core |
| iOS | Supported (sandbox-aware) | .NET MAUI, native .NET iOS workload |
| Android | Supported | .NET MAUI, native .NET Android workload |
License Tiers
| Tier | Logs/Day | Description |
|---|---|---|
| Free | 50 | Free forever, no time limit |
| Developer | 3,000 | For individual developers |
| Professional | 80,000 | For teams and growing projects |
| Enterprise | Unlimited | Full features, priority support |
Visit kyototech.co.jp/pricing for details. Create your free account at logger.kyototech.co.jp.
File Storage
Local Logs
~/Documents/Logs/
├── log_error.txt
├── log_auth.txt
├── log_performance.txt
└── ...
Local log files automatically rotate at 1 MB.
Remote Logs (JSON)
~/Documents/LogsRemote/
├── log_error.json
├── log_error_backup.json
└── ...
Remote log files are stored locally until successfully uploaded to your server.
Requirements
- .NET 8.0 or later
- No additional NuGet packages required
- Works without license key (Free tier: 50 logs/day)
Support
- Email: support@kyototech.co.jp
- Website: kyototech.co.jp
Legal
Copyright (c) 2024-2026 KyotoTech LLC. All rights reserved.
This software is licensed under the KyotoTech Software License Agreement. See the LICENSE file for the complete license terms.
Use of this software is subject to the acceptance of the license agreement. Unauthorized copying, modification, distribution, or use of this software is strictly prohibited and may result in severe civil and criminal penalties.
| 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 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. |
-
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.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.2.2 | 88 | 2/1/2026 |