Logging & Integration
Application event logs, Discord webhooks, Seller API logging, and panel Event Logs — configure in Settings and view under the Event Logs tab.
Panel path
Select an application → Settings → App Config → Logging & Integration card. View logs under sidebar Event Logs.
Client logs (SDK)
Send messages from your app with API type log or SDK log(). They appear in Panel → Event Logs → Application Logs.
$app->log('User opened menu', gethostname());
// JS: await auth.Log('User opened menu');Optional parameter pcuser stores the Windows username or machine label. Enable Log IP Address in Logging settings to attach client IP to each row.
API reference: Send Log
Discord Alerts
Open the app → sidebar Discord Alerts. Add a custom webhook: name + Discord webhook URL + enabled. The URL stays on the server (Panel / Seller API). Client SDKs never embed the URL — they call login / log / alert / screenshot and the server fans out to every enabled webhook with a valid URL.
| Panel op | ทำอะไร |
|---|---|
discord_channels | โหลด webhooks + event catalog (auto-migrate การ์ดเก่า → custom) |
discord_webhook_add | สร้าง webhook (name, url) |
discord_webhook_update | แก้ชื่อ / URL / enabled |
discord_webhook_delete | ลบ webhook |
discord_screenshot_all | เปิด/ปิดแนบ screenshot ทุก alert |
test_discord_channel | ยิง test embed |
Seller API — Discord Alerts
Same apps.discord_channels store as the Panel. Legacy fetchwebhooks / addwebhook (client raw POST table) is a different system.
| Seller type | ทำอะไร |
|---|---|
fetchdiscord | list custom webhooks + catalog |
adddiscord | สร้าง webhook (name, url) |
editdiscord | แก้ name / url / enabled |
deldiscord | ลบตาม id |
testdiscord | ยิง test embed |
discordshotall | เปิด/ปิด screenshot-all |
Reference: fetchdiscord · adddiscord · All Seller Endpoints
adddiscordRouting model
Custom webhook ที่ enabled + มี URL ถูกต้อง รับทุก event จากเซิร์ฟเวอร์ (Login, Log, Alert, Screenshot, security, ops …). เนื้อหา custom alert ตั้งจาก SDK ด้วย Alert(title, status, detail, category, action).
Legacy single discord_webhook + webhook_events still works until channels are saved (auto-migrated into auth).
SDK — ไม่มี Discord URL
ฝั่ง client เลือกข้อความ / status / category เอง — Discord webhook URL อยู่บน Panel หรือ Seller API เท่านั้น (RE ของ binary จะไม่เจอ URL)
// 1) Panel Discord Alerts OR Seller API adddiscord — name + webhook URL + enabled
// 2) Client SDK — never put Discord URL in the binary
app.attachScreenshots = true;
app.Login(user, pass, hwid);
app.Alert("Payment cleared", "ok", "order #1042", "Billing", "payok");
app.Alert("License gate", "fail", "hwid mismatch", "Security", "hwidfail");
app.Log("Opened menu", "", "info", "ui");
app.LogError("License gate blocked", "license");// URL is never in the SDK — configure via Panel or Seller adddiscord / editdiscord
$app->Alert('Payment cleared', 'ok', 'order #1042', 'Billing', 'payok');
$app->Log('Opened menu', gethostname(), 'info', 'ui');
$app->LogError('Payment failed', 'billing');
$app->Screenshot($jpegBytesOrBase64, 'optional note');Alert: title (required), status = ok · fail · warn · info, optional detail / category / action. Rate limit ~2s. Stored in Event Logs as [alert] ….
Log level: info · warn · error · debug. tag: อัลฟานิวเมอริก.
Screenshot capture
Authenticated clients upload a screen capture. Enabled custom webhooks with a valid URL receive it.
type=screenshot
image=<base64 PNG/JPEG/WEBP, max ~1.5MB>
note=optional labelAlert API:
type=alert
title=required (max 120)
status=ok|fail|warn|info
detail=optional (max 500)
category=optional (default SDK)
action=optional slugSDK: C++ Screenshot(note) auto-captures the desktop; PHP/JS Screenshot() accept image bytes or base64. Rate limit: 1 per user / 10 seconds.
Attach screenshot to every alert
Turn on Discord Alerts → Attach screenshot to every alert to have the client image ride along on every alert embed (login, wrong key, hash reject, init reject, ban, and so on) — not just the dedicated screenshot event. When the toggle is on, add a screenshot field to any request:
type=login
username=...
pass=...
screenshot=<base64 PNG/JPEG/WEBP, max ~1.5MB>The mime is sniffed from the bytes (client-declared type is ignored) and anything over ~1.5MB is dropped silently — a bad or missing screenshot never blocks auth. SDK: set C++ client.attachScreenshots = true; and auth-type calls auto-capture; other SDKs send the base64 in the screenshot field of any call.
Application log storage
| Toggle / field | DB field | Effect |
|---|---|---|
| Log IP Address | log_ip | Stores client_ip on each log API row |
| Retention (days) | log_retention_days | Auto-delete older logs (1–90 days, default 7) on panel fetch |
Event Logs tab
Two views — same toolbar pattern as Files / Web Loader:
- Application Logs — SDK
log()messages with user, PC name, optional IP, timestamp - Seller Logs — Seller API requests when logging is enabled for the app
Features: search, export TSV, bulk delete, clear all, pagination. Yellow notice reminds you of the 255-char limit and retention policy.
Seller API logging
Enable Seller Logging in Logging & Integration (or toggle on Event Logs → Seller Logs). Successful Seller API calls that target the app are recorded with action name and IP.
Requires Seller API request to include app id or name so LibreAuth knows which application to attribute.
Seller API docs: Getting Started
webhook_events JSON
Discord event toggles are stored in apps.webhook_events as JSON:
{"login":true,"register":true,"ban":true,"license":true,"forgot":true,"log":false}Defaults when unset: login/register/ban/license/forgot on, client log off.