cleanup logging

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