forked from jorishr/snowfall-js-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlogger.js
More file actions
32 lines (29 loc) · 688 Bytes
/
Copy pathlogger.js
File metadata and controls
32 lines (29 loc) · 688 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import { params } from "./index.js";
/**
* Logs an error message to the console.
*
* @param {string} message - The error message to be logged.
*/
export function logError(message) {
console.error(`[ERROR] ${message}`);
}
/**
* Logs a warning message to the console.
*
* @param {string} message - The warning message to be logged.
*/
export function logWarn(message) {
if (params.logLevel === "info") {
console.warn(`[WARN] ${message}`);
}
}
/**
* Logs an info message to the console.
*
* @param {string} message - The info message to be logged.
*/
export function logInfo(message) {
if (params.logLevel === "info") {
console.log(`[INFO] ${message}`);
}
}