Quik Framework :: Logger
- Codename: Berlin
- Version: 0.2.0-beta.76
- License: Check license here
Provides configurable loggers such as console or JSON output. The module sets up the logger instance according to configuration and environment.
Installation
npm install @quik/logging
Configuration
Environment overrides:
LOGS_ENABLEDLOGGER_TYPE(default:console)LOG_LEVEL(default:debug)LOG_FILE(default:app.log)LOG_FOLDER(default:./storage/logs)
Configuration keys (via @quik/core):
logs.enabledlogs.type(console,json,no-logger)logs.level(e.g.info,debug,error)logs.filelogs.folder
Usage
import { getLogger } from '@quik/core';
getLogger().info('App started');
API Highlights
QLoggerbase logger implementation.QConsoleLogger,QJSONLogger,QNoLoggervariants.getLoggerByType()helper.
Output Formats
- Console logger emits plain text via Winston's simple formatter.
- JSON logger emits structured JSON with
levelandmessage, and includes any extra metadata fields passed to the logger methods.
Log level filtering follows standard Winston semantics: messages below the configured level are discarded.
Testing & Coverage
See the root instructions for details on running pnpm run test:coverage and accessing coverage artifacts.
API Reference
Generated API documentation is available in the logging API section.