Ejemplo n.º 1
0
        /// <summary>
        /// Factory
        /// </summary>
        public static SsmLogger GetInstance(
            string configurationDirectory,
            string ssmPortName)
        {
            Trace.WriteLine("SsmLogger.GetInstance");
            SsmLogger instance = new SsmLogger(
                configurationDirectory,
                ssmPortName);

            return(instance);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Private constructor - use factory instead
 /// </summary>
 private SsmRecordingLogger(
     ParameterDatabase database,
     string configurationDirectory,
     string portName,
     LogWriterFactory logWriterFactory)
 {
     this.logWriterFactory = logWriterFactory;
     this.database         = database;
     this.filter           = NeverLogFilter.GetInstance(this.logWriterFactory);
     this.logger           = SsmLogger.GetInstance(configurationDirectory, portName);
     this.logger.LogStart += this.Logger_LogStart;
     this.logger.LogEntry += this.Logger_LogEntry;
     this.logger.LogStop  += this.Logger_LogStop;
     this.logger.LogError += this.Logger_LogError;
 }