chore: add debug logs

This commit is contained in:
2025-03-23 03:36:53 -07:00
parent e0062d181d
commit 9f394e84cb

View File

@@ -791,7 +791,7 @@ const server = http.createServer( ( request, response ) =>
if ( loadAsset === '/' ) if ( loadAsset === '/' )
loadAsset = 'index.html'; loadAsset = 'index.html';
Log.debug( `Web server [GET]`, chalk.white( `` ), chalk.grey( `${ loadAsset }` ) ); Log.debug( `www`, chalk.yellow( ` [GET] ` ), chalk.white( `` ), chalk.grey( `${ loadAsset }` ) );
const handleRequest = async() => const handleRequest = async() =>
{ {
@@ -880,11 +880,11 @@ const server = http.createServer( ( request, response ) =>
response.setHeader( 'Content-type', fileMime ); response.setHeader( 'Content-type', fileMime );
response.end( html ); response.end( html );
Log.debug( `Web server [LOAD]`, chalk.white( `` ), chalk.grey( `${ loadAsset } / ${ fileMime }` ) ); Log.debug( `www`, chalk.green( ` [LOAD] ` ), chalk.white( `` ), chalk.grey( `asset:${ loadAsset } mime:${ fileMime }` ) );
} }
else else
{ {
Log.error( `Webserver file not found:`, chalk.white( `` ), chalk.grey( `${ request.url }` ) ); Log.error( `www file not found:`, chalk.white( `` ), chalk.grey( `${ request.url }` ) );
response.writeHead( 404, 'Not Found' ); response.writeHead( 404, 'Not Found' );
response.end(); response.end();