Beispiel #1
0
 internal static void Connected(Socket socket, object localEp, object remoteEp)
 {
     if (!s_log.IsEnabled())
     {
         return;
     }
     s_log.Connected(LoggingHash.GetObjectName(localEp), LoggingHash.GetObjectName(remoteEp), LoggingHash.HashInt(socket));
 }
Beispiel #2
0
 internal static void PrintError(ComponentType componentType, string msg)
 {
     if (msg == null)
     {
         return;
     }
     s_log.CriticalError(LoggingHash.GetObjectName(msg), "", "", 0, componentType);
 }
Beispiel #3
0
 internal static void PrintError(ComponentType componentType, object obj, string method, string msg)
 {
     s_log.CriticalError(LoggingHash.GetObjectName(msg),
                         LoggingHash.GetObjectName(method),
                         LoggingHash.GetObjectName(obj),
                         LoggingHash.HashInt(obj),
                         componentType);
 }
Beispiel #4
0
 internal static void UriBaseAddress(object obj, string baseAddress)
 {
     if (!s_log.IsEnabled())
     {
         return;
     }
     s_log.UriBaseAddress(baseAddress, LoggingHash.GetObjectName(obj), LoggingHash.HashInt(obj));
 }
Beispiel #5
0
 internal static void ContentNull(object obj)
 {
     if (!s_log.IsEnabled())
     {
         return;
     }
     s_log.ContentNull(LoggingHash.GetObjectName(obj), LoggingHash.HashInt(obj));
 }
Beispiel #6
0
 internal static void Exception(ComponentType componentType, object obj, string method, Exception e)
 {
     s_log.CriticalException(LoggingHash.GetObjectName(obj),
                             LoggingHash.GetObjectName(method),
                             LoggingHash.GetObjectName(e.Message),
                             LoggingHash.HashInt(obj),
                             LoggingHash.GetObjectName(e.StackTrace),
                             componentType);
 }
Beispiel #7
0
 internal static void Associate(object objA, object objB)
 {
     if (!s_log.IsEnabled())
     {
         return;
     }
     s_log.Associate(LoggingHash.GetObjectName(objA),
                     LoggingHash.HashInt(objA),
                     LoggingHash.GetObjectName(objB),
                     LoggingHash.HashInt(objB));
 }
Beispiel #8
0
        internal static void AcquireCredentialsHandle(string packageName, Interop.Secur32.CredentialUse intent, object authdata)
        {
            if (!s_log.IsEnabled())
            {
                return;
            }
            string arg1Str = "";

            if (packageName != null)
            {
                arg1Str = packageName;
            }
            s_log.AcquireCredentialsHandle(arg1Str, intent, LoggingHash.GetObjectName(authdata));
        }
Beispiel #9
0
        internal static void Enter(ComponentType componentType, object obj, string method, object paramObject)
        {
            if (!s_log.IsEnabled())
            {
                return;
            }

            string callerName;
            int    callerHash;
            string parametersName = "";
            int    parametersHash = 0;

            if (obj is string)
            {
                callerName = obj as string;
                callerHash = 0;
            }
            else
            {
                callerName = LoggingHash.GetObjectName(obj);
                callerHash = LoggingHash.HashInt(obj);
            }

            if (paramObject is string)
            {
                parametersName = paramObject as string;
                parametersHash = 0;
            }
            else if (paramObject != null)
            {
                parametersName = LoggingHash.GetObjectName(paramObject);
                parametersHash = LoggingHash.HashInt(paramObject);
            }

            s_log.FunctionStart(
                callerName,
                callerHash,
                LoggingHash.GetObjectName(method),
                parametersName,
                parametersHash,
                componentType);
        }
 internal void Associate(object a, object b)
 {
     WriteEvent(AssociateId, string.Format("Associating {0}#{1} with {2}#{3}", LoggingHash.GetObjectName(a), LoggingHash.HashString(a), LoggingHash.GetObjectName(b), LoggingHash.HashString(b)));
 }