This repository was archived by the owner on Oct 30, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 66 <Nullable >enable</Nullable >
77 <GeneratePackageOnBuild >true</GeneratePackageOnBuild >
88 <PackageId >Easy-Log</PackageId >
9- <Version >2.0.0 </Version >
9+ <Version >2.0.2 </Version >
1010 <Title >Easy-Log</Title >
1111 <Authors >Fyrax</Authors >
1212 <Description >Simple and easy Logging System for C# .NET with colors and format support</Description >
1616 <RepositoryUrl >https://github.com/byte-0x74/EasyLog</RepositoryUrl >
1717 <PackageTags >log logger logging logsystem easylog</PackageTags >
1818 <PackageIcon >easylog.png</PackageIcon >
19- <PackageReleaseNotes >Whole project rewrite see sample project for example how to use </PackageReleaseNotes >
19+ <PackageReleaseNotes >Fixed color encodings being in the file log </PackageReleaseNotes >
2020 </PropertyGroup >
2121
2222 <ItemGroup >
Original file line number Diff line number Diff line change @@ -32,9 +32,10 @@ public Logger(LoggerOptions loggerOptions)
3232 {
3333 var logType = GetLogType < T > ( ) ;
3434 var sb = new StringBuilder ( ) ;
35+ var dateTime = DateTime . Now . ToLongTimeString ( ) ;
3536 if ( _loggerOptions . ShowDateAndTime )
3637 {
37- sb . Append ( $ "[{ DateTime . Now . ToLongTimeString ( ) } ] ") ;
38+ sb . Append ( $ "[{ dateTime } ] ") ;
3839 }
3940 sb . Append ( $ "{ logType . Prefix } : ". Pastel ( logType . PrefixColor ) ) ;
4041 sb . Append ( Utils . Format ( str , args ) ) ;
@@ -45,7 +46,7 @@ public Logger(LoggerOptions loggerOptions)
4546 Console . Write ( colorized ) ;
4647 }
4748
48- _fileStream ? . Write ( sb . ToString ( ) ) ;
49+ _fileStream ? . Write ( $ "[ { dateTime } ] { logType . Prefix } : { Utils . Format ( str , args ) } " ) ;
4950 }
5051
5152 public void LogException ( Exception ex )
You can’t perform that action at this time.
0 commit comments