1.5.0 • Published 10 months ago

nuxt-logtail v1.5.0

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

NuxtLogtail

npm version npm downloads License Nuxt

Logtail implementation for nuxt 3, if no source token provided, just behaves like the default console

Features

  •  SSR compatible
  • 🚠  Hooks into console

Quick Setup

  1. Add nuxt-logtail dependency to your project
# Using pnpm
pnpm add -D nuxt-logtail

# Using yarn
yarn add --dev nuxt-logtail

# Using npm
npm install --save-dev nuxt-logtail
  1. Add nuxt-logtail to the modules section of nuxt.config.ts
export default defineNuxtConfig({
  modules: [
    'nuxt-logtail'
  ],

  nuxtLogtail: {
    // javascript source token from BetterStack
    sourceToken: process.env.BETTERSTACK_SOURCE_TOKEN,
  }
})

That's it! You can now use NuxtLogtail in your Nuxt app ✨

Usage

Exposes a useLogtail composable, that can be used for logging, returns ether logtail browser or logtail node instance.

Development

# Install dependencies
npm install

# Generate type stubs
npm run dev:prepare

# Develop with the playground
npm run dev

# Build the playground
npm run dev:build

# Run ESLint
npm run lint

# Run Vitest
npm run test
npm run test:watch

# Release new version
npm run release
1.5.0

10 months ago

1.4.0

10 months ago

1.3.1

10 months ago

1.3.0

10 months ago

1.2.0

10 months ago

1.1.4

10 months ago

1.1.3

10 months ago

1.1.2

10 months ago

1.1.1

10 months ago

1.1.0

10 months ago

1.0.6

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago