@budgetbuddyde/logger
A collection of utility functions, configurations, and formatters for Winston loggers used within the BudgetBuddy project.
Features
- Log Level Utilities: Helper functions for parsing and validating log levels from environment variables
- Console Format Builder: Pre-configured Winston formatters for consistent console output
- Level Padding: Formatting for uniform level output in logs
- Level Configuration: Standardized log level configuration with colors for the entire project
- TypeScript Support: Fully typed with comprehensive type definitions
- Winston Integration: Seamless integration with Winston for all services and apps
Installation
Quick Start
Log Level from Environment Variables
Winston Logger with Custom Format
Usage in the Project
The logger package is used across all services (Backend, Auth-Service) and apps (WebApp) in the BudgetBuddy project to ensure consistent logging configuration and formatting.
In the Backend Service
In the WebApp
For the WebApp, a simplified version using direct createLogger from the package is used (if available), or Winston is configured directly.
Publishing
The package is published automatically when changes are made to the main branch. Publishing takes place via Concourse CI within the bb-logger workflow.
BudgetBuddyDE