Getting Started with Loguro

Getting Started with Loguro

Getting Started with Loguro

Loguro is a log management platform built for developers who care about clarity over complexity. You don’t need an agent, a daemon, or a three-page integration guide — just an HTTP call and an API key.

Create your project

After signing up, head to the Loguro console and click New Project. Give it a name that matches the service you’re instrumenting — something like api-prod or worker-staging. Each project gets its own isolated log stream, retention policy, and API key namespace.

Generate an API key

Open the command palette and type --keys::create:prod. Copy the key and store it as an environment variable — never hard-code it.

export LOGURO_API_KEY="your-api-key"

Send your first log

Loguro accepts structured JSON over HTTP. The simplest possible log:

curl -X POST https://ingest.logu.ro \
  -H "Authorization: Bearer $LOGURO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "level": "info",
    "message": "Server started",
    "context": { "port": 3000, "env": "production" }
  }'

A 202 Accepted response means your log landed. Open the Logs view in the console and you’ll see it appear within milliseconds.

Integrating in Node.js

No SDK needed — use native fetch. A simple helper you can drop into any project:

const LOGURO_API_KEY = process.env.LOGURO_API_KEY;

function log(level, message, context = {}) {
  fetch('https://ingest.logu.ro', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${LOGURO_API_KEY}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({ level, message, context, timestamp: new Date().toISOString() }),
  }).catch(() => {}); // fire and forget
}

// Use it anywhere
log('info', 'Server started', { port: 3000, env: 'production' });
log('error', 'Payment failed', { userId: 42, errorCode: 'card_declined' });

The .catch(() => {}) makes it fire-and-forget — logging never blocks your hot path.

Log levels

Loguro supports six log levels. Use them consistently across your services:

LevelWhen to use
debugVerbose diagnostic information
infoNormal operational events
warningUnexpected but recoverable conditions
errorFailures that need attention
criticalSystem-wide failures, requires immediate action
heartbeatPeriodic health pulse — use with embed widgets to monitor uptime

Using context

The context field is a flat or nested JSON object. Every key becomes searchable in the filter bar:

log('error', 'Payment failed', {
  userId: 42,
  orderId: 'ord_9xk2',
  gateway: 'stripe',
  errorCode: 'card_declined',
});

In the console you can now search context.gateway:"stripe" or context.errorCode:"card_declined" to find exactly these logs.

What’s next