示例#1
0
        public void CustomTracePropertyTest(CustomTrace customTrace)
        {
            UnityEngine.Debug.Log("CustomTracePropertyTest start");

            customTrace.putProperty("ProcessingResult", "Success");
            customTrace.putProperty("Status", "Normal");
            string prop = customTrace.getProperty("ProcessingResult");

            Debug.Log("get prop name: ProcessingResult, value: " + prop);

            customTrace.putProperty("Time", "2020-02-02");
            customTrace.removeProperty("Time");

            Map propertiesMap = customTrace.getTraceProperties();

            if (propertiesMap != null)
            {
                UnityEngine.Debug.Log("getTraceProperties, map size: " + propertiesMap.keySet().toArray().Length);
            }
            else
            {
                UnityEngine.Debug.Log("getTraceProperties fail");
            }

            UnityEngine.Debug.Log("CustomTracePropertyTest success");
        }