# log4js-node/log4js-node

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/log4js-node-log4js-node).**

5,838 stars · 754 forks · JavaScript · NOASSERTION

## Links

- GitHub: https://github.com/log4js-node/log4js-node
- awesome-repositories: https://awesome-repositories.com/repository/log4js-node-log4js-node.md

## Description

This is a logging framework for Node.js based on the log4j architecture. It provides a system for managing hierarchical loggers and severity thresholds, allowing application events to be recorded and categorized across different levels of importance.

The framework is distinguished by its cluster-aware logging, which synchronizes and coordinates output across multiple process clusters into a unified stream. It also includes a dedicated log file rotation manager that automatically rolls files by date or size to prevent disk space exhaustion, and a network log transporter for sending data to remote servers via TCP or UDP.

The project covers broad observability capabilities, including call stack capture for debugging and the ability to route log data to multiple destinations such as the console, local files, or external network services. It supports structured log formatting through custom output patterns and manages diagnostic volume through category-based level and route management.

## Tags

### Programming Languages & Runtimes

- [Node.js Logging Libraries](https://awesome-repositories.com/f/programming-languages-runtimes/node-js-logging-libraries.md) — Provides a comprehensive logging framework specifically designed for the Node.js runtime environment.
- [Custom Severity Levels](https://awesome-repositories.com/f/programming-languages-runtimes/language-features-paradigms/language-features/built-ins/autocommand-overrides/logging-level-configurations/custom-severity-levels.md) — Supports the creation of specialized logging categories with unique colors for organized event tracking. ([source](https://log4js-node.github.io/log4js-node/migration-guide.html))
- [Log Pattern Formatting](https://awesome-repositories.com/f/programming-languages-runtimes/string-pattern-replacements/log-pattern-formatting.md) — Transforms raw log data into structured text via custom patterns and dynamic metadata placeholders.

### System Administration & Monitoring

- [System Logging and Debugging](https://awesome-repositories.com/f/system-administration-monitoring/system-logging-and-debugging.md) — Provides a high-performance framework for recording and categorizing diagnostic messages at various severity levels. ([source](https://github.com/log4js-node/log4js-node#readme))
- [Cluster-Aware Loggers](https://awesome-repositories.com/f/system-administration-monitoring/cluster-aware-loggers.md) — Acts as a synchronization system coordinating log output across Node.js process clusters.
- [Cluster Output Synchronization](https://awesome-repositories.com/f/system-administration-monitoring/cluster-log-aggregation/cluster-output-synchronization.md) — Synchronizes and coordinates log output across multiple Node.js process clusters into a unified event stream. ([source](https://log4js-node.github.io/log4js-node/migration-guide.html))
- [Cluster Log Synchronization](https://awesome-repositories.com/f/system-administration-monitoring/cluster-log-synchronization.md) — Synchronizes and coordinates log output across multiple Node.js process clusters into a unified stream.
- [Category-Based Log Routing](https://awesome-repositories.com/f/system-administration-monitoring/container-observability-tools/log-routing/application-log-redirection/application-log-routing/category-based-log-routing.md) — Assigns unique logging levels and destinations to named categories to control the granularity of captured data. ([source](https://github.com/log4js-node/log4js-node/blob/master/README.md))
- [Hierarchical Log Entries](https://awesome-repositories.com/f/system-administration-monitoring/contextual-logging/hierarchical-log-entries.md) — Organizes loggers into hierarchical groups that inherit output settings and severity levels. ([source](https://github.com/log4js-node/log4js-node/blob/master/CHANGELOG.md))
- [Log Rotation Utilities](https://awesome-repositories.com/f/system-administration-monitoring/log-rotation-utilities.md) — Automates the splitting and archiving of log files by size or time to manage disk space.
- [Centralized Logging Systems](https://awesome-repositories.com/f/system-administration-monitoring/centralized-logging-systems.md) — Supports transmitting logs from distributed processes to a remote destination for unified monitoring.
- [Logger-Level Property Attachments](https://awesome-repositories.com/f/system-administration-monitoring/log-management/logger-hierarchies/independent-logger-instances/contextual-logger-instances/logger-level-property-attachments.md) — Adds key-value properties to logger instances to group related messages from specific users or sessions. ([source](https://log4js-node.github.io/log4js-node/migration-guide.html))
- [Remote Log Transmission](https://awesome-repositories.com/f/system-administration-monitoring/remote-log-transmission.md) — Transmits log data to remote servers using TCP or UDP protocols for centralized logging. ([source](https://github.com/log4js-node/log4js-node/blob/master/CHANGELOG.md))
- [TCP/UDP Log Ingestion](https://awesome-repositories.com/f/system-administration-monitoring/tcp-udp-log-ingestion.md) — Serializes and transmits log events over TCP and UDP sockets for centralized data collection.

### Content Management & Publishing

- [Logger Hierarchies](https://awesome-repositories.com/f/content-management-publishing/category-organizations/logger-hierarchies.md) — Provides a hierarchical system where severity levels and settings cascade from parent loggers to sub-categories.

### Data & Databases

- [Severity Threshold Management](https://awesome-repositories.com/f/data-databases/category-based-data-partitioning/severity-threshold-management.md) — Allows assigning different severity thresholds to specific categories to control the volume of produced diagnostic data. ([source](https://log4js-node.github.io/log4js-node/))

### Development Tools & Productivity

- [Log File Rotators](https://awesome-repositories.com/f/development-tools-productivity/file-content-appenders/data-appending/log-file-rotators.md) — Automatically rotates log files based on size limits or calendar dates to prevent disk exhaustion.
- [Multi-Destination Log Routers](https://awesome-repositories.com/f/development-tools-productivity/cli-output-controllers/stream-redirection/diagnostic-log-routers/multi-destination-log-routers.md) — Routes log events to multiple heterogeneous targets including the console, local files, and network services. ([source](https://github.com/log4js-node/log4js-node/blob/master/v2-changes.md))

### Software Engineering & Architecture

- [Log4j-Style Architectures](https://awesome-repositories.com/f/software-engineering-architecture/log4j-style-architectures.md) — Implements a logging architecture based on log4j for managing hierarchical loggers and severity thresholds.
- [Appender-Based Routing](https://awesome-repositories.com/f/software-engineering-architecture/appender-based-routing.md) — Implements a modular plug-in system to route log messages to various destinations like files or network sockets.
- [Custom Log Formatting](https://awesome-repositories.com/f/software-engineering-architecture/custom-log-formatting.md) — Allows defining custom layouts and injecting metadata to structure log entries for better auditing.
- [Stack Trace Generation](https://awesome-repositories.com/f/software-engineering-architecture/stacks/stack-trace-formatters/stack-trace-generation.md) — Captures and parses the runtime call stack to identify the exact file and line number of log triggers.

### Networking & Communication

- [Remote Log Collection Protocols](https://awesome-repositories.com/f/networking-communication/network-transport-protocols/multi-protocol-routing/remote-log-collection-protocols.md) — Transports log data to remote collectors using TCP and UDP network protocols.

### Part of an Awesome List

- [Logging](https://awesome-repositories.com/f/awesome-lists/devops/logging.md) — Logging library for Node.js.
