Files
cell/test_log.js
John Alanbrook e98abcdda7
Some checks failed
Build and Deploy / build-macos (push) Failing after 5s
Build and Deploy / build-windows (CLANG64) (push) Has been cancelled
Build and Deploy / package-dist (push) Has been cancelled
Build and Deploy / deploy-itch (push) Has been cancelled
Build and Deploy / deploy-gitea (push) Has been cancelled
Build and Deploy / build-linux (push) Has been cancelled
initial logging try
2025-05-24 22:01:21 -05:00

29 lines
840 B
JavaScript

// Test script for the log statement system
// Test console logging
log.console("This is a console log message");
// Test info logging (goes to file)
log.info("Application started");
log.info("User logged in: user123");
// Test warning logging (goes to console and file)
log.warning("Memory usage is high");
// Test error logging (goes to console, file, and actor)
log.error("Failed to connect to database");
// Test debug logging (goes to file only)
log.debug("index: " + 42);
log.debug("Processing item: " + JSON.stringify({id: 1, name: "test"}));
// Test audit logging (goes to file and actor)
if (log.audit) {
log.audit("User performed sensitive action");
}
// Test with expressions as per the spec
var index = 5;
log.debug("index value is: " + index);
console.log("Log test completed. Check console output and log files.");