@@ -31,9 +31,6 @@ public class AnalysisLogger
3131 private readonly string _exceptionsDirectory ;
3232 private static string _defaultLogName ;
3333 private static Dictionary < string , AnalysisLogger > _logDictionary ;
34-
35- private log4net . ILog Log4NetLogger { get ; set ; }
36-
3734 private static Dictionary < string , AnalysisLogger > LogDictionary
3835 {
3936 get { return _logDictionary ?? ( _logDictionary = new Dictionary < string , AnalysisLogger > ( ) ) ; }
@@ -77,12 +74,6 @@ public AnalysisLogger(string baseDirectory, string exceptionsDirectory)
7774 var assembly = Assembly . GetExecutingAssembly ( ) ;
7875 var assemblyType = assembly . GetType ( ) ;
7976 _defaultLogName = assembly . GetName ( ) . Name ;
80- // TODO: Remove IfDef
81- #if NETSTANDARD
82- Log4NetLogger = log4net . LogManager . GetLogger ( assemblyType ) ;
83- #else
84- Log4NetLogger = log4net . LogManager . GetLogger ( _defaultLogName ) ;
85- #endif
8677 }
8778
8879 /// <summary>
@@ -235,7 +226,7 @@ public virtual void WriteWarning(string format, params object[] args)
235226 #region Info methods
236227 public void Info ( string info )
237228 {
238- Log4NetLogger . Info ( info ) ;
229+ Console . WriteLine ( info ) ;
239230 }
240231
241232 public void Info < T > ( string info , IEnumerable < T > infoCollection )
@@ -268,19 +259,28 @@ public void Info<T>(string info, string infoFormat, IEnumerable<T> infoCollectio
268259
269260 private void Error ( string errorInfo )
270261 {
271- Log4NetLogger . Error ( errorInfo ) ;
262+ ConsoleColor previousColor = Console . ForegroundColor ;
263+ Console . ForegroundColor = ConsoleColor . Red ;
264+ Console . WriteLine ( errorInfo ) ;
265+ Console . ForegroundColor = previousColor ;
272266 }
273267
274268 public void DebugInfo ( string debugInfo )
275269 {
276- Log4NetLogger . Debug ( debugInfo ) ;
270+ ConsoleColor previousColor = Console . ForegroundColor ;
271+ Console . ForegroundColor = ConsoleColor . Gray ;
272+ Console . WriteLine ( debugInfo ) ;
273+ Console . ForegroundColor = previousColor ;
277274 }
278275
279276 private void Warning ( string warningInfo )
280277 {
281- Log4NetLogger . Warn ( warningInfo ) ;
278+ ConsoleColor previousColor = Console . ForegroundColor ;
279+ Console . ForegroundColor = ConsoleColor . Yellow ;
280+ Console . WriteLine ( warningInfo ) ;
281+ Console . ForegroundColor = previousColor ;
282282 }
283283
284284 #endregion
285285 }
286- }
286+ }
0 commit comments