void editLogging()
    {
        SlimNet.LogLevel level = ccfg.LogLevel;

        EditorGUILayout.BeginHorizontal();

        EditorGUILayout.BeginVertical();
        editLoggingFlag(ref level, SlimNet.LogLevel.Trace);
        editLoggingFlag(ref level, SlimNet.LogLevel.Info);
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.BeginVertical();
        editLoggingFlag(ref level, SlimNet.LogLevel.Debug);
        editLoggingFlag(ref level, SlimNet.LogLevel.Warn);
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.BeginVertical();
        editLoggingFlag(ref level, SlimNet.LogLevel.Error);
        editLoggingFlag(ref level, SlimNet.LogLevel.All);
        EditorGUILayout.EndHorizontal();

        EditorGUILayout.EndHorizontal();

        ccfg.LogLevel = level;
        scfg.LogLevel = level;
    }
    void editLoggingFlag(ref SlimNet.LogLevel level, SlimNet.LogLevel flag)
    {
        string name = flag.ToString();

        if ((level & flag) == flag)
        {
            if (!GUILayout.Toggle(true, name))
            {
                level ^= flag;
            }
        }
        else
        {
            if (GUILayout.Toggle(false, name))
            {
                level |= flag;
            }
        }
    }