From e6d4467f3de79767be308e0f7bd5fe8882432c56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Burak=20Halefo=C4=9Flu?= Date: Wed, 26 Jun 2024 11:00:34 +0300 Subject: [PATCH] Console Log added --- .DS_Store | Bin 0 -> 6148 bytes Core/Core.csproj | 1 + .../Logging/Serilog/Loggers/ConsoleLogger.cs | 14 ++++++++++++++ 3 files changed, 15 insertions(+) create mode 100644 .DS_Store create mode 100644 Core/CrossCuttingConcerns/Logging/Serilog/Loggers/ConsoleLogger.cs diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..26b607a1398a657bbc285ed44366ce8b5286d90a GIT binary patch literal 6148 zcmeHK&2G~`5S~ra)M=>{sUX1t$r9HnG)hrbamil~Js?$0p$9-APAp>KdZXBB4pF4s z;Td=Z#E}Pqci{xz>~4$WkSjv46U~16GqXGM+1||(k!VeaHKH;RIZ(#J4vOChkF%~x z&h*>?3N=SWKE)KDhH|iGZ96OjmVv*G0seL!YS9$mZ9u8-*9)bGG2R%O(CQB*s9~d^ zHc6V0&)<2n8nV8n^nBm)yFL zGW2fheeXr!&wAy%Z5bu~Ao3^5AsG5Fd36~?Lpf{7X*7(LZ&wdEC8yLYKbX%CkB=&D z{pfg6ap$%AVXfjmsn-{al5_9TcL}U?WqqXYd9-pmLk|b$1elGJ1TJdlv0Rf+{inV!X= z6Fjs;c?Z01#{PT8zC`EnXkzVWz$#tQaMdHnIi*)9B90L<~1!( zBbEWnz<rml`nw5!w}~U4^+~2LopY`4^?Tu_+fSXKBaz7JJ`F_$aAhQXyq^g!$%0Y!r? JECYX(fu9PZ&hG#K literal 0 HcmV?d00001 diff --git a/Core/Core.csproj b/Core/Core.csproj index 313c4d98..f1aa3e17 100644 --- a/Core/Core.csproj +++ b/Core/Core.csproj @@ -40,6 +40,7 @@ + diff --git a/Core/CrossCuttingConcerns/Logging/Serilog/Loggers/ConsoleLogger.cs b/Core/CrossCuttingConcerns/Logging/Serilog/Loggers/ConsoleLogger.cs new file mode 100644 index 00000000..f7361c75 --- /dev/null +++ b/Core/CrossCuttingConcerns/Logging/Serilog/Loggers/ConsoleLogger.cs @@ -0,0 +1,14 @@ +using Serilog; + +namespace Core.CrossCuttingConcerns.Logging.Serilog.Loggers; + +public class ConsoleLogger : LoggerServiceBase +{ + public ConsoleLogger() + { + var seriLogConfig = new LoggerConfiguration() + .WriteTo.Console(outputTemplate: "[{Timestamp:HH:mm:ss} {Level:u3}] {Message:lj}{NewLine}{Exception}") + .CreateLogger(); + Logger = seriLogConfig; + } +} \ No newline at end of file