< Summary

Class:DCL.LogReport.LogReportKernelInterface
Assembly:LogReportPlugin
File(s):/tmp/workspace/explorer-desktop/unity-renderer-desktop/Assets/Scripts/MainScripts/DCL/Controllers/LogReport/LogReportKernelInterface.cs
Covered lines:0
Uncovered lines:15
Coverable lines:15
Total lines:45
Line coverage:0% (0 of 15)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
LogReportKernelInterface()0%2100%
ReportLog(...)0%42600%
ReportLog(...)0%2100%

File(s)

/tmp/workspace/explorer-desktop/unity-renderer-desktop/Assets/Scripts/MainScripts/DCL/Controllers/LogReport/LogReportKernelInterface.cs

#LineLine coverage
 1using DCL.Interface;
 2using UnityEngine;
 3
 4namespace DCL.LogReport
 5{
 6    public class LogReportKernelInterface
 7    {
 8        [System.Serializable]
 9        public class LogReportPayload
 10        {
 11            public string type;
 12            public string message;
 13        }
 14
 015        private static LogReportPayload logReportPayload = new LogReportPayload();
 16
 17        public static void ReportLog(LogType type, string message)
 18        {
 19            switch (type)
 20            {
 21                case LogType.Error:
 022                    ReportLog("error", message);
 023                    break;
 24                case LogType.Assert:
 025                    ReportLog("warning", message);
 026                    break;
 27                case LogType.Exception:
 028                    ReportLog("error", message);
 029                    break;
 30                case LogType.Warning:
 031                    ReportLog("warning", message);
 032                    break;
 33                default:
 034                    ReportLog("log", message);
 35                    break;
 36            }
 037        }
 38        public static void ReportLog(string type, string message)
 39        {
 040            logReportPayload.type = type;
 041            logReportPayload.message = message;
 042            WebInterface.SendMessage("ReportLog", logReportPayload);
 043        }
 44    }
 45}