Skip to content

v1.1.0 β€” Route Exclusion, minLevel Control, and ESM Support

Choose a tag to compare

@rahulroynipon rahulroynipon released this 13 Mar 21:25
· 6 commits to release since this release

✨ 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 πŸš€