npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@flexicorp/flowlog

v1.0.0

Published

logger lib

Readme

cat << 'EOF' > README.md

FlowLog 🚀

FlowLog é uma biblioteca de logging de alta performance para Node.js, construída sobre o Winston. Ela resolve o problema de rastreabilidade em sistemas assíncronos utilizando AsyncLocalStorage para manter um Correlation ID único durante todo o ciclo de vida de uma requisição.


✨ Características

  • Correlation ID Automático: Rastreie logs de funções aninhadas e chamadas assíncronas sem passar IDs por parâmetro.
  • Dual Mode: - Text Mode: Logs coloridos e formatados para humanos (ideal para desenvolvimento local no Linux/MacOS).
    • JSON Mode: Logs estruturados em uma única linha (ideal para AWS CloudWatch, Datadog e ELK).
  • Contextualização: Adicione metadados e contextos (ex: [ExpressApp]) facilmente.
  • TypeScript Nativo: Tipagem completa e suporte a ESM/CJS via tsup.

📦 Instalação

```bash npm install flowlog ```


🚀 Como usar

1. Configuração no Express (Middleware)

Para que o `correlationId` funcione, você deve envolver suas rotas com o `namespace.run`.

```javascript import express from 'express'; import { randomUUID } from 'node:crypto'; import { LoggerService, namespace } from 'flowlog';

const app = express(); const logger = new LoggerService('ExpressApp', 'debug', 'development', 'api-service');

app.use((req, res, next) => { const correlationId = req.headers['x-correlation-id'] || randomUUID();

namespace.run({ requestId: correlationId }, () => { next(); }); }); ```

2. Uso em Funções Assíncronas

```javascript import { LoggerService } from 'flowlog'; const logger = new LoggerService('Database');

async function saveToDb() { // O ID é recuperado automaticamente do contexto logger.info('Salvando dados no banco de dados...'); } ```


🛠️ Configuração via Variáveis de Ambiente

| Variável | Valores | Descrição | | :--- | :--- | :--- | | `LOG_FORMAT` | `text` | `json` | Define se o log será colorido (text) ou JSON estruturado. | | `LOG_LEVEL` | `debug`, `info`, `warn`, `error` | Nível mínimo de log. | | `APP_STAGE` | `development`, `production`, `test` | Prefixo do ambiente. |


🏗️ Pipeline de CI/CD

Esta biblioteca está configurada para deploy automático no NPM via GitHub Actions ao detectar uma nova tag:

  1. Atualize a versão no `package.json`.
  2. `git tag v1.0.0`
  3. `git push origin v1.0.0`

📄 Licença

Distribuído sob a licença MIT. EOF