Logging API
Quick Start
import RundotGameAPI from '@series-inc/rundot-game-sdk/api'
RundotGameAPI.log('Gameplay started', { level: currentLevel })
RundotGameAPI.log('Unexpected state', { level: 'warn', state })
RundotGameAPI.error('Fatal error', error)Log Levels
// Debug information
RundotGameAPI.logging.logDebug('Player moved', {
position: { x: 100, y: 200 },
velocity: { x: 5, y: 0 },
})
// Error logging
RundotGameAPI.logging.logError('Failed to load asset', {
assetPath: 'images/boss.png',
error: error.message,
})
// General logging with context
RundotGameAPI.log('Level complete', {
level: 5,
score: 1200,
timeElapsed: 45,
})Structured Logging
Error Handling
API Reference
Method
Description
Best Practices
Last updated