Exemple #1
0
 /// <summary>
 /// check if a filter is enabled
 /// </summary>
 /// <param name="logger">target logger</param>
 /// <param name="caller">caller object</param>
 /// <param name="callerTypeName">caller type name</param>
 /// <param name="callerMemberName">caller member name</param>
 /// <param name="logType">log entry type</param>
 /// <param name="logCategory">log entry category</param>
 /// <param name="callerLineNumber"></param>
 /// <param name="callerFilePath"></param>
 /// <returns>an invoker object to the log, else null</returns>
 public ILogInvoker CheckFilter(
     ILog logger,
     object caller,
     string callerTypeName,
     string callerMemberName,
     LogType logType,
     LogCategory logCategory,
     int callerLineNumber,
     string callerFilePath
     )
 {
     return
         ((FilterValues.GetValue(
               caller,
               callerTypeName,
               callerMemberName,
               logType,
               logCategory
               )) ?
          GetLogInvoker(
              logger,
              caller,
              callerMemberName,
              logType,
              logCategory,
              callerLineNumber,
              callerFilePath
              )
              :
          null);
 }
Exemple #2
0
 /// <summary>
 /// get a dispatcher according to dispatching properties and rules. return a dispatcher pipe if founded, null else
 /// </summary>
 /// <param name="caller">caller object</param>
 /// <param name="callerTypeName">caller type name</param>
 /// <param name="callerMemberName">caller member name</param>
 /// <param name="logType">log entry type</param>
 /// <param name="logCategory">log entry category</param>
 /// <returns>a logger or null</returns>
 public Dispatcher GetDispatcher(
     object caller,
     string callerTypeName,
     string callerMemberName,
     LogType logType,
     LogCategory logCategory
     )
 {
     return
         (FilterValues.GetValue(
              caller,
              callerTypeName,
              callerMemberName,
              logType,
              logCategory
              ));
 }