Skip to content

Commit

Permalink
Add structured async logger to class diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
dl1998 committed Apr 1, 2024
1 parent b4719de commit 189d303
Show file tree
Hide file tree
Showing 3 changed files with 1,367 additions and 1,183 deletions.
25 changes: 25 additions & 0 deletions docs/architecture/diagrams/plantuml/class_diagram.plantuml
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,28 @@ package pkg {
+ Critical(parameters : ...any)
+ Emergency(parameters : ...any)
}
struct baseAsyncLogger implements baseLoggerInterface {
~ *baseLogger
~ messageQueue : chan logrecord.Interface
~ waitGroup sync.WaitGroup
~ startListeningMessages()
+ WaitToFinishLogging()
+ Open(queueSize : int)
+ Close()
+ Log(level : level.Level, parameters : ...any)
}
interface AsyncLoggerInterface extends Interface {
+ Interface
+ WaitToFinishLogging()
+ Open(queueSize : int)
+ Close()
}
struct AsyncLogger implements AsyncLoggerInterface {
+ *Logger
+ WaitToFinishLogging()
+ Open(queueSize : int)
+ Close()
}
struct Configuration {
~ fromLevel : level.Level
~ toLevel : level.Level
Expand All @@ -475,6 +497,7 @@ package pkg {
~ template : map[string]string
~ init()
+ New(name : string, timeFormat : string) : *Logger
+ NewAsyncLogger(name : string, timeFormat : string, queueSize : int) : *AsyncLogger
+ WithFromLevel(fromLevel : level.Level) : Option
+ WithToLevel(toLevel : level.Level) : Option
+ WithTemplate(template : map[string]string) : Option
Expand Down Expand Up @@ -504,7 +527,9 @@ package pkg {
+ Emergency(message : string, parameters : ...any)
}

baseAsyncLogger *-- baseLogger
Logger *-- baseLoggerInterface
AsyncLogger *-- Logger
"<<module>>" ..> Logger : uses
"<<module>>" ..> Option : uses
"<<module>>" ..> Configuration : uses
Expand Down
Binary file modified docs/architecture/diagrams/png/class_diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 189d303

Please sign in to comment.