Example #1
0
 internal static void TraceSlicing(string kind, string typeId, string slicingCat, Ice.ILogger logger)
 {
     lock (_mutex)
     {
         if (_slicingIds.Add(typeId))
         {
             using var s = new System.IO.StringWriter(CultureInfo.CurrentCulture);
             s.Write("unknown " + kind + " type `" + typeId + "'");
             logger.Trace(slicingCat, s.ToString());
         }
     }
 }
Example #2
0
        internal static void TraceRecv(Ice.InputStream str, Ice.ILogger logger, TraceLevels tl)
        {
            if (tl.Protocol >= 1)
            {
                int p = str.Pos;
                str.Pos = 0;

                using (var s = new System.IO.StringWriter(CultureInfo.CurrentCulture))
                {
                    byte type = PrintMessage(s, str);

                    logger.Trace(tl.ProtocolCat, "received " + GetMessageTypeAsString(type) + " " + s.ToString());
                }
                str.Pos = p;
            }
        }
Example #3
0
        internal static void Trace(string heading, Ice.InputStream str, Ice.ILogger logger, TraceLevels tl)
        {
            if (tl.Protocol >= 1)
            {
                int p = str.Pos;
                str.Pos = 0;

                using (var s = new System.IO.StringWriter(CultureInfo.CurrentCulture))
                {
                    s.Write(heading);
                    PrintMessage(s, str);

                    logger.Trace(tl.ProtocolCat, s.ToString());
                }
                str.Pos = p;
            }
        }
Example #4
0
        internal static void TraceSend(Ice.OutputStream str, Ice.ILogger logger, TraceLevels tl)
        {
            if (tl.Protocol >= 1)
            {
                int p   = str.Pos;
                var iss = new Ice.InputStream(str.Communicator, str.Encoding, str.GetBuffer(), false);
                iss.Pos = 0;

                using (var s = new System.IO.StringWriter(CultureInfo.CurrentCulture))
                {
                    byte type = PrintMessage(s, iss);

                    logger.Trace(tl.ProtocolCat, "sending " + GetMessageTypeAsString(type) + " " + s.ToString());
                }
                str.Pos = p;
            }
        }
Example #5
0
        internal static void Trace(string heading, Ice.OutputStream str, Ice.ILogger logger, TraceLevels tl)
        {
            if (tl.protocol >= 1)
            {
                int p   = str.Pos;
                var iss = new Ice.InputStream(str.Communicator, str.Encoding, str.GetBuffer(), false);
                iss.Pos = 0;

                using (var s = new System.IO.StringWriter(CultureInfo.CurrentCulture))
                {
                    s.Write(heading);
                    PrintMessage(s, iss);

                    logger.Trace(tl.protocolCat, s.ToString());
                }
                str.Pos = p;
            }
        }