Пример #1
0
 void IPhotonPeerListener.DebugReturn(DebugLevel debugLevel, string debug)
 {
     if (log.IsDebugEnabled)
     {
         // we do not use debugLevel here - just log whatever debug we have
         log.DebugFormat(debug);
     }
 }
Пример #2
0
 public void LogStringWithPrefix(string str, string prefix, DebugLevel debugLevel)
 {
     StreamWriter stream = StreamSelector (debugLevel);
     if (stream != null) {
         stream.WriteLine ("{0}{1}", prefix, str);
         stream.Flush ();
     }
 }
Пример #3
0
        private static void Log(DebugLevel priority, string tag, string msg)
        {
            var logger = AxolotlLoggerProvider.GetProvider();

              if (logger != null) {
            logger.Log(priority, tag, msg);
              }
        }
Пример #4
0
 public void LogStringWithTimeStamp(string str, DebugLevel debugLevel)
 {
     StreamWriter stream = StreamSelector (debugLevel);
     if (stream != null) {
         stream.WriteLine ("{0} : [{1}] {2}", TimeStamp(), debugLevel.ToString(), str);
         stream.Flush ();
     }
 }
Пример #5
0
        public static void ToFile(DebugLevel level, string message)
        {
            //Directory.CreateDirectory("Logs");
            //StreamWriter file = new StreamWriter(
            //    LOGFILE,
            //    File.Exists(LOGFILE));

            //file.WriteLine("[" + DateTime.Now.ToString() + "] " +
            //    level.ToString() + ": " + message + "\n");

            //file.Close();
        }
Пример #6
0
        /// <summary>
        /// Default Constructor for a <see cref = "SharpDX.Direct2D1.Factory" />.
        /// </summary>
        public Factory(FactoryType factoryType, DebugLevel debugLevel)
            : base(IntPtr.Zero)
        {
            FactoryOptions? options = null;

            if (debugLevel != DebugLevel.None)
                options = new FactoryOptions() { DebugLevel = debugLevel };

            IntPtr temp;
            D2D1.CreateFactory(factoryType, Utilities.GetGuidFromType(GetType()), options, out temp);
            FromTemp(temp);
        }
Пример #7
0
 private void Debug_DebugHandler(string arg1, DebugLevel arg2)
 {
     switch (arg2)
     {
         case DebugLevel.Info:
             UnityEngine.Debug.Log(arg1);
             break;
         case DebugLevel.Warning:
             UnityEngine.Debug.LogWarning(arg1);
             break;
         case DebugLevel.Error:
             UnityEngine.Debug.LogError(arg1);
             break;
     }
 }
Пример #8
0
 private static void Debug_DebugHandler(string arg1, DebugLevel arg2)
 {
     var consoleForegroundColorCashe = Console.ForegroundColor;
     switch (arg2)
     {
         case DebugLevel.Info:
             Console.ForegroundColor = ConsoleColor.White;
             break;
         case DebugLevel.Warning:
             Console.ForegroundColor = ConsoleColor.Yellow;
             break;
         case DebugLevel.Error:
             Console.ForegroundColor = ConsoleColor.Red;
             break;
     }
     Console.WriteLine(arg1);
     Console.ForegroundColor = consoleForegroundColorCashe;
 }
Пример #9
0
 public void DebugReturn(DebugLevel level, string message)
 {
     if (level == DebugLevel.ERROR)
     {
         Debug.LogError(message);
     }
     else if (level == DebugLevel.WARNING)
     {
         Debug.LogWarning(message);
     }
     else if (level == DebugLevel.INFO && PhotonNetwork.logLevel >= PhotonLogLevel.Informational)
     {
         Debug.Log(message);
     }
     else if (level == DebugLevel.ALL && PhotonNetwork.logLevel == PhotonLogLevel.Full)
     {
         Debug.Log(message);
     }
 }
Пример #10
0
        //string Prefix = ""
        //public static void Debug(string content, DebugLevel level = DebugLevel.Info,
        //    Output way = Output.Console, MenuItem DebugMenu = null)
        //{
        //    if (DebugMenu != null && !DebugMenu.GetValue<bool>()) return;
        //    if (way == Output.Console)
        //    {
        //        ConsoleColor color = ConsoleColor.White;
        //        if (level == DebugLevel.Info)
        //        {
        //            color = ConsoleColor.Green;
        //        }
        //        else if (level == DebugLevel.Warning)
        //        {
        //            color = ConsoleColor.Yellow;
        //        }
        //        else if (level == DebugLevel.Wrang)
        //        {
        //            color = ConsoleColor.Red;
        //        }
        //        Console.ForegroundColor = color;
        //        Console.WriteLine(content);
        //        Console.ForegroundColor = ConsoleColor.White;
        //    }
        //    else if(way == Output.ChatBox)
        //    {
        //        System.Drawing.Color color = System.Drawing.Color.White;
        //        if (level == DebugLevel.Info)
        //        {
        //            color = System.Drawing.ColorTranslator.FromHtml("#AAAAFF");
        //        }
        //        else if (level == DebugLevel.Warning)
        //        {
        //            color = System.Drawing.Color.Orange;
        //        }
        //        else if (level == DebugLevel.Wrang)
        //        {
        //            color = System.Drawing.Color.Red;
        //        }
        //        Game.PrintChat(content.ToHtml(color, FontStlye.Cite));
        //    }
        //}
        public static void Debug(string content, DebugLevel level = DebugLevel.Info,
			Output way = Output.Console, bool enable = true)
        {
            if (!enable) return;

            if (way == Output.Console)
            {
                ConsoleColor color = ConsoleColor.White;
                if (level == DebugLevel.Info)
                {
                    color = ConsoleColor.Green;
                }
                else if (level == DebugLevel.Warning)
                {
                    color = ConsoleColor.Yellow;
                }
                else if (level == DebugLevel.Wrang)
                {
                    color = ConsoleColor.Red;
                }
                Console.ForegroundColor = color;
                Console.WriteLine(content);
                Console.ForegroundColor = ConsoleColor.White;
            }
            else if (way == Output.ChatBox)
            {
                System.Drawing.Color color = System.Drawing.Color.White;
                if (level == DebugLevel.Info)
                {
                    color = System.Drawing.ColorTranslator.FromHtml("#AAAAFF");
                }
                else if (level == DebugLevel.Warning)
                {
                    color = System.Drawing.Color.Orange;
                }
                else if (level == DebugLevel.Wrang)
                {
                    color = System.Drawing.Color.Red;
                }

                Game.PrintChat(content.ToHtml(color, FontStlye.Cite));
            }
        }
Пример #11
0
        public static void Write(string Prefix, string content, DebugLevel level = DebugLevel.Info,
			WriteWay way = WriteWay.Console, bool enable = true)
        {
            if (!enable) return;

            if (way == WriteWay.Console)
            {
                ConsoleColor color = ConsoleColor.White;
                if (level == DebugLevel.Info)
                {
                    color = ConsoleColor.DarkGreen;
                }
                else if (level == DebugLevel.Warning)
                {
                    color = ConsoleColor.Yellow;
                }
                else if (level == DebugLevel.Wrang)
                {
                    color = ConsoleColor.Red;
                }
                Console.ForegroundColor = color;
                Console.WriteLine(!string.IsNullOrEmpty(Prefix) ? (Prefix + ":"+ content) : "" + content);
                Console.ForegroundColor = ConsoleColor.White;
            }
            else
            {
                System.Drawing.Color color = System.Drawing.Color.White;
                if (level == DebugLevel.Info)
                {
                    color = System.Drawing.ColorTranslator.FromHtml("#AAAAFF");
                }
                else if (level == DebugLevel.Warning)
                {
                    color = System.Drawing.Color.Orange;
                }
                else if (level == DebugLevel.Wrang)
                {
                    color = System.Drawing.Color.Red;
                }
                content = (string.IsNullOrEmpty(Prefix) ? (Prefix + ":") : "") + content;
                Game.PrintChat(content.ToHtml(color, FontStlye.Cite));
            }
        }
Пример #12
0
		public static void Debug(string content, DebugLevel level = DebugLevel.Info, Output way = Output.Console) {
			if (way == Output.Console)
			{
				ConsoleColor color = ConsoleColor.White;
				if (level == DebugLevel.Info)
				{
					color = ConsoleColor.Green;
				}
				else if (level == DebugLevel.Warning)
				{
					color = ConsoleColor.Yellow;
				}
				else if (level == DebugLevel.Wrang)
				{
					color = ConsoleColor.Red;
				}
				Console.ForegroundColor = color;
				Console.WriteLine("AS锤石:" + content);
				Console.ForegroundColor = ConsoleColor.White;
			}
			else if(Thresh.Config.Item("调试").GetValue<bool>())
			{
				System.Drawing.Color color = System.Drawing.Color.White;
				if (level == DebugLevel.Info)
				{
					color = System.Drawing.ColorTranslator.FromHtml("#AAAAFF");
				}
				else if (level == DebugLevel.Warning)
				{
					color = System.Drawing.Color.Orange;
				}
				else if (level == DebugLevel.Wrang)
				{
					color = System.Drawing.Color.Red;
				}
			}
		}
Пример #13
0
        public string DialVoice(string number, bool showNumber, int gammuRcSection, DebugLevel debugLevel)
        {
            if (number == null) throw new ArgumentNullException("number");


            
            try{
                
                //_sm.DialVoice(number);

                var con  = _sm.Contacts;
            }
            catch (GammuException ex)
            {
                throw new FaultException<GammuErrInfo> (new GammuErrInfo
                    {
                        ErrorCode = ex.ErrorCode,
                        Message = ex.Text
                    });
            }

            return string.Format("Dial number {0}With result ", number) ;

        }
Пример #14
0
 /// <summary>
 /// Default Constructor for a <see cref = "SharpDX.Direct2D1.Factory1" />.
 /// </summary>
 public Factory1(FactoryType factoryType, DebugLevel debugLevel)
     : base(factoryType, debugLevel)
 {
 }
Пример #15
0
 public void DebugReturn(DebugLevel level, string message)
 {
     Console.WriteLine(string.Format("{0}: {1}", level, message));
 }
Пример #16
0
 public void DebugReturn(DebugLevel level, string message)
 {
     Debug.Log(message);
 }
Пример #17
0
        /// <summary>
        ///   The debug return.
        /// </summary>
        /// <param name = "debugLevel">
        ///   The debug Level.
        /// </param>
        /// <param name = "debug">
        ///   The debug message.
        /// </param>
        public void DebugReturn(DebugLevel debugLevel, string debug)
        {
            switch (debugLevel)
            {
                case DebugLevel.ALL:
                    if (log.IsDebugEnabled)
                    {
                        log.Debug("DebugReturn: " + debug);
                    }

                    break;

                case DebugLevel.INFO:
                    log.Info("DebugReturn(INFO): " + debug);
                    break;

                case DebugLevel.WARNING:
                    log.Warn("DebugReturn(WARN): " + debug);
                    break;

                case DebugLevel.ERROR:
                    log.Error("DebugReturn(ERROR): " + debug);
                    break;
            }
        }
Пример #18
0
		static GlobalDebug()
		{
			GlobalDebug.debugLevel = GlobalConfig.DebugLevel;
		}
Пример #19
0
 public VoiceLogger(Object context, string tag, DebugLevel level = DebugLevel.ERROR)
 {
     this.context  = context;
     this.Tag      = tag;
     this.LogLevel = level;
 }
 public void DebugReturn(DebugLevel level, string message)
 {
     // log message to console
     Debug.Log(message);
 }
Пример #21
0
 public void DebugReturn(DebugLevel level, string message)
 {
 }
Пример #22
0
 public static void AddDebugLevel(DebugLevel level)
 {
     AddDebugLevel((int)level);
 }
Пример #23
0
 void IPhotonPeerListener.DebugReturn(DebugLevel level, string message)
 {
     this.listener.DebugReturn(level, message);
 }
Пример #24
0
 public void DebugReturn(DebugLevel level, string message)
 {
     Debug.LogError(message);
 }
Пример #25
0
    public override void OnInspectorGUI()
    {
        ServerSettings settings = (ServerSettings)target;

        Undo.RecordObject(settings, "Edit PhotonServerSettings");
        settings.HostType     = (ServerSettings.HostingOption)EditorGUILayout.EnumPopup("Hosting", settings.HostType);
        EditorGUI.indentLevel = 1;

        switch (settings.HostType)
        {
        case ServerSettings.HostingOption.BestRegion:
        case ServerSettings.HostingOption.PhotonCloud:
            // region selection
            if (settings.HostType == ServerSettings.HostingOption.PhotonCloud)
            {
                settings.PreferredRegion = (CloudRegionCode)EditorGUILayout.EnumPopup("Region", settings.PreferredRegion);
            }
            else
            {
                string _regionFeedback = "Prefs:" + ServerSettings.BestRegionCodeInPreferences.ToString();

                // the NameServer does not have a region itself. it's global (although it has regional instances)
                if (PhotonNetwork.connected && PhotonNetwork.Server != ServerConnection.NameServer)
                {
                    _regionFeedback = "Current:" + PhotonNetwork.CloudRegion + " " + _regionFeedback;
                }

                EditorGUILayout.BeginHorizontal();
                EditorGUILayout.PrefixLabel(" ");
                Rect rect        = GUILayoutUtility.GetRect(new GUIContent(_regionFeedback), "Label");
                int  indentLevel = EditorGUI.indentLevel;
                EditorGUI.indentLevel = 0;
                EditorGUI.LabelField(rect, _regionFeedback);
                EditorGUI.indentLevel = indentLevel;

                rect.x    += rect.width - 39;
                rect.width = 39;

                rect.height -= 2;
                if (GUI.Button(rect, "Reset", EditorStyles.miniButton))
                {
                    ServerSettings.ResetBestRegionCodeInPreferences();
                }
                EditorGUILayout.EndHorizontal();



                CloudRegionFlag valRegions = (CloudRegionFlag)EditorGUILayout.EnumMaskField("Enabled Regions", settings.EnabledRegions);

                if (valRegions != settings.EnabledRegions)
                {
                    settings.EnabledRegions = valRegions;
                    this.showMustHaveRegion = valRegions == 0;
                }
                if (this.showMustHaveRegion)
                {
                    EditorGUILayout.HelpBox("You should enable at least two regions for 'Best Region' hosting.", MessageType.Warning);
                }
            }

            // appid
            string valAppId = EditorGUILayout.TextField("AppId", settings.AppID);
            if (valAppId != settings.AppID)
            {
                settings.AppID = valAppId.Trim();
            }
            if (!ServerSettings.IsAppId(settings.AppID))
            {
                EditorGUILayout.HelpBox("PUN needs an AppId (GUID).\nFind it online in the Dashboard.", MessageType.Warning);
            }

            // protocol
            ConnectionProtocol valProtocol = settings.Protocol;
            valProtocol       = (ConnectionProtocol)EditorGUILayout.EnumPopup("Protocol", valProtocol);
            settings.Protocol = (ConnectionProtocol)valProtocol;
                #if UNITY_WEBGL
            EditorGUILayout.HelpBox("WebGL always use Secure WebSockets as protocol.\nThis setting gets ignored in current export.", MessageType.Warning);
                #endif
            break;

        case ServerSettings.HostingOption.SelfHosted:
            // address and port (depends on protocol below)
            bool hidePort = false;
            if (settings.Protocol == ConnectionProtocol.Udp && (settings.ServerPort == 4530 || settings.ServerPort == 0))
            {
                settings.ServerPort = 5055;
            }
            else if (settings.Protocol == ConnectionProtocol.Tcp && (settings.ServerPort == 5055 || settings.ServerPort == 0))
            {
                settings.ServerPort = 4530;
            }
                #if RHTTP
            if (settings.Protocol == ConnectionProtocol.RHttp)
            {
                settings.ServerPort = 0;
                hidePort            = true;
            }
                #endif
            settings.ServerAddress = EditorGUILayout.TextField("Server Address", settings.ServerAddress);
            settings.ServerAddress = settings.ServerAddress.Trim();
            if (!hidePort)
            {
                settings.ServerPort = EditorGUILayout.IntField("Server Port", settings.ServerPort);
            }
            // protocol
            valProtocol       = settings.Protocol;
            valProtocol       = (ConnectionProtocol)EditorGUILayout.EnumPopup("Protocol", valProtocol);
            settings.Protocol = (ConnectionProtocol)valProtocol;
                #if UNITY_WEBGL
            EditorGUILayout.HelpBox("WebGL always use Secure WebSockets as protocol.\nThis setting gets ignored in current export.", MessageType.Warning);
                #endif

            // appid
            settings.AppID = EditorGUILayout.TextField("AppId", settings.AppID);
            settings.AppID = settings.AppID.Trim();
            break;

        case ServerSettings.HostingOption.OfflineMode:
            EditorGUI.indentLevel = 0;
            EditorGUILayout.HelpBox("In 'Offline Mode', the client does not communicate with a server.\nAll settings are hidden currently.", MessageType.Info);
            break;

        case ServerSettings.HostingOption.NotSet:
            EditorGUI.indentLevel = 0;
            EditorGUILayout.HelpBox("Hosting is 'Not Set'.\nConnectUsingSettings() will not be able to connect.\nSelect another option or run the PUN Wizard.", MessageType.Info);
            break;

        default:
            DrawDefaultInspector();
            break;
        }

        if (PhotonEditor.CheckPunPlus())
        {
            settings.Protocol = ConnectionProtocol.Udp;
            EditorGUILayout.HelpBox("You seem to use PUN+.\nPUN+ only supports reliable UDP so the protocol is locked.", MessageType.Info);
        }



        // CHAT SETTINGS
        if (PhotonEditorUtils.HasChat)
        {
            GUILayout.Space(5);
            EditorGUI.indentLevel = 0;
            EditorGUILayout.LabelField("Photon Chat Settings");
            EditorGUI.indentLevel = 1;
            string valChatAppid = EditorGUILayout.TextField("Chat AppId", settings.ChatAppID);
            if (valChatAppid != settings.ChatAppID)
            {
                settings.ChatAppID = valChatAppid.Trim();
            }
            if (!ServerSettings.IsAppId(settings.ChatAppID))
            {
                EditorGUILayout.HelpBox("Photon Chat needs an AppId (GUID).\nFind it online in the Dashboard.", MessageType.Warning);
            }

            EditorGUI.indentLevel = 0;
        }



        // VOICE SETTINGS
        if (PhotonEditorUtils.HasVoice)
        {
            GUILayout.Space(5);
            EditorGUI.indentLevel = 0;
            EditorGUILayout.LabelField("Photon Voice Settings");
            EditorGUI.indentLevel = 1;
            switch (settings.HostType)
            {
            case ServerSettings.HostingOption.BestRegion:
            case ServerSettings.HostingOption.PhotonCloud:
                // voice appid
                string valVoiceAppId = EditorGUILayout.TextField("Voice AppId", settings.VoiceAppID);
                if (valVoiceAppId != settings.VoiceAppID)
                {
                    settings.VoiceAppID = valVoiceAppId.Trim();
                }
                if (!ServerSettings.IsAppId(settings.VoiceAppID))
                {
                    EditorGUILayout.HelpBox("Photon Voice needs an AppId (GUID).\nFind it online in the Dashboard.", MessageType.Warning);
                }
                break;

            case ServerSettings.HostingOption.SelfHosted:
                if (settings.VoiceServerPort == 0)
                {
                    settings.VoiceServerPort = 5055;
                }
                settings.VoiceServerPort = EditorGUILayout.IntField("Server Port UDP", settings.VoiceServerPort);
                break;

            case ServerSettings.HostingOption.OfflineMode:
            case ServerSettings.HostingOption.NotSet:
                break;
            }
            EditorGUI.indentLevel = 0;
        }



        // PUN Client Settings
        GUILayout.Space(5);
        EditorGUI.indentLevel = 0;
        EditorGUILayout.LabelField("Client Settings");
        EditorGUI.indentLevel = 1;
        //EditorGUILayout.LabelField("game version");
        settings.JoinLobby             = EditorGUILayout.Toggle("Auto-Join Lobby", settings.JoinLobby);
        settings.EnableLobbyStatistics = EditorGUILayout.Toggle("Enable Lobby Stats", settings.EnableLobbyStatistics);

        // Pun Logging Level
        PhotonLogLevel _PunLogging = (PhotonLogLevel)EditorGUILayout.EnumPopup("Pun Logging", settings.PunLogging);
        if (EditorApplication.isPlaying && PhotonNetwork.logLevel != _PunLogging)
        {
            PhotonNetwork.logLevel = _PunLogging;
        }
        settings.PunLogging = _PunLogging;

        // Network Logging Level
        DebugLevel _DebugLevel = (DebugLevel)EditorGUILayout.EnumPopup("Network Logging", settings.NetworkLogging);
        if (EditorApplication.isPlaying && settings.NetworkLogging != _DebugLevel)
        {
            settings.NetworkLogging = _DebugLevel;
        }
        settings.NetworkLogging = _DebugLevel;


        //EditorGUILayout.LabelField("automaticallySyncScene");
        //EditorGUILayout.LabelField("autoCleanUpPlayerObjects");
        //EditorGUILayout.LabelField("lobby stats");
        //EditorGUILayout.LabelField("sendrate / serialize rate");
        //EditorGUILayout.LabelField("quick resends");
        //EditorGUILayout.LabelField("max resends");
        //EditorGUILayout.LabelField("enable crc checking");


        // Application settings
        GUILayout.Space(5);
        EditorGUI.indentLevel = 0;
        EditorGUILayout.LabelField("Build Settings");
        EditorGUI.indentLevel = 1;

        settings.RunInBackground = EditorGUILayout.Toggle("Run In Background", settings.RunInBackground);


        // RPC-shortcut list
        GUILayout.Space(5);
        EditorGUI.indentLevel = 0;
        SerializedObject   sObj  = new SerializedObject(target);
        SerializedProperty sRpcs = sObj.FindProperty("RpcList");
        EditorGUILayout.PropertyField(sRpcs, true);
        sObj.ApplyModifiedProperties();

        GUILayout.BeginHorizontal();
        GUILayout.Space(20);
        if (GUILayout.Button("Refresh RPCs"))
        {
            PhotonEditor.UpdateRpcList();
            Repaint();
        }
        if (GUILayout.Button("Clear RPCs"))
        {
            PhotonEditor.ClearRpcList();
        }
        if (GUILayout.Button("Log HashCode"))
        {
            Debug.Log("RPC-List HashCode: " + RpcListHashCode() + ". Make sure clients that send each other RPCs have the same RPC-List.");
        }
        GUILayout.Space(20);
        GUILayout.EndHorizontal();


        //SerializedProperty sp = serializedObject.FindProperty("RpcList");
        //EditorGUILayout.PropertyField(sp, true);

        if (GUI.changed)
        {
            EditorUtility.SetDirty(target);     // even in Unity 5.3+ it's OK to SetDirty() for non-scene objects.
        }
    }
Пример #26
0
 public static void DebugWrite <T>(DebugLevel _d, T msg)
 {
     DebugWrite(_d, msg.ToString());
 }
Пример #27
0
 public ConsoleMessage(string message, DebugLevel level)
 {
     Message = message;
     ConsoleMessageDebugLevel = level;
 }
Пример #28
0
 public static DebugEchoPacket CreateDebugEchoPacket(string message, DebugLevel level)
 {
     return(new DebugEchoPacket(message, (byte)level, Color.White));
 }
Пример #29
0
 public static void RemoveDebugLevel(DebugLevel level)
 {
     RemoveDebugLevel((int)level);
 }
Пример #30
0
 public VoiceLogger(string tag, DebugLevel level = DebugLevel.ERROR)
 {
     this.Tag      = tag;
     this.LogLevel = level;
 }
Пример #31
0
 void IChatClientListener.DebugReturn(DebugLevel level, string message)
 {
 }
Пример #32
0
 public void DebugReturn(DebugLevel level, string message)
 {
     Console.WriteLine($"[{level.ToString()}] - {message}");
 }
Пример #33
0
 public override void DebugReturn(DebugLevel level, string message)
 {
     base.DebugReturn(level, message);
     Debug.Log(message);
 }
Пример #34
0
 public override void DebugReturn(DebugLevel level, string message)
 {
     base.DebugReturn(level, message);
     logger.Append(String.Format("{0}", message));
     logger.Flush();
 }
Пример #35
0
 public void DebugReturn(DebugLevel level, string message)
 {
     _controlledView.LogDebug(string.Format("{0} - {1}", level, message));
 }
Пример #36
0
 public void DebugReturn(DebugLevel level, string message)
 {
     // throw new NotImplementedException();
 }
Пример #37
0
 void IPhotonPeerListener.DebugReturn(DebugLevel level, string message)
 {
     this.listener.DebugReturn(level, message);
 }
Пример #38
0
 public static bool DebugLevelIsEnabled(DebugLevel level)
 {
     return(DebugLevelIsEnabled((int)level));
 }
Пример #39
0
 public override void DebugReturn(DebugLevel level, string message)
 {
     base.DebugReturn(level, message);
     Debug.Log(message);
 }
Пример #40
0
		public ConfigSettings(DebugLevel debugLevel, string debugLogFile)
		{
			this.debugLevel = debugLevel;
			this.debugLogFile = debugLogFile;
		}
Пример #41
0
 public static void LogErrorFormat(DebugLevel debugLevel, Object context, string format, params object[] args)
 {
     LogErrorFormat((int)debugLevel, context, format, args);
 }
Пример #42
0
 public void DebugReturn(DebugLevel level, string message)
 {
     if (!this.logConnectErrors && message.Contains("Connect() failed:"))
     {
         return;
     }
     switch (level)
     {
         case DebugLevel.ERROR:
             log.Error(message);
             break;
         case DebugLevel.WARNING:
             log.Warn(message);
             break;
         case DebugLevel.INFO:
             log.Info(message);
             break;
         default:
             log.Debug(message);
             break;
     }
 }
Пример #43
0
 public static void LogErrorFormat(DebugLevel debugLevel, string format, params object[] args)
 {
     LogErrorFormat((int)debugLevel, null, format, args);
 }
Пример #44
0
		public static void Inform (DebugLevel level, String info)
		{
			if (level <= debug) {
				Console.Error.WriteLine (info);
			}
		}
Пример #45
0
 /// <summary>
 /// This method is from the IPhotonPeerListener interface and called by the library with
 /// information during development.
 /// </summary>
 /// <remarks>Described in the client reference doc: Photon-DotNet-Client-Documentation_v6-1-0.pdf.</remarks>
 /// <param name="level"></param>
 /// <param name="message"></param>
 public void DebugReturn(DebugLevel level, string message)
 {
     this.DebugReturn(message);
 }
Пример #46
0
        /// <summary>
        ///   The debug return.
        /// </summary>
        /// <param name = "logLevel">
        ///   The log Level.
        /// </param>
        /// <param name = "message">
        ///   The message.
        /// </param>
        public void DebugReturn(DebugLevel logLevel, string message)
        {
            switch (logLevel)
            {
                case DebugLevel.ALL:
                    {
                        if (log.IsDebugEnabled)
                        {
                            log.Debug(message);
                        }

                        break;
                    }

                case DebugLevel.INFO:
                    {
                        if (log.IsInfoEnabled)
                        {
                            log.Info(message);
                        }

                        break;
                    }

                case DebugLevel.ERROR:
                    {
                        if (log.IsErrorEnabled)
                        {
                            log.Error(message);
                        }

                        break;
                    }

                case DebugLevel.WARNING:
                    {
                        if (log.IsWarnEnabled)
                        {
                            log.Warn(message);
                        }

                        break;
                    }
            }
        }
Пример #47
0
 public static void WriteChatBox(string content, DebugLevel level = DebugLevel.Info, bool enable = true)
 {
     Write(null, content, level, WriteWay.ChatBox, enable);
 }
 public void DebugReturn(DebugLevel level, string message)
 {
     this.externalListener.DebugReturn(level, message);
 }
Пример #49
0
 public void DebugReturn(DebugLevel level, string message)
 {
     //Debug.LogError("DebugReturn " + message);
 }
Пример #50
0
        public static void Write(string content, DebugLevel level = DebugLevel.Info,
			WriteWay way = WriteWay.Console, bool enable = true)
        {
            Write(null, content, level, way, enable);
        }
Пример #51
0
 public void DebugReturn(DebugLevel level, string message)
 {
     Console.WriteLine(message);
 }
Пример #52
0
 public static void WriteConsole(string Prefix, string content, DebugLevel level = DebugLevel.Info, bool enable = true)
 {
     Write(Prefix, content,level,WriteWay.Console,enable);
 }
Пример #53
0
 public void DebugReturn(DebugLevel level, string message)
 {
     // throw new NotImplementedException();
 }
Пример #54
0
 /// <summary>
 /// Set the level (if any) of debug logging.
 /// </summary>
 /// <remarks>Log messages will be passed to the callback registered in InitParams.LogOutput.</remarks>
 /// <param name="aLevel">Bit(s) specifying which debug levels to enable</param>
 public static void SetDebugLevel(DebugLevel aLevel)
 {
     OhNetDebugSetLevel((uint)aLevel);
 }
Пример #55
0
 public void EnqueueDebugReturn(DebugLevel debugLevel, string message)
 {
     this.peerBase.EnqueueDebugReturn(debugLevel, message);
 }