🚀 logmind Node • Browser • React Native

Logging that understands your errors.

Unified, contextual logging with automatic error diagnosis. One API for backend, frontend and mobile — so you stop guessing what went wrong in production.

⭐ Ver no GitHub
1 logger · Node, browser e React Native + contexto por request, user, tenant + diagnóstico automático de erros
Context propagation log.auto(err) Redact · Sampling Child logger Express · Fastify OTLP · Syslog Production mode JSON, file, webhook, DB

Why teams use Logmind

Por que times usam o Logmind

Logmind was built for teams that live in full‑stack land: a bit of Node, some React, a mobile app, lots of “what happened?” in production.

O Logmind nasceu para times que vivem no mundo full‑stack: um pouco de Node, um pouco de React, um app mobile, e muito “o que será que aconteceu?” em produção.

  • Context in every log: attach userId, requestId, tenantId once and have it everywhere.
  • Auto‑diagnosis: log.auto(err) classifies errors (database, network, validation, timeout, permission…) and adds a human hint.
  • Production‑ready: drop noisy debug logs, group repeated errors into a single [repeated Nx] event.
  • One API, three platforms: same mental model for Node, browser and React Native.

Install

npm install logmind
yarn add logmind

Node >= 16. Works great with Express, Fastify, Koa, React, Next.js, React Native and any framework that lets you call a logger.

Examples – click to see full code

Exemplos – clique para ver o código completo

Click any example below to display the full code. Use the copy button to paste into your project.

Clique em qualquer exemplo abaixo para ver o código completo. Use o botão copiar para colar no seu projeto.

Node básico

Referência rápida

1. Node.js – basic logger

import { initLogger, log } from "logmind"; initLogger({ app: "my-api", version: "1.0.0", env: process.env.NODE_ENV, }); log.info("Service started"); log.warn("Token expiring soon"); try { // your code } catch (error) { log.error("Failed to save order", error, { orderId: "ord_123" }); log.auto(error); // diagnosis field in the log }

2. Add context per request

import { withContextAsync, log } from "logmind"; app.post("/orders", (req, res) => { withContextAsync( { userId: req.user.id, requestId: req.id }, async () => { log.info("Creating order"); // await createOrder(...) log.info("Order created"); res.sendStatus(201); } ); });

3. Browser / React Native

import { initBrowser, log } from "logmind/browser"; initBrowser({ app: "my-webapp", version: "1.0.0", captureGlobalErrors: true, // window.onerror + unhandledrejection }); log.info("Page loaded"); log.auto(err);

What log.auto(err) adds for you

O que o log.auto(err) faz por você

Instead of just logging “Error: something failed”, Logmind classifies and annotates your errors.

Em vez de só jogar “Error: algo deu errado” no log, o Logmind classifica e anota seus erros.

database network permission validation timeout known unknown
{ "level": "error", "message": "DB connection failed", "error": { "name": "Error", "message": "connect ECONNREFUSED 127.0.0.1:27017", "code": "ECONNREFUSED", "diagnosis": { "category": "database", "hint": "Falha em operação de banco de dados.", "suggestedAction": "Verificar conectividade, credenciais e estado do banco." } } }

Outputs that fit your stack

Saídas que encaixam no seu stack

import { initLogger } from "logmind"; initLogger({ app: "my-api", version: "1.0.0", transport: "file", file: { path: "./logs/app.log", maxSize: "10m", maxFiles: 5, }, });