tableau icon indicating copy to clipboard operation
tableau copied to clipboard

XML: duplicated field from last node

Open huieric opened this issue 2 years ago • 0 comments

<?xml version="1.0" encoding="UTF-8"?>
<!--
<@TABLEAU>
    <Item Sheet="ProcConf" Template="true"/>
</@TABLEAU>

<ProcConf>
    <World ID="uint32" Platform="[]<string>" />
    <mesh_tcp_listen_port>int32</mesh_tcp_listen_port>
    <mesh_polaris_udp_name>string</mesh_polaris_udp_name>
    <mesh_polaris_tcp_name>string</mesh_polaris_tcp_name>
    <mesh_ploaris_namespace>string</mesh_ploaris_namespace>    
    <ServerIP>string</ServerIP>
    <GIDInitSeq>int32</GIDInitSeq>
    <Tconnd Addr="[]<string>" />
    <UDP Port="int32" />
    <dns_server_ip>string</dns_server_ip>
    <dns_udp_port>int32</dns_udp_port>
    <cmd_http_listen_port>int32</cmd_http_listen_port>
    <TCPPort>int32</TCPPort>
    
    <Log>
        <OutputType>int32</OutputType>
        <BaseLogPath>string</BaseLogPath>
        <BaseLogPriority>[]<enum<.LogPriority>></BaseLogPriority>
        <BaseLogFileCfg>
            <ShiftType>{.LogFileCfg}int32</ShiftType>
            <MaxFileSize>int32</MaxFileSize>
            <MaxFileNum>int32</MaxFileNum>
        </BaseLogFileCfg>
        <Msg QueueType="[Msg]int32" CatType="int32" Open="bool" BufferedLen="int32" OutputPlayerLog="bool" OutputMain="bool" UseRealTime="bool">
            <Name>
                <Path>string</Path>
                <BaseName>string</BaseName>
            </Name>
            <LogFileCfg>
                <ShiftType>{.LogFileCfg}int32</ShiftType>
                <MaxFileSize>int32</MaxFileSize>
                <MaxFileNum>int32</MaxFileNum>
            </LogFileCfg>
            <LogPriority>[]<enum<.LogPriority>></LogPriority>
            <Whitelist>
                <ID>[]uint64</ID>
            </Whitelist>
        </Msg>
    </Log>
</ProcConf>
-->

<ProcConf>
    <World ID="1" Platform="AQQ,IQQ,AWX,IWX" />    
    <mesh_tcp_listen_port>18182</mesh_tcp_listen_port>
    <mesh_polaris_udp_name>Test-MeshUdp</mesh_polaris_udp_name>
    <mesh_polaris_tcp_name>Test-MeshTcp</mesh_polaris_tcp_name>
    <mesh_ploaris_namespace>Test</mesh_ploaris_namespace>
    <ServerIP>9.134.54.48</ServerIP>
    <GIDInitSeq>9</GIDInitSeq>
    <Tconnd Addr="1.0.15.1" />
    <UDP Port="12869" />
    <dns_server_ip></dns_server_ip>
    <TCPPort>0</TCPPort>
    
<dns_udp_port>18083</dns_udp_port>
    
<cmd_http_listen_port>28081</cmd_http_listen_port>
    
    <Log>
        <OutputType>0</OutputType>
        <BaseLogPath>/data/home/user00/log/gamesvr_1.0.13.1</BaseLogPath>
        <!--默认的日志优先级-->
        <BaseLogPriority>DEBUG,INFO,SYSTEM,WARN,ERROR,FATAL</BaseLogPriority>
        <!--默认的文件格式描述-->
        <BaseLogFileCfg>
            <!-- 0 按文件大小偏移, 1按小时偏移, 2按天偏移-->
            <ShiftType>1</ShiftType>
            <MaxFileSize>102400000</MaxFileSize>
            <MaxFileNum>168</MaxFileNum>
        </BaseLogFileCfg>
        <!--QueueType  管道类型:0:主线程Ctrl, 1:Cfg线程,2:Handle -->
        <!--CatType    日志类型:0:主日志,   2,Player日志, 3,Room日志, 4: pb日志 5:Error日志-->
        <!--BufferedLen   需要使用buff时配置此值-->
        <Msg QueueType="0" CatType="0" Open="1" BufferedLen="8196" OutputPlayerLog="0">
            <Name>
                <!--文件基础名称-->
                <BaseName>svr</BaseName>
            </Name>
        </Msg>
        <Msg QueueType="0" CatType="4" Open="1" BufferedLen="8196" OutputPlayerLog="0" >
            <Name>
                <!--文件基础名称-->
                <Path>pb</Path>
                <BaseName>pb</BaseName>
            </Name>
        </Msg>
        <Msg QueueType="0" CatType="5" Open="1" BufferedLen="8196" OutputPlayerLog="0" OutputMain="1" >
            <Name>
                <!--文件基础名称-->
                <BaseName>svr_err</BaseName>
            </Name>
            <LogFileCfg>
                <!-- 0 按文件大小偏移-->
                <ShiftType>0</ShiftType>
                <MaxFileSize>102400000</MaxFileSize>
                <MaxFileNum>168</MaxFileNum>
            </LogFileCfg>
        </Msg>
        <Msg QueueType="1" CatType="0" Open="1" BufferedLen="0">
            <Name>
                <!--文件基础名称-->
                <Path>cfg</Path>
                <BaseName>cfg</BaseName>
            </Name>
            <LogPriority>INFO,SYSTEM,WARN,ERROR,FATAL</LogPriority>
        </Msg>
        <Msg QueueType="0" CatType="2" Open="1"  BufferedLen="0">
            <!--相对路径:相对于$Home/log/appname.进程号 -->
            <Name>
                <!--目录名称 不配默认在$Home/log/Appname.进程号/ 路径下-->
                <Path>player</Path>
                <!--文件基础名称-->
                <BaseName>player</BaseName>
            </Name>
            <Whitelist>
                <ID>11111</ID>
            </Whitelist>
        </Msg>
    </Log>
</ProcConf>

Generated json is like this:

{
    "meshTcpListenPort":  18182,
    "meshPolarisUdpName":  "Test-MeshUdp",
    "meshPolarisTcpName":  "Test-MeshTcp",
    "meshPloarisNamespace":  "Test",
    "serverIp":  "9.134.54.48",
    "gidInitSeq":  9,
    "dnsServerIp":  "",
    "dnsUdpPort":  18083,
    "cmdHttpListenPort":  28081,
    "tcpPort":  0,
    "world":  {
        "id":  1,
        "platformList":  [
            "AQQ",
            "IQQ",
            "AWX",
            "IWX"
        ]
    },
    "tconnd":  {
        "addrList":  [
            "1.0.15.1"
        ]
    },
    "udp":  {
        "port":  12869
    },
    "log":  {
        "outputType":  0,
        "baseLogPath":  "/data/home/user00/log/gamesvr_1.0.13.1",
        "baseLogPriorityList":  [
            "LOG_PRIORITY_DEBUG",
            "LOG_PRIORITY_INFO",
            "LOG_PRIORITY_SYSTEM",
            "LOG_PRIORITY_WARN",
            "LOG_PRIORITY_ERROR",
            "LOG_PRIORITY_FATAL"
        ],
        "baseLogFileCfg":  {
            "shiftType":  1,
            "maxFileSize":  102400000,
            "maxFileNum":  168
        },
        "msgList":  [
            {
                "queueType":  0,
                "catType":  0,
                "open":  true,
                "bufferedLen":  8196,
                "outputPlayerLog":  false,
                "outputMain":  false,
                "useRealTime":  false,
                "logPriorityList":  [],
                "name":  {
                    "path":  "",
                    "baseName":  "svr"
                },
                "logFileCfg":  null,
                "whitelist":  null
            },
            {
                "queueType":  0,
                "catType":  4,
                "open":  true,
                "bufferedLen":  8196,
                "outputPlayerLog":  false,
                "outputMain":  false,
                "useRealTime":  false,
                "logPriorityList":  [],
                "name":  {
                    "path":  "pb",
                    "baseName":  "pb"
                },
                "logFileCfg":  null,
                "whitelist":  null
            },
            {
                "queueType":  1,
                "catType":  0,
                "open":  true,
                "bufferedLen":  0,
                "outputPlayerLog":  false,
                "outputMain":  false,
                "useRealTime":  false,
                "logPriorityList":  [
                    "LOG_PRIORITY_INFO",
                    "LOG_PRIORITY_SYSTEM",
                    "LOG_PRIORITY_WARN",
                    "LOG_PRIORITY_ERROR",
                    "LOG_PRIORITY_FATAL"
                ],
                "name":  {
                    "path":  "cfg",
                    "baseName":  "cfg"
                },
                "logFileCfg":  null,
                "whitelist":  null
            },
            {
                "queueType":  0,
                "catType":  2,
                "open":  true,
                "bufferedLen":  0,
                "outputPlayerLog":  false,
                "outputMain":  false,
                "useRealTime":  false,
                "logPriorityList":  [
                    "LOG_PRIORITY_INFO",
                    "LOG_PRIORITY_SYSTEM",
                    "LOG_PRIORITY_WARN",
                    "LOG_PRIORITY_ERROR",
                    "LOG_PRIORITY_FATAL"
                ],
                "name":  {
                    "path":  "player",
                    "baseName":  "player"
                },
                "logFileCfg":  null,
                "whitelist":  {
                    "idList":  [
                        "11111"
                    ]
                }
            },
            {
                "queueType":  0,
                "catType":  5,
                "open":  true,
                "bufferedLen":  8196,
                "outputPlayerLog":  false,
                "outputMain":  true,
                "useRealTime":  false,
                "logPriorityList":  [
                    "LOG_PRIORITY_INFO",
                    "LOG_PRIORITY_SYSTEM",
                    "LOG_PRIORITY_WARN",
                    "LOG_PRIORITY_ERROR",
                    "LOG_PRIORITY_FATAL"
                ],
                "name":  {
                    "path":  "",
                    "baseName":  "svr_err"
                },
                "logFileCfg":  {
                    "shiftType":  0,
                    "maxFileSize":  102400000,
                    "maxFileNum":  168
                },
                "whitelist":  {
                    "idList":  [
                        "11111"
                    ]
                }
            }
        ]
    }
}

huieric avatar Feb 26 '23 17:02 huieric