Installation
Get started with Vestig in your project.
Install the Core Package
bash
For Next.js Projects
If you're using Next.js 15+, also install the integration package:
bash
Basic Usage
Import and start logging immediately:
typescript
Log Levels
Vestig supports 5 log levels, from most to least verbose:
| Level | Value | Method | Use Case |
|---|---|---|---|
trace | 10 | log.trace() | Very detailed debugging, performance tracing |
debug | 20 | log.debug() | Development debugging, variable inspection |
info | 30 | log.info() | General information, user actions |
warn | 40 | log.warn() | Warnings, deprecations, potential issues |
error | 50 | log.error() | Errors, exceptions, failures |
Environment Configuration
Vestig can be configured via environment variables:
bash
Custom Logger Instance
For more control, create a custom logger:
typescript
TypeScript Support
Vestig is written in TypeScript and exports all types:
typescript
Runtime Detection
Vestig automatically detects your runtime environment:
typescript
Next Steps
- Logging Basics — Understanding structured logging
- Next.js Integration — Set up
@vestig/next - Tracing — Add spans for performance tracking
- Transports — Configure log destinations