Skip to content

Commit

Permalink
[readme] add architecture diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
elgopher committed Jan 30, 2022
1 parent 9d2e5ed commit b6332c1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![Go Report Card](https://goreportcard.com/badge/github.com/elgopher/yala)](https://goreportcard.com/report/github.com/elgopher/yala)
[![codecov](https://codecov.io/gh/elgopher/yala/branch/master/graph/badge.svg)](https://codecov.io/gh/elgopher/yala)
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
<img src="logo.png" align="right" width="30%">
<img src="docs/logo.png" align="right" width="30%">

Tiny **structured logging** abstraction or facade for various logging libraries, allowing the end user to plug in the desired logging library in `main.go`.

Expand Down Expand Up @@ -146,6 +146,10 @@ func (MyAdapter) Log(context.Context, logger.Entry) {
* Logger is used by package/module/library author
* Adapter is an interface to be implemented by adapters. They use real logging libraries under the hood.
* So, why two abstractions? Simply because the smaller the Adapter interface, the easier it is to implement it. On the other hand, from library perspective, more methods means API which is easier to use.
* Here is the architecture from the package perspective:

<img src="docs/architecture.svg" width="100%">


### More examples

Expand Down
1 change: 1 addition & 0 deletions docs/architecture.drawio
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<mxfile host="app.diagrams.net" modified="2022-01-30T17:56:50.291Z" agent="5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36" etag="bCZ9QHYeS7MFD0OdidGL" version="16.4.3" type="device"><diagram id="IoNuYedbN0wVcADVCuIr" name="Page-1">5ZjbcpswEIafhstkOJm4l7Fz6EV6k8z0kDsFrUGNQFQssenTdwUiQKgdt407ngnJjLW/VgL9+8kRcYJltrnWrEg/KQ7S8V2+cYILx/e90Pcd8+vyulXm83krJFpwm9QLd+InWNG1aiU4lKNEVEqiKMZirPIcYhxpTGu1HqetlBzftWAJTIS7mMmp+kVwTO0qZm6vfwSRpN2dPdf2ZKxLtkKZMq7WAym4dIKlVgrbVrZZgjTmdb6046629D4/mIYc9xmQ3z7EV7clLpa3Jzf15nMwFz9OwqCd5onJyq44FZxDbrzSKqOPWlW6uVH8aLxq14J1ZxAtqzDNKpNXmmXUXKxTgXBHA4y+Ji5ISzGTFHnULFGrR1gqqXQzRRA1lxloHfbmrhnS+eqbaCWkHIxZzcyP0VWOA729SJ/aYx17Ao2wGUjWrmtQGaCuKcX2hmezdkg9ZnLdgxB4NiUdQuBakVn4kuep+/pQw5boD8oVnE38B0682lBpTFWiciYve3WhVZVzMNMaH/ucG6UKW5LvgFjbzccqVOOCkYO6/mrHN8E3E5zOuvBiM+y8qG20tQQlIRXDrnVaLJHpBHBXYtgmGhd2llSDZCiexrv67esz3U6vbJ+BzW9AbDQGNpxNgPU6iIfAdt9mb+/H/J3wGu7La3RcvIYTXm9UkoA+MKe+e2Sghv47ATXaE9TQPS5QowmoztJ3zhciR9Arc9SgcEHORJKWtXgggqMEG6+s0gnnnBVoCG91epyHPveg1AfhsVE/ex/UdzC/Tr13VNR3zz2g/pletywgFisRO+bc/5J68pwyQNIrEZWKVg5xmtMpOal3Mb7tjL39xH7I0/eH13dL+F93izepBv2x1FXp+DShe0/vOU1jWo170MZ7AxbGp/9eAQ4rVjX3OKD/0R6HSfc3bz9/4T+F/Xtw0zf4b0Jw+Qs=</diagram></mxfile>
1 change: 1 addition & 0 deletions docs/architecture.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes

0 comments on commit b6332c1

Please sign in to comment.