Skip to main content

SyntropyLog Examples

Complete examples demonstrating SyntropyLog features from basic setup to enterprise patterns. All examples are production-ready and include comprehensive documentation.

✅ Complete & Tested Examples

These examples are fully functional and ready for production use. All include complete boilerplate, context propagation, structured logging, and automatic termination.

🚀 Core Framework Features (00-09)

Basic Setup

  • 00-setup-initialization - Basic framework initialization
  • 01-hello-world - Simple logging example
  • 02-basic-context - Context management basics
  • 03-context-ts - TypeScript context patterns

Configuration

  • 04-logging-levels-transports - Log levels and transports
  • 05-universal-context-patterns - Universal context patterns
  • 06-error-handling - Error handling strategies
  • 07-logger-configuration - Advanced logger configuration
  • 08-logging-matrix - Smart context logging matrix
  • 09-http-configuration - HTTP client configuration

🌐 HTTP & Redis Integration (10-13)

HTTP Configuration

  • 10-basic-http-correlation - HTTP request correlation
  • 11-custom-adapter - Custom HTTP adapters

Framework Integration

  • 12-http-redis-axios - HTTP + Redis + Express
  • 13-http-redis-fastify - Framework agnosticism demo

📡 Message Brokers & Correlation (20-24)

Basic Integration

  • 20-basic-kafka-correlation - Kafka integration
  • 21-basic-rabbitmq-broker - RabbitMQ integration
  • 22-basic-nats-broker - NATS integration

Advanced Patterns

  • 23-kafka-full-stack - Kafka distributed tracing
  • 24-full-stack-nats - Advanced NATS microservices

🚧 In Development Examples

These examples are currently in development and will be available in future releases.

🔧 Advanced Framework Features (14-19)

Framework Integration

  • 14-http-redis-nestjs - NestJS framework integration
  • 15-http-redis-koa - Koa framework integration
  • 16-http-redis-hapi - Hapi framework integration

Custom Features

  • 17-custom-serializers - Custom data serialization patterns
  • 18-custom-transports - Custom logging transport patterns
  • 19-doctor-cli - Configuration validation with Doctor CLI

🏢 Enterprise Patterns (25-27)

  • 25-production-configuration - Production-ready configuration patterns
  • 26-advanced-context - Advanced context management patterns
  • 27-complete-enterprise-app - Complete enterprise application example

🎯 Getting Started

Ready to try the examples?

All examples are available in the syntropylog-examples repository. Each complete example includes:

  • ✅ Complete boilerplate with graceful shutdown
  • ✅ Context propagation with correlation IDs
  • ✅ Structured logging with ClassicConsoleTransport
  • ✅ Automatic termination without manual intervention
  • ✅ Real integration with external services (Redis, Kafka, etc.)
  • ✅ Progressive learning from basic to advanced concepts

🐳 Docker Services

Some examples require external services. We provide Docker Compose files for easy setup:

Redis Examples (12, 13)

docker-compose up -d redis

Message Brokers (20, 21, 22, 23, 24)

docker-compose up -d