public void OnPreprocessBuild(UnityEditor.Build.Reporting.BuildReport report) { var currentIPs = Tool.GetLocalIPAddress(); foreach (var c in ObjectTool.FindAllObject <LogConfigure>()) { if (c.D.remoteLogPC.Find(pc => currentIPs.Contains(pc.ipAddress)) != null) { continue; } var port = new PCInfo.Port() { name = "remoteLog", port = c.D.remoteLogPort }; foreach (var pc in currentIPs) { c.D.remoteLogPC.Add(new PCInfo() { name = SystemInfo.deviceName, ipAddress = pc, ports = new List <PCInfo.Port>() { port }, role = PCInfo.Role.Development }); LogTool.Log("Add dev pc into log configure " + pc.ToString(), LogLevel.Verbose, LogChannel.Debug); } c.Save(); } }
public void SetupChannel() { if (this.D.level == LogLevel.None) { LogTool.Log("No log level found, set to Everything by default", LogLevel.Warning); this.D.level = LogLevel.Everything; } this.UpdateLog(); }
public static void SetupNetwork(List <PCInfo> pcs, short port) { foreach (var pc in pcs) { var socket = SocketData.Make(pc.ipAddress, port); if (Tool.IsReachable(socket.endPoint)) { servers.Add(socket); LogTool.Log("Send log to " + socket.endPoint.ToString(), LogLevel.Verbose, LogChannel.Network | LogChannel.Debug); } } }
public static void SetupNetwork(LogConfigure.LogPC logPC) { server = SocketData.Make(logPC.ipAddress, logPC.logPort); LogTool.Log("Send log to " + server.endPoint.ToString(), LogLevel.Verbose, LogChannel.Network | LogChannel.Debug); }