Exemplo n.º 1
0
 /// <summary>
 /// Removes an output mask from the list of applied output masks.
 /// </summary>
 /// <param name="outputMask">The output mask to remove.</param>
 public static void RemoveOutputMask(LoggingMask outputMask)
 {
     if (Logger.loggingMasks.Contains(outputMask))
     {
         Logger.loggingMasks.Remove(outputMask);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Adds a new output mask to the list of applied output masks.
 /// </summary>
 /// <param name="outputMask">The output mask to add.</param>
 public static void AddOutputMask(LoggingMask outputMask)
 {
     Logger.loggingMasks.Add(outputMask);
 }
Exemplo n.º 3
0
        /// <summary>
        /// Logs a message to output, filtering out sensitive text with a specific output mask.
        /// </summary>
        /// <param name="logLevel">The log level.</param>
        /// <param name="message">The log message.</param>
        /// <param name="innerMessage">The log inner message.</param>
        /// <param name="outputMask">The output masking filter.</param>
        public static void Log(LogLevel logLevel, String message, String innerMessage, LoggingMask outputMask)
        {
            message      = outputMask.ApplyFilter(message);
            innerMessage = outputMask.ApplyFilter(innerMessage);

            Logger.Log(logLevel, message, innerMessage);
        }