ServerLog:
Filter:
ServerTools/Classes (extension) | Debugging | External Control > OSC

ServerLog
ExtensionExtension

records OSC traffic to and from a Server and displays this in a browseable searchable interface

Description

Records OSC traffic to and from a Server and displays this in a browseable searchable interface. Greatly speeds problem solving and identifies probably causes

Numerical commands ( 9 = /s_new ) are converted to human readable equivalents. Nodes and defNames are displayed with consistent color coding to increase visual clarity. Integrated with inspect so that defNames can be clicked on in the log display and the SynthDef itself can be quickly examined. Integrated with ServerTreeGui so the current state of the tree can be cross checked with the log. Cross check of Synth and SynthDef is performed so it flags probably errors like misnamed arguments.

TODO: add refresh, scrolling, search

Note: When ServerLog is activated it inserts itself into the Server object by replacing the NetAddr. It then records traffic and forwards it. I'm not sure how much it has to eat before it bloats up and dies, I've never had it happen. So it should be harmless but I usually only turn it on when there is a problem to investigate.

Class Methods

.start

Creates and activates a ServerLog for the specified Server. If one already exists for the Server then it will used. (its idimpotent). If the ServerLog has previously been stopped then this will restart it.

Arguments:

server

default: default Server

Returns:

a ServerLog

.stop

Stops recording and removes the ServerLog from the Server's NetAddr slot.

Arguments:

server

Returns:

a ServerLog

.new

identical to ServerLog.start

Arguments:

server

default: default Server

Returns:

a ServerLog

.forServer

internal

Arguments:

server

default: default Server

Returns:

a ServerLog

.ifActive

Arguments:

server
func

.guiMsgsForSynth

A type of search function: shows all OSC messages that referenced a Synth, creating a small ServerLogGui inteface to display them. Used in many debugging views. This matches both sent and received messages (like node end).

Arguments:

synth

the Synth object

layout

the parent view, FlowView or window

showTimes

boolean: to show the sending times. some small debugging interfaces can get too cluttered with the times.

.guiMsgsForSynthDef

A type of search function: shows all messages that referenced a SynthDef name, creating a small ServerLogGui inteface to display them. Used in many debugging views.

Arguments:

defName

SynthDef name to search for

layout

the parent view, FlowView or window

server

default: default Server. the Server to search for traffic

showTimes

boolean: to show the sending times. some small debugging interfaces can get too cluttered with the times.

.guiMsgsForBus

A type of search function: shows all messages that referenced a Bus. It matches by looking for arguments named "*bus*" followed by an index argument matching this bus. Creates a small ServerLogGui inteface to display them. Used in many debugging views.

Arguments:

index

index number of bus

rate

rate of bus

layout

the parent view, FlowView or window to place the results on

server

which server the bus is on

showTimes

boolean: to show the sending times. some small debugging interfaces can get too cluttered with the times.

.cmdString

converts an integer Server OSC command name to its human string name.

Arguments:

cmd

integer or string. if already a string or if the cmd number is unknown then it returns cmd

Returns:

string

.prGuiMsgsFor

private

Arguments:

performList
server
layout

the parent view, FlowView or window

showTimes

boolean: to show the sending times. some small debugging interfaces can get too cluttered with the times.

title

Instance Methods

.msgs

Returns:

array of ServerLogSentEvent/ServerLogReceivedEvent

.tail

print all OSC messages to console as they are sent to server. like unix tail

.server

Returns:

a Server

.remove

Returns:

(returnvalue)

.filterBySynthDef

Arguments:

defName

Returns:

(returnvalue)

.filterBySynth

Arguments:

nodeID

Returns:

(returnvalue)

.filterByBus

Arguments:

index
rate

Returns:

(returnvalue)

.matchMsgs

Arguments:

matchFunc

Returns:

(returnvalue)

.slinit

Arguments:

s

Returns:

(returnvalue)

.sendMsg

Arguments:

... args

Returns:

(returnvalue)

.sendBundle

Arguments:

time
... args

Returns:

(returnvalue)

.guiClass

Returns:

(returnvalue)

.getSortedEvents

Arguments:

tail
callback

Returns:

(returnvalue)