# ifeanyi-ugwu/winston_logger_rs architecture

> Architecture diagram of the GitHub repository ifeanyi-ugwu/winston_logger_rs, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ifeanyi-ugwu/winston_logger_rs
- Repository: https://github.com/ifeanyi-ugwu/winston_logger_rs

## Overview

This Rust workspace provides Winston-style structured logging: applications submit log events, the logger applies configuration and formatting, then transports write or forward entries; query-capable transports can retrieve filtered logs. `logform` supplies formats, while `winston_transport` provides transport and query abstractions. The tree and sampled excerpts establish the crate boundaries and several integration behaviors, but the README is empty and core logger internals were not sampled, so some central call wiring is shown only at the public workflow level.

Main entry points: [`winston_file/src/lib.rs`](https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/winston_file/src/lib.rs) (File transport), [`winston/src/logger.rs`](https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/winston/src/logger.rs) (Logger), [`winston_transport/src/transport.rs`](https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/winston_transport/src/transport.rs) (Transport API), [`logform/src/lib.rs`](https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/logform/src/lib.rs) (Format API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["Logging core"]
  node_winston_api["Winston API<br/>[lib.rs]"]
  node_global["Global logging<br/>[global.rs]"]
  node_logger["Logger<br/>[logger.rs]"]
  node_builder["Logger builder<br/>[logger_builder.rs]"]
  node_levels["Level options<br/>[logger_levels.rs]"]
end

subgraph group_formatting["Formatting"]
  node_log_info["Log entry<br/>[log_info.rs]"]
  node_logform["Format API<br/>[lib.rs]"]
  node_format_config["Format config<br/>[mod.rs]"]
  node_formats["Format transforms<br/>[mod.rs]"]
end

subgraph group_transport["Transport framework"]
  node_transport_api["Transport API<br/>[transport.rs]"]
  node_threaded["Threaded transport"]
  node_batch["Batch transport<br/>[batch_transport.rs]"]
  node_query["Log query<br/>[log_query.rs]"]
  node_query_dsl["Query DSL<br/>[mod.rs]"]
end

subgraph group_sinks["Sinks and integrations"]
  node_file["File transport<br/>[lib.rs]"]
  node_daily["Daily rotation"]
  node_http["HTTP transport<br/>[lib.rs]"]
  node_mongodb["MongoDB transport<br/>[lib.rs]"]
  node_proxy["Proxy transport<br/>[lib.rs]"]
  node_tracing["Tracing adapter<br/>[lib.rs]"]
end

node_application(("Application"))

node_application -->|"logs through"| node_winston_api
node_winston_api -->|"exposes"| node_global
node_global -->|"dispatches to"| node_logger
node_logger -->|"creates entries"| node_log_info
node_logger -->|"formats entries"| node_formats
node_logger -->|"dispatches entries"| node_transport_api
node_builder -->|"builds"| node_logger
node_builder -->|"sets levels"| node_levels
node_logform -->|"exports"| node_log_info
node_logform -->|"exports"| node_formats
node_format_config -->|"configures"| node_formats
node_threaded -->|"implements"| node_transport_api
node_batch -->|"implements"| node_transport_api
node_file -->|"implements"| node_transport_api
node_file -->|"forwards entries"| node_proxy
node_file -->|"filters logs"| node_query
node_file -->|"evaluates filters"| node_query_dsl
node_daily -->|"rotates files"| node_file
node_http -->|"uses proxy"| node_proxy
node_http -->|"serializes entries"| node_log_info
node_mongodb -->|"executes queries"| node_query
node_mongodb -->|"applies filters"| node_query_dsl
node_tracing -->|"formats events"| node_logform
node_tracing -->|"dispatches events"| node_transport_api

click node_winston_api "https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/winston/src/lib.rs"
click node_global "https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/winston/src/global.rs"
click node_logger "https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/winston/src/logger.rs"
click node_builder "https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/winston/src/logger_builder.rs"
click node_levels "https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/winston/src/logger_levels.rs"
click node_log_info "https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/logform/src/log_info.rs"
click node_logform "https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/logform/src/lib.rs"
click node_format_config "https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/logform/src/config/mod.rs"
click node_formats "https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/logform/src/formats/mod.rs"
click node_transport_api "https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/winston_transport/src/transport.rs"
click node_threaded "https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/winston_transport/src/threaded_transport.rs"
click node_batch "https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/winston_transport/src/batch_transport.rs"
click node_query "https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/winston_transport/src/log_query.rs"
click node_query_dsl "https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/winston_transport/src/query_dsl/mod.rs"
click node_file "https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/winston_file/src/lib.rs"
click node_daily "https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/winston_daily_rotate_file/src/daily_rotate_file.rs"
click node_http "https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/winston_http/src/lib.rs"
click node_mongodb "https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/winston_mongodb/src/lib.rs"
click node_proxy "https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/winston_proxy_transport/src/lib.rs"
click node_tracing "https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/winston_tracing/src/lib.rs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_winston_api,node_global,node_logger,node_builder,node_levels toneBlue
class node_log_info,node_logform,node_format_config,node_formats toneAmber
class node_transport_api,node_threaded,node_batch,node_query,node_query_dsl toneMint
class node_file,node_daily,node_http,node_mongodb,node_proxy,node_tracing toneRose
class node_application toneIndigo
```

## Components

### Logging core

- [Winston API](https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/winston/src/lib.rs): `winston/src/lib.rs`
- [Global logging](https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/winston/src/global.rs): `winston/src/global.rs`
- [Logger](https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/winston/src/logger.rs): `winston/src/logger.rs`
- [Logger builder](https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/winston/src/logger_builder.rs): `winston/src/logger_builder.rs`
- [Level options](https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/winston/src/logger_levels.rs): `winston/src/logger_levels.rs`

### Formatting

- [Log entry](https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/logform/src/log_info.rs): `logform/src/log_info.rs`
- [Format API](https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/logform/src/lib.rs): `logform/src/lib.rs`
- [Format config](https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/logform/src/config/mod.rs): `logform/src/config/mod.rs`
- [Format transforms](https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/logform/src/formats/mod.rs): `logform/src/formats/mod.rs`

### Transport framework

- [Transport API](https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/winston_transport/src/transport.rs): `winston_transport/src/transport.rs`
- [Threaded transport](https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/winston_transport/src/threaded_transport.rs): `winston_transport/src/threaded_transport.rs`
- [Batch transport](https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/winston_transport/src/batch_transport.rs): `winston_transport/src/batch_transport.rs`
- [Log query](https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/winston_transport/src/log_query.rs): `winston_transport/src/log_query.rs`
- [Query DSL](https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/winston_transport/src/query_dsl/mod.rs): `winston_transport/src/query_dsl/mod.rs`

### Sinks and integrations

- [File transport](https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/winston_file/src/lib.rs): `winston_file/src/lib.rs`
- [Daily rotation](https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/winston_daily_rotate_file/src/daily_rotate_file.rs): `winston_daily_rotate_file/src/daily_rotate_file.rs`
- [HTTP transport](https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/winston_http/src/lib.rs): `winston_http/src/lib.rs`
- [MongoDB transport](https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/winston_mongodb/src/lib.rs): `winston_mongodb/src/lib.rs`
- [Proxy transport](https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/winston_proxy_transport/src/lib.rs): `winston_proxy_transport/src/lib.rs`
- [Tracing adapter](https://github.com/ifeanyi-ugwu/winston_logger_rs/blob/main/winston_tracing/src/lib.rs): `winston_tracing/src/lib.rs`

### Other components

- **Application**

## Connections

- Application → Winston API: logs through
- Winston API → Global logging: exposes
- Global logging → Logger: dispatches to
- Logger → Log entry: creates entries
- Logger → Format transforms: formats entries
- Logger → Transport API: dispatches entries
- Logger builder → Logger: builds
- Logger builder → Level options: sets levels
- Format API → Log entry: exports
- Format API → Format transforms: exports
- Format config → Format transforms: configures
- Threaded transport → Transport API: implements
- Batch transport → Transport API: implements
- File transport → Transport API: implements
- File transport → Proxy transport: forwards entries
- File transport → Log query: filters logs
- File transport → Query DSL: evaluates filters
- Daily rotation → File transport: rotates files
- HTTP transport → Proxy transport: uses proxy
- HTTP transport → Log entry: serializes entries
- MongoDB transport → Log query: executes queries
- MongoDB transport → Query DSL: applies filters
- Tracing adapter → Format API: formats events
- Tracing adapter → Transport API: dispatches events
