少年修仙传客户端代码仓库
client_linchunjie
2018-08-14 c6689f941359227f0b99b20b9400ccbab81b671c
System/Debug/DebugUtility.cs
@@ -26,7 +26,6 @@
        }
    }
    public int debugBranch = -1;
    public void Init()
@@ -49,6 +48,21 @@
                    debugBranch = json.branch;
                }
            }
        }
        if (debugAccount)
        {
            DebugEx.EnableLog = LocalSave.GetBool("DesignEnableLog", false);
            DebugEx.EnableLogWarning = LocalSave.GetBool("DesignEnableLogWarning", false);
            DebugEx.EnableLogError = LocalSave.GetBool("DesignEnableLogError", false);
            DebugEx.EnableNetLog = false;
        }
        else
        {
            DebugEx.EnableLog = false;
            DebugEx.EnableLogWarning = false;
            DebugEx.EnableLogError = false;
            DebugEx.EnableNetLog = false;
        }
    }
@@ -80,6 +94,29 @@
            var debugAuthority = JsonMapper.ToObject<DebugAuthority>(_result);
            debugAccount = debugAuthority.dbg == 1;
        }
    }
    public static void SetLogAble(bool _able)
    {
        LocalSave.SetBool("DesignEnableLog", _able);
        DebugEx.EnableLog = _able;
    }
    public static void SetLogWarningAble(bool _able)
    {
        LocalSave.SetBool("DesignEnableLogWarning", _able);
        DebugEx.EnableLogWarning = _able;
    }
    public static void SetLogErrorAble(bool _able)
    {
        LocalSave.SetBool("DesignEnableLogError", _able);
        DebugEx.EnableLogError = _able;
    }
    public static void SetLogNetAble(bool _able)
    {
        DebugEx.EnableNetLog = _able;
    }
    struct DebugAuthority