Skip to content

Commit

Permalink
fix: change log message colors (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
admon84 authored Feb 10, 2024
1 parent d7ca0b0 commit b5d7b4f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
8 changes: 3 additions & 5 deletions src/utils/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,12 @@ declare global {
/**
* Return log messages to the console instead of calling `console.log()`.
*/
const print = false;

global.addTestOperation = (duration = 50) => {
if (duration < 10) {
return error('Test operation duration must be at least 10 ticks.', null, print);
return error('Test operation duration must be at least 10 ticks.', null, false);
}
if (isTestOperationActive()) {
return error('Test operation is already active.', null, print);
return error('Test operation is already active.', null, false);
}
return createTestOperation(duration, print);
return createTestOperation(duration, false);
};
6 changes: 3 additions & 3 deletions src/utils/log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function setLogLevel(level: LogLevel) {
* @param print (optional) Print using `console.log()` if true, otherwise returns the colorful log message.
*/
export function alert(message: string, roomName?: string | null, print = true) {
return send(LogLevel.Alert, '#6dfaff', message, roomName, print);
return send(LogLevel.Alert, '#9dd2e7', message, roomName, print);
}

/**
Expand All @@ -30,7 +30,7 @@ export function alert(message: string, roomName?: string | null, print = true) {
* @param print (optional) Print using `console.log()` if true, otherwise returns the colorful log message.
*/
export function success(message: string, roomName?: string | null, print = true) {
return send(LogLevel.Success, '#32cd32', message, roomName, print);
return send(LogLevel.Success, '#9de7a7', message, roomName, print);
}

/**
Expand All @@ -50,7 +50,7 @@ export function error(message: string, roomName?: string | null, print = true) {
* @param print (optional) Print using `console.log()` if true, otherwise returns the colorful log message.
*/
export function warning(message: string, roomName?: string | null, print = true) {
return send(LogLevel.Warn, '#ffe75e', message, roomName, print);
return send(LogLevel.Warn, '#e6e79d', message, roomName, print);
}

/**
Expand Down

0 comments on commit b5d7b4f

Please sign in to comment.