theRAPTLab / gsgo

GEM-STEP Foundation repo migrated from GitLab June 2023
1 stars 1 forks source link

Full AI Logging - [merged] #721

Closed benloh closed 1 year ago

benloh commented 2 years ago

Merges dev-bl/log-ui -> dev-next

Branch: dev-bl/log-ui

This is a prototype implementation of the logging system for researcher and AI processing purposes. The goal is to provide a baseline example of logging data to determine if this is sufficient. We expect to iterate on this to refine the reporting.

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
  2. 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:

More details below.

Human-Readable Log

The human readable log will log the following events:

DEVICE

PROJECT

PROJECT SETUP: ProjSetup

INSPECT: Inspect

RUN SIM: SimEvent

SCRIPT EDIT: ScriptEdit

SESSION: Session

CHARCONTROL: CharCtrl

Realtime Log

The realtime log will log the following events:

DISPLAYLIST

POZYX: pz (in RTLog)

PTRACK: pt (in RTLog)


Testing

  1. git fetch && git checkout dev-bl/log-ui
  2. npm run build && npm run gem -- NOTE there are server changes, so a build is necessary.
  3. Load a project that uses pozyx tags. Logs are NOT enabled by default.
  4. Click the "Log" checkbox in the navbar to turn on logging -- verify that logging has started by reviewing the log files.
  5. Uncheck the "Log" checkbox to stop logging -- verify that logging has stopped.

Verify RealTime Logging

Verify Normal Logging


SETUP

Delimiter: Tab

Currently the delimiter is set to be a tab. You can change this in server-logger.js line 29 with the LOG_DELIMITER constant.


TO DO

benloh commented 2 years ago

requested review from @jdanish

benloh commented 2 years ago

@jdanish I'm still refining a few things, but this is ready for general testing.

benloh commented 2 years ago

added 2 commits

Compare with previous version

benloh commented 2 years ago

marked the checklist item Since "Log" is enabled on an opened project page, always log project opening as completed

benloh commented 2 years ago

marked the checklist item DisplayList logging does not pay attention to the "Log" checkbox as completed

benloh commented 2 years ago

marked this merge request as ready

benloh commented 2 years ago

@jdanish Alright, all basic logging should be in place.

benloh commented 2 years ago

added 2 commits

Compare with previous version

benloh commented 2 years ago

mentioned in commit dd18b5672bae345aadbd6ae8dad022a3b52097f9