Skip to content

Token and ports are not printed to log since Sonic Pi v4.6.0 #45

@giohappy

Description

@giohappy

For security reasons they're not logged anymore: sonic-pi-net/sonic-pi@6a93b79

They must be uncommented manually inside spider-server.rb (these lines) and the parsing must be fixed accordingly:

diff --git a/psonic/psonic.py b/psonic/psonic.py
index 5606525..5a07871 100755
--- a/psonic/psonic.py
+++ b/psonic/psonic.py
@@ -197,8 +197,8 @@ def set_server_parameter_from_log(udp_ip, log_file=None):
 
     # Use regular expressions to extract the values
     token_match = re.search(r'Token: (-?\d+)', text)
-    server_port_match = re.search(r':server_port=>(\d+)', text)
-    osc_cues_port_match = re.search(r':osc_cues_port=>(\d+)', text)
+    server_port_match = re.search(r'server_port: (\d+)', text)
+    osc_cues_port_match = re.search(r'osc_cues_port: (\d+)', text)
 
     token = int(token_match.group(1)) if token_match else None
     udp_port = int(server_port_match.group(1)) if server_port_match else None

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions