コード例 #1
0
        /// <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);
        }
コード例 #2
0
 public ReportLogger(string fileName, string exceptionsFilename, AnalysisLogger parent)
 {
     _parent             = parent;
     _outputFile         = fileName;
     _exceptionsFilename = exceptionsFilename;
 }
コード例 #3
0
 public ReportLogger(string fileName, AnalysisLogger parent)
     : this(fileName, null, parent)
 {
 }