Skip to content

Commit

Permalink
Add architecture image and TODO section
Browse files Browse the repository at this point in the history
Introduced an architecture diagram image to the README for better visualization. Additionally, added a TODO section listing upcoming improvements and features for the logging system. Tweaked some text for clarity and formatting consistency.
  • Loading branch information
smyrgeorge committed Oct 18, 2024
1 parent 9c63968 commit 38d6636
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,33 @@ and channels to deliver efficient and scalable logging.

🏠 [Homepage](https://smyrgeorge.github.io/) (under construction)

## TODO

- [ ] Introduce tracing API (event/span)
- [ ] `CoroutineContexAwareLogger`: `Logger` that will collect more info from the coroutine context. (in progress)
- [ ] Ability to chain appenders (in progress)
- [ ] Json console logger
- [ ] `LogbackAppender`: `Appender` that will publish the logging events to the logback.

## Architecture

At the core of the logging system is the `RootLogger`, which maintains a `Channel<LoggingEvent>`.
All logging events are enqueued into this channel, and the `RootLogger` is responsible for distributing
these events to the registered appenders (refer to `RootLogger` for more details).
<!--suppress HtmlDeprecatedAttribute -->
<p align="center">
<!--suppress CheckImageSize -->
<img src="img/arch.png" alt="Architecture" width="158" height="338">
</p>

At the core of the logging system is the `RootLogger`, which manages a `Channel<LoggingEvent>`. All logging events are
enqueued in this channel, and the `RootLogger` is responsible for distributing them to the registered appenders (refer
to `RootLogger` for more details).

Each `Appender` may also maintain its own `Channel`, which is particularly beneficial in scenarios that require
batching—such as sending batched log or trace events over the network or appending them to a file. For instance, the
`FlowAppender` leverages `kotlinx.coroutines.flow.Flow` to process incoming events efficiently.

Each appender may also have its own `Channel`, which is especially useful
for cases requiring batching—such as sending batched log or trace events over the network or
appending them to a file.
On the other hand, some appenders can be simpler and do not require a `Channel` for event processing. For example, the
`ConsoleAppender` directly prints each incoming event to the console without queuing, offering a straightforward logging
solution.

## API

Expand Down
Binary file added img/arch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 38d6636

Please sign in to comment.