[Index] Move log to index instead of separate utils file

This commit is contained in:
Ducko 2022-03-28 08:14:13 +01:00
parent c038e13ccf
commit e28fc5864b
2 changed files with 2 additions and 4 deletions

View File

@ -1,5 +1,6 @@
const log = require('./utils/log');
const log = (area, ...args) => console.log(`[\x1B[38;2;88;101;242mOpenAsar\x1B[0m > ${area}]`, ...args);
global.log = log; // Make log global for easy usage everywhere
global.oaVersion = 'nightly';
log('Init', 'OpenAsar', oaVersion);

View File

@ -1,3 +0,0 @@
const rgb = (r, g, b, text) => `\x1b[38;2;${r};${g};${b}m${text}\x1b[0m`;
module.exports = (area, ...args) => console.log(`[${rgb(88, 101, 242, 'OpenAsar')} > ${area}]`, ...args);