From 91bae8f8fc1f81b87ce5377cc48a13d60aea54ef Mon Sep 17 00:00:00 2001 From: colincreasman Date: Tue, 7 Dec 2021 19:41:09 -0800 Subject: [PATCH] Logging LLD First draft of logging LLD --- Source Code/LogToFile_Sequence.svg | 1 + 1 file changed, 1 insertion(+) create mode 100644 Source Code/LogToFile_Sequence.svg diff --git a/Source Code/LogToFile_Sequence.svg b/Source Code/LogToFile_Sequence.svg new file mode 100644 index 0000000..0796128 --- /dev/null +++ b/Source Code/LogToFile_Sequence.svg @@ -0,0 +1 @@ +title%20Log%20Event%20to%20File%20%0A%0Aparticipant%20Controller.cs%20%23lightgreen%0Aparticipant%20LoggingManager%20%23ffffe0%0Aparticipant%20LogEntry%20%23cbc3e3%0Aparticipant%20FileLoggerFactory%20%23ff8b3d%0Aparticipant%20FileLogger%20%23D3D3D3%0A%0A%0A%0A%0A%5B-%3EController.cs%3Arequest%20to%20log%20event%20to%20file%0Aactivate%20Controller.cs%20%23lightgreen%0A%0AController.cs-%3ELoggingManager%3Amanager%20%3D%20new%20LoggingManager()%0A%0Aactivate%20LoggingManager%20%23ffffe0%0A%0ALoggingManager-%3ELoggingManager%3AConstructor()%0A%0ALoggingManager-%3ELogEntry%3A_logEntry%20%3D%20new%20LogEntry(int%20userID%2C%5CnDateTime%20timestamp%2C%20string%20level%2C%20%5Cnstring%20category%2C%20string%20message)%0A%0Aactivate%20LogEntry%20%23cbc3e3%0A%0A%0ALogEntry-%3ELogEntry%3AConstuctor(int%20userID%2C%5Cnstring%20level%2C%20%5CnDateTime%20timestamp%2C%5Cnstring%20category%2C%5Cnstring%20description)%0ALoggingManager%3C--LogEntry%3Areturn%20new%20LogEntry()%0A%0Adeactivate%20LogEntry%0ALoggingManager-%3EFileLoggerFactory%3A_loggerFactory%20%3D%20new%20FileLoggerFactory()%0Aactivate%20FileLoggerFactory%20%23ff8b3d%0A%0AFileLoggerFactory-%3EFileLoggerFactory%3A%20Constructor()%0A%0ALoggingManager%3C--FileLoggerFactory%3Areturn%20new%20FileLoggerFactory%0ALoggingManager-%3EFileLoggerFactory%3A_logger%20%3D%20_loggerFactory.CreateLogger()%0AFileLoggerFactory-%3EFileLogger%3A%20new%20FileLogger()%0A%0A%0Aactivate%20FileLogger%20%23D3D3D3%0AFileLogger-%3EFileLogger%3AConstructor()%0A%0ALoggingManager%3C--FileLogger%3Areturn%20new%20FileLogger()%0Adeactivate%20FileLoggerFactory%0A%0ALoggingManager-%3EFileLogger%3A_logger.Log(_logEntry)%0A%0Adeactivate%20LoggingManager%0AFileLogger-%3EFileLogger%3AAppendFile(LogEntry)%0A%0A%0Aalt%20%23red%20file%20not%20found%20%0AFileLogger-%3EFileLogger%3ACreateFile()%0A%0Aend%0A%0Aalt%20%23red%20insufficient%20storage%20capacity%20%0AFileLogger-%3EFileLogger%3A%20new%20IOException()%0A%0AController.cs%3C--FileLogger%3Areturn%20new%20IOException()%0Aend%20%0ALog Event to File Controller.csLoggingManagerLogEntryFileLoggerFactoryFileLoggerrequest to log event to filemanager = new LoggingManager()Constructor()_logEntry = new LogEntry(int userID,DateTime timestamp, string level, string category, string message)Constuctor(int userID,string level, DateTime timestamp,string category,string description)return new LogEntry()_loggerFactory = new FileLoggerFactory()Constructor()return new FileLoggerFactory_logger = _loggerFactory.CreateLogger()new FileLogger()Constructor()return new FileLogger()_logger.Log(_logEntry)AppendFile(LogEntry)CreateFile()new IOException()return new IOException()alt[file not found ]alt[insufficient storage capacity ] \ No newline at end of file