Research Logging - theRAPTLab/gsgo GitHub Wiki

[[TOC]]

Setting Up Logging

The system does not log data by default. You need to click the "Log" checkbox to start streaming data to logs.

Research logging is implemented as an URSYS call that is inserted into the code at relevant points.

  • Logs are CSV files
  • Logs are saved to /gs_packages/gem-srv/runtime/logs

Example Call

/**
 * @param {string} eventName - a label for log item, e.g. an event type
 * @param {array} data - an array of data to export
 */
UR.LogEvent(eventName, ['a','b','c']);

// example
const data = { selectedInstance, scriptChange }
UR.LogEvent('StudentScriptEdit', Object.values(data));

// example
UR.LogEvent('RoundManage', ['startRound', 'round5']);


Interpreting the Logs

OVERVIEW

There are two different logs representing two different time scales of data:

  1. Human-Readable Log
  • Events are logged in human-friendly English phrases
  • The time scale of events occur usually in seconds
  • Data is stored as key value pairs when needed
  • This log is intended to be opened in Excel
  1. Real Time Log
  • Events are logged in terse code fragments optimized for file size and speed
  • The time scale of events occurs in milliseconds, generally about 30fps corresponding to the speed of the simulation
  • Data might be stored as JSON and would require extra parsing to be viewable
  • This log is not intended to be opened in Excel

Log files are stored in gsgo/gs_packages/gem-srv/runtime/logs

All log lines contain:

  • timestamp (with milliseconds)
  • UADDR -- Unique device address. Each device will have a unique UADDR value. Opening a second browser on a computer/laptop/phone will create a new UADDR. Each browser page reload will also create a new UADDR.

More details below.

Human-Readable Log

The human readable log will log the following events:

DEVICE

  • joined network

PROJECT

  • Create New Project
  • Open Project
  • Open SimViewer
  • Open CharController

PROJECT SETUP: ProjSetup

  • Select Setup
  • Select Save
  • Project Settings Edit
  • Project Settings Save
  • Edit Round Script
  • Save Round Script
  • New Blueprint <bpName>
  • Add Character
  • Edit Blueprint <bpName>
  • Edit Instance InitScript
  • Save Instance InitScript
  • Drag <name> <x> <y>
  • Click Character <name> <x> <y>

INSPECT: Inspect

  • Show Inspector <name>
  • Hide Inspector <name>

RUN SIM: SimEvent

  • Prep Round
  • Pick Characters
  • Start Round
  • Stop Round
  • Reset Stage

SCRIPT EDIT: ScriptEdit

  • Save to Server
  • Save Slot <linetext>
  • Cancel Save Slot
  • Delete Slot <linetext>
  • Select Choice <symbol>

SESSION: Session

  • Viewer Connect
  • CharController Connect

CHARCONTROL: CharCtrl

  • CharController Set Number of Entities <num>
  • CharController Select Character <bpName>
  • Drag <bpName> <entity-id> <x> <y>

TOUCHES: Touched

  • 'Touched agentId targetId b2b binb c2c c2b `

Realtime Log

The realtime log will log the following events:

DISPLAYLIST

  • DISPLAYLIST <displayListJSON>

POZYX: pz (in RTLog)

  • pz id <id> bpid <bpid> x <x> y <y>

PTRACK: pt (in RTLog)

  • pt id <id> bpid <bpid> x <x> y <y>

See also !279 and !272

⚠️ **GitHub.com Fallback** ⚠️