Repository navigation
v1.1.0 β Route Exclusion, minLevel Control, and ESM Support
β¨ What's New in v1.1.0
π« Route Exclusion (excludePaths)
Added support for excluding specific routes or path prefixes from being logged by expressLogger.
Example:
app.use(LogSphere.expressLogger({
excludePaths: ['/logs', '/static', '/health-check']
}));This prevents noisy endpoints like dashboards, static assets, or health checks from cluttering your logs.
π Minimum Log Level (minLevel)
You can now configure the minimum log level captured by LogSphere.
Example:
LogSphere.configure({
minLevel: 'INFO'
});Available levels:
DEBUG β INFO β WARN β ERROR
Only logs at or above the configured level will be recorded.
π Dashboard Logging Fix
Fixed an issue where the LogSphere dashboard (/logs) requests were being logged by the middleware, creating a feedback loop where the dashboard logged its own API requests.
LogSphere now automatically suppresses logging for its internal dashboard APIs.
π¦ ESM Support
LogSphere now works seamlessly with modern ESM imports.
Example:
import { dashboard, expressLogger, info } from 'logsphere';
app.use(expressLogger());
app.use('/logs', dashboard());Note: Both CommonJS (
require) and ESM (import) are fully supported.
π§ Upgrade
npm install logsphere@latest
Thanks for using LogSphere π