Installation
Install and initialize Oleq.Ai.Logs
Package: Oleq.Ai.Logs on NuGet.
Targets .NET 6+ (ASP.NET, console, and worker apps).
App name required
Create an app under Apps in the dashboard. Pass the same string as AppName when constructing OleqLog.
1. Install the package
dotnet add package Oleq.Ai.Logs2. Create an API key
- Sign in with GitHub and create an org if needed.
- Open Apps → Create app (this name becomes
AppName). - Open API Keys → Generate New Key. Copy the secret once (
sk_live_…).
3. Set the environment variable
export OLEQLOG_API_KEY=sk_live_…Or set it in your app host config / appsettings environment (server-side only):
OLEQLOG_API_KEY=sk_live_…4. Initialize the client
using Oleq.Ai.Logs;
var log = new OleqLog(new LoggerConfig
{
AppName = "my-app", // required — same as Apps
Environment = "production",
});That is enough when OLEQLOG_API_KEY is set. Pass options when you need to override:
var log = new OleqLog(new LoggerConfig
{
AppName = "my-app",
ApiKey = "sk_live_…", // optional if env is set
BaseUrl = "http://localhost:3000", // local / custom API
Environment = "production",
});Next: Usage