Ejemplo n.º 1
0
        public void Stop()
        {
            IServiceLogger logger = ServiceLogger.Current;

            logger.Write("Disposing _context ...", TraceEventType.Information);
            _context.Dispose();
            logger.Write("Disposed _context.", TraceEventType.Information);
            logger.Write("Service stopped.", TraceEventType.Stop);
        }
 public void Write(LogEntry logEntry)
 {
     _logger.Write(new ServiceLogEntry(logEntry.Message, logEntry.Severity));
 }
 public static void Write(this IServiceLogger serviceLogger, string message)
 {
     serviceLogger.Write(new ServiceLogEntry(message, TraceEventType.Information));
 }