Ejemplo n.º 1
0
 private LoggerData UpdateLogData(LoggerData logData, string memberName, string sourceFilePath, int callerLineNumber)
 {
     addMemberName(logData, memberName);
     addSourceFileName(logData, sourceFilePath);
     addCallerLineNumber(logData, callerLineNumber);
     return(logData);
 }
Ejemplo n.º 2
0
 public void Error(object message, LoggerData logData = null, Exception exception = null, [CallerMemberName] string memberName = "", [CallerFilePath] string sourceFilePath = "", [CallerLineNumber] int callerLineNumber = -1)
 {
     logData = UpdateLogData(logData, memberName, sourceFilePath, callerLineNumber);
     BuildLoggerData(logData);
     _Error(message, exception);
 }
Ejemplo n.º 3
0
        private void BuildLoggerData(LoggerData data)
        {
            var _data = data == null ? "(null)" : data.ToString();

            LogicalThreadContext.Properties[LOG_DATA] = _data;
        }
Ejemplo n.º 4
0
 private LoggerData addKeyValue(LoggerData logData, string key, object value)
 {
     logData = logData ?? new LoggerData();
     logData.Add(key, value);
     return(logData);
 }
Ejemplo n.º 5
0
 private LoggerData addCallerLineNumber(LoggerData logData, int callerLineNumber)
 {
     return(addKeyValue(logData, "CallerLineNumber", callerLineNumber));
 }
Ejemplo n.º 6
0
 private LoggerData addMemberName(LoggerData logData, string memberName)
 {
     return(addKeyValue(logData, "MemberName", memberName));
 }
Ejemplo n.º 7
0
 private LoggerData addSourceFileName(LoggerData logData, string sourceFile)
 {
     return(addKeyValue(logData, "SourceFile", sourceFile));
 }