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

seven365-logger

v0.1.1

Published

Seven365's TypeScript logger — logs to console and ships every level to a Laravel log server. Built for Nuxt 3 + Capacitor apps.

Readme

seven365-logger

Seven365's own logger for TypeScript apps (Nuxt 3, Capacitor). Logs to the console like normal, and ships every level to a Laravel log server so production logs are visible remotely — no more digging through device logs.

Install

npm install seven365-logger

Usage

import { Seven365Logger } from 'seven365-logger';

export const logger = new Seven365Logger({
  apiUrl: 'https://logs.my-app.seven365.io/api/v1/logs',
  apiKey: process.env.LOGGER_API_KEY!,
  appName: 'my-nuxt-app',
  environment: 'production', // 'staging' | 'development'
});

logger.info('User logged in', { userId: 123 });
logger.warn('Slow response', { ms: 4200 });
logger.error('Payment failed', { orderId: 456 });
logger.fatal('Unrecoverable state', { error });

Instantiate once in a shared module and import that instance everywhere — ES module caching already gives you a singleton, no getInstance() needed.

Nuxt 3

// plugins/logger.ts
import { Seven365Logger } from 'seven365-logger';

export default defineNuxtPlugin(() => {
  const config = useRuntimeConfig();
  const logger = new Seven365Logger({
    apiUrl: config.public.logsApiUrl,
    apiKey: config.public.logsApiKey,
    appName: 'my-nuxt-app',
    environment: config.public.env,
  });

  return { provide: { logger } };
});

Then use const { $logger } = useNuxtApp() anywhere in the app.

Capacitor

This package has no direct dependency on Capacitor — pass in the plugin instances your app already installed:

import { Network } from '@capacitor/network';
import { App } from '@capacitor/app';
import { Preferences } from '@capacitor/preferences';
import { Seven365Logger, CapacitorPreferencesQueueStorage, attachCapacitorLifecycle } from 'seven365-logger/capacitor';

const logger = new Seven365Logger({
  apiUrl: '...',
  apiKey: '...',
  appName: 'my-app',
  platform: 'ios',
  storage: new CapacitorPreferencesQueueStorage(Preferences),
});

attachCapacitorLifecycle(logger, { network: Network, app: App });

This flushes the queue as soon as connectivity returns or the app backgrounds, and persists pending logs across restarts while offline.

Behavior

  • All five levels (debug, info, warn, error, fatal) go to the console and ship to the server — there's no separate remote-level filtering.
  • Shipping is batched and non-blocking: entries queue up and flush every flushIntervalMs (default 5s) or once batchSize (default 20) is reached — never one HTTP request per log line.
  • Failed batches stay queued and retry with backoff (maxRetries, default 5) on the next flush.
  • Sensitive-looking context keys (password, token, secret, apiKey, authorization, card-number-shaped keys, etc.) are redacted before the payload ever leaves the device. Extend the list via redactKeys.
  • apiUrl must be https:// outside of environment: 'development'.
  • The API key is sent via the X-App-Key header, never a query string. Treat it as a low-trust client identifier — a value embedded in a shipped app can always be extracted — real protection is server-side rate limiting and the ability to rotate the key.

Retrofitting legacy console.log calls

Set captureConsole: true to patch global console.debug/info/warn/error so existing scattered console calls route through the logger too, without a rewrite. Off by default — prefer explicit logger.x() calls in new code.

Config reference

See Seven365LoggerConfig for the full list of options.