mirror of
https://github.com/jwetzell/QControlKit.git
synced 2026-07-26 10:38:54 +00:00
cleanup logging
This commit is contained in:
@@ -38,7 +38,6 @@ namespace QControlKit
|
|||||||
_log.Debug($"found host {zeroconfHost.IPAddress}:{zeroconfHost.DisplayName}");
|
_log.Debug($"found host {zeroconfHost.IPAddress}:{zeroconfHost.DisplayName}");
|
||||||
foreach (var service in zeroconfHost.Services)
|
foreach (var service in zeroconfHost.Services)
|
||||||
{
|
{
|
||||||
_log.Debug($"found {service.Key}:{service.Value}");
|
|
||||||
if (service.Key.Equals(QBonjour.TCPService))
|
if (service.Key.Equals(QBonjour.TCPService))
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
+4
-10
@@ -62,7 +62,6 @@ namespace QControlKit
|
|||||||
public void sendMessage(string address, params object[] args)
|
public void sendMessage(string address, params object[] args)
|
||||||
{
|
{
|
||||||
tcpClient.Send(new OscMessage(address, args));
|
tcpClient.Send(new OscMessage(address, args));
|
||||||
_log.Debug($"send message {address} : {args}");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ProcessMessage(object source, MessageEventArgs args)
|
private void ProcessMessage(object source, MessageEventArgs args)
|
||||||
@@ -70,9 +69,6 @@ namespace QControlKit
|
|||||||
|
|
||||||
QMessage message = new QMessage(args.Message);
|
QMessage message = new QMessage(args.Message);
|
||||||
|
|
||||||
Log.Verbose(message.ToString());
|
|
||||||
|
|
||||||
|
|
||||||
if (message.IsReply)
|
if (message.IsReply)
|
||||||
{
|
{
|
||||||
JToken data = message.data;
|
JToken data = message.data;
|
||||||
@@ -115,8 +111,6 @@ namespace QControlKit
|
|||||||
}
|
}
|
||||||
else if (message.IsConnect)
|
else if (message.IsConnect)
|
||||||
{
|
{
|
||||||
_log.Verbose(message.data.ToString());
|
|
||||||
_log.Verbose("Status:" + message.status.ToString());
|
|
||||||
if (message.status.ToString().Equals("ok"))
|
if (message.status.ToString().Equals("ok"))
|
||||||
OnWorkspaceConnected(message.status.ToString(),message.data.ToString());
|
OnWorkspaceConnected(message.status.ToString(),message.data.ToString());
|
||||||
else
|
else
|
||||||
@@ -189,7 +183,7 @@ namespace QControlKit
|
|||||||
|
|
||||||
protected virtual void OnCueListsUpdated(JToken response)
|
protected virtual void OnCueListsUpdated(JToken response)
|
||||||
{
|
{
|
||||||
_log.Debug($"Cue Lists Updated");
|
_log.Debug("Cue Lists Updated");
|
||||||
CueListsUpdated?.Invoke(this, new QCueListsUpdatedArgs { data = response });
|
CueListsUpdated?.Invoke(this, new QCueListsUpdatedArgs { data = response });
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -213,19 +207,19 @@ namespace QControlKit
|
|||||||
|
|
||||||
protected virtual void OnWorkspaceLightDashboardUpdated()
|
protected virtual void OnWorkspaceLightDashboardUpdated()
|
||||||
{
|
{
|
||||||
_log.Debug($"Workspace Light Dashboard Updated");
|
_log.Debug("Workspace Light Dashboard Updated");
|
||||||
WorkspaceLightDashboardUpdated?.Invoke(this, new QWorkspaceLightDashboardUpdatedArgs());
|
WorkspaceLightDashboardUpdated?.Invoke(this, new QWorkspaceLightDashboardUpdatedArgs());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void OnQLabPreferencesUpdated(string key)
|
protected virtual void OnQLabPreferencesUpdated(string key)
|
||||||
{
|
{
|
||||||
_log.Debug($"QLab Preferences Updated");
|
_log.Debug("QLab Preferences Updated");
|
||||||
QLabPreferencesUpdated?.Invoke(this, new QQLabPreferencesUpdatedArgs { key = key });
|
QLabPreferencesUpdated?.Invoke(this, new QQLabPreferencesUpdatedArgs { key = key });
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void OnWorkspaceDisconnected()
|
protected virtual void OnWorkspaceDisconnected()
|
||||||
{
|
{
|
||||||
_log.Debug($"Workspace Disconnected");
|
_log.Debug("Workspace Disconnected");
|
||||||
WorkspaceDisconnected?.Invoke(this, new QWorkspaceDisconnectedArgs());
|
WorkspaceDisconnected?.Invoke(this, new QWorkspaceDisconnectedArgs());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<Authors>Joel Wetzell</Authors>
|
<Authors>Joel Wetzell</Authors>
|
||||||
<Version>1.0.0-devel</Version>
|
<Version>1.0.0-devel</Version>
|
||||||
<PackOnBuild>true</PackOnBuild>
|
<PackOnBuild>true</PackOnBuild>
|
||||||
<PackageVersion>0.0.32</PackageVersion>
|
<PackageVersion>0.0.33</PackageVersion>
|
||||||
<PackageId>QControlKit</PackageId>
|
<PackageId>QControlKit</PackageId>
|
||||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||||
<Summary>Unofficial C# port of Figure53's QLabKit.objc</Summary>
|
<Summary>Unofficial C# port of Figure53's QLabKit.objc</Summary>
|
||||||
|
|||||||
+1
-7
@@ -163,7 +163,6 @@ namespace QControlKit
|
|||||||
|
|
||||||
QCue cue = childCuesUIDMap[aUid];
|
QCue cue = childCuesUIDMap[aUid];
|
||||||
|
|
||||||
//_log.Debug($"Removing Child Cue From {listName} : {cue.uid} + {cue.listName}");
|
|
||||||
childCues.Remove(cue);
|
childCues.Remove(cue);
|
||||||
childCuesUIDMap.Remove(aUid);
|
childCuesUIDMap.Remove(aUid);
|
||||||
}
|
}
|
||||||
@@ -640,8 +639,6 @@ namespace QControlKit
|
|||||||
{
|
{
|
||||||
bool cueUpdated = false;
|
bool cueUpdated = false;
|
||||||
|
|
||||||
_log.Verbose($"updatePropertiesWithDictionary() Called for cue");
|
|
||||||
|
|
||||||
//TODO: pretty sure this is done
|
//TODO: pretty sure this is done
|
||||||
JObject dictObj = (JObject)dict;
|
JObject dictObj = (JObject)dict;
|
||||||
List<string> propertiesUpdated = new List<string>();
|
List<string> propertiesUpdated = new List<string>();
|
||||||
@@ -650,14 +647,12 @@ namespace QControlKit
|
|||||||
JToken value = obj.Value;
|
JToken value = obj.Value;
|
||||||
if (obj.Key.Equals(QOSCKey.Cues))
|
if (obj.Key.Equals(QOSCKey.Cues))
|
||||||
{
|
{
|
||||||
//_log.Debug($"Cues OSC Key found in update message...updating child cues");
|
|
||||||
if (value.Type != JTokenType.Array)
|
if (value.Type != JTokenType.Array)
|
||||||
continue;
|
continue;
|
||||||
updateChildCuesWithPropertiesArray(value, false);
|
updateChildCuesWithPropertiesArray(value, false);
|
||||||
}
|
}
|
||||||
else if(obj.Key.Equals(QOSCKey.Children) && IsGroup)
|
else if(obj.Key.Equals(QOSCKey.Children) && IsGroup)
|
||||||
{
|
{
|
||||||
//_log.Debug($"Children OSC Key found in update message for {uid} ...updating child and removing deleted ones.");
|
|
||||||
if (value.Type != JTokenType.Array)
|
if (value.Type != JTokenType.Array)
|
||||||
continue;
|
continue;
|
||||||
updateChildCuesWithPropertiesArray(value, true);
|
updateChildCuesWithPropertiesArray(value, true);
|
||||||
@@ -671,7 +666,6 @@ namespace QControlKit
|
|||||||
{
|
{
|
||||||
cueUpdated = true;
|
cueUpdated = true;
|
||||||
propertiesUpdated.Add(obj.Key);
|
propertiesUpdated.Add(obj.Key);
|
||||||
//_log.Debug($"cue property {obj.Key} updated with {obj.Value}");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1005,7 +999,7 @@ namespace QControlKit
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_log.Verbose($"parent cue with id: {parentID} can't be found this could be a problem");
|
_log.Error($"parent cue with id: {parentID} can't be found this could be a problem");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CuePropertiesUpdated?.Invoke(this, new QCuePropertiesUpdatedArgs { properties = properties });
|
CuePropertiesUpdated?.Invoke(this, new QCuePropertiesUpdatedArgs { properties = properties });
|
||||||
|
|||||||
@@ -575,7 +575,6 @@ namespace QControlKit
|
|||||||
|
|
||||||
if (cue.ignoreUpdates)
|
if (cue.ignoreUpdates)
|
||||||
{
|
{
|
||||||
_log.Verbose($"Skipping updatePropertiesWithDictionary for cue: {args.cueID} because of ignoreUpdates setting");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,8 +26,6 @@ namespace SharpOSC
|
|||||||
private static OscMessage parseMessage(byte[] msg)
|
private static OscMessage parseMessage(byte[] msg)
|
||||||
{
|
{
|
||||||
int index = 0;
|
int index = 0;
|
||||||
//Log.Debug("Raw ASCII DATA: " + System.Text.Encoding.ASCII.GetString(msg));
|
|
||||||
//Log.Debug("Raw UTF-8 DATA: " + System.Text.Encoding.UTF8.GetString(msg));
|
|
||||||
string address = null;
|
string address = null;
|
||||||
char[] types = new char[0];
|
char[] types = new char[0];
|
||||||
List<object> arguments = new List<object>();
|
List<object> arguments = new List<object>();
|
||||||
|
|||||||
@@ -71,14 +71,9 @@ namespace SharpOSC
|
|||||||
_log.Error(e.Exception.ToString());
|
_log.Error(e.Exception.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void TCPLog(string obj)
|
|
||||||
{
|
|
||||||
_log.Verbose($"{obj}");
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ClientDisconneted(object sender, OnClientDisconnectedEventArgs e)
|
private void ClientDisconneted(object sender, OnClientDisconnectedEventArgs e)
|
||||||
{
|
{
|
||||||
_log.Verbose($"client disconnected: {e.Reason}");
|
_log.Information($"client disconnected: {e.Reason}");
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -108,11 +103,7 @@ namespace SharpOSC
|
|||||||
{
|
{
|
||||||
_log.Error("responeMessage is null");
|
_log.Error("responeMessage is null");
|
||||||
}
|
}
|
||||||
|
|
||||||
_log.Debug($"OSC Message Received: {responseMessage.Address}");
|
|
||||||
OnMessageReceived(responseMessage);
|
OnMessageReceived(responseMessage);
|
||||||
_log.Debug($"After OnMessageReceived Event");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -100,7 +100,6 @@ namespace SharpOSC
|
|||||||
Log.Error(e.ToString());
|
Log.Error(e.ToString());
|
||||||
// If there is an error reading the packet, null is sent to the callback
|
// If there is an error reading the packet, null is sent to the callback
|
||||||
}
|
}
|
||||||
//Log.Debug("Raw UDP In: " + System.Text.Encoding.ASCII.GetString(bytes));
|
|
||||||
OscPacketCallback(packet);
|
OscPacketCallback(packet);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -151,7 +150,6 @@ namespace SharpOSC
|
|||||||
{
|
{
|
||||||
byte[] bytes = queue.Dequeue();
|
byte[] bytes = queue.Dequeue();
|
||||||
var packet = OscPacket.GetPacket(bytes);
|
var packet = OscPacket.GetPacket(bytes);
|
||||||
//Log.Debug("Raw UDP In: " + System.Text.Encoding.ASCII.GetString(bytes));
|
|
||||||
return packet;
|
return packet;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user