mirror of
https://github.com/HeyPuter/puter.git
synced 2026-05-05 17:10:45 +00:00
Add a debug logger for backend
This commit is contained in:
@@ -45,7 +45,7 @@ class Kernel extends AdvancedBase {
|
||||
const kv = new kvjs();
|
||||
global.kv = kv;
|
||||
global.cl = console.log;
|
||||
|
||||
|
||||
const { RuntimeEnvironment } = require('./boot/RuntimeEnvironment');
|
||||
const { BootLogger } = require('./boot/BootLogger');
|
||||
|
||||
@@ -73,8 +73,13 @@ class Kernel extends AdvancedBase {
|
||||
// const app = express();
|
||||
const config = require('./config');
|
||||
|
||||
globalThis.ll = () => {};
|
||||
globalThis.xtra_log = () => {};
|
||||
if ( config.env === 'dev' ) {
|
||||
globalThis.ll = o => {
|
||||
console.log('debug: ' + require('node:util').inspect(o));
|
||||
return o;
|
||||
};
|
||||
globalThis.xtra_log = (...args) => {
|
||||
// append to file in temp
|
||||
const fs = require('fs');
|
||||
|
||||
Reference in New Issue
Block a user