Skip to content

Commit

Permalink
Add async logger to class diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
dl1998 committed Mar 31, 2024
1 parent aa9ddbf commit 470f1ef
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
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 @@ -227,6 +227,28 @@ package pkg {
+ Critical(message : string, parameters : ...any)
+ Emergency(message : string, parameters : ...any)
}
struct baseAsyncLogger implements baseLoggerInterface {
~ *baseLogger
~ messageQueue : chan logrecord.Interface
~ waitGroup sync.WaitGroup
~ startListeningMessages()
+ WaitToFinishLogging()
+ Open(queueSize : int)
+ Close()
+ Log(level : level.Level, message : string, 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 @@ -243,6 +265,7 @@ package pkg {
~ template : 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 : string) : Option
Expand All @@ -268,7 +291,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
6 changes: 5 additions & 1 deletion docs/architecture/diagrams/svg/class_diagram.svg
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 470f1ef

Please sign in to comment.