/// <summary> /// Factory to get logger /// </summary> /// <param name="loggerName">Name of logger that was either created earlier or needs to be created</param> /// <returns>AnalysisLogger</returns> private static AnalysisLogger GetLogger(string loggerName) { //TODO: Once logger is simplified throughout application, factory method can be enabled AnalysisLogger log; if (!string.IsNullOrEmpty(loggerName)) { if (!LogDictionary.TryGetValue(loggerName, out log)) { _defaultLogName = loggerName; log = new AnalysisLogger(Assembly.GetEntryAssembly().Location); LogDictionary.Add(loggerName, log); } } else { LogDictionary.TryGetValue(_defaultLogName, out log); } return(log); }
public ReportLogger(string fileName, string exceptionsFilename, AnalysisLogger parent) { _parent = parent; _outputFile = fileName; _exceptionsFilename = exceptionsFilename; }
public ReportLogger(string fileName, AnalysisLogger parent) : this(fileName, null, parent) { }