|
@@ -241,18 +241,21 @@ export default abstract class BaseModule {
|
|
*
|
|
*
|
|
* @param log - Log message or object
|
|
* @param log - Log message or object
|
|
*/
|
|
*/
|
|
- public log(log: string | Omit<Log, "timestamp" | "category">) {
|
|
|
|
|
|
+ public log(log: string | Omit<Log, "timestamp">) {
|
|
const {
|
|
const {
|
|
message,
|
|
message,
|
|
type = "info",
|
|
type = "info",
|
|
- data = {}
|
|
|
|
|
|
+ data = {},
|
|
|
|
+ category
|
|
} = {
|
|
} = {
|
|
...(typeof log === "string" ? { message: log } : log)
|
|
...(typeof log === "string" ? { message: log } : log)
|
|
};
|
|
};
|
|
LogBook.log({
|
|
LogBook.log({
|
|
message,
|
|
message,
|
|
type,
|
|
type,
|
|
- category: `modules.${this.getName()}`,
|
|
|
|
|
|
+ category: `modules.${this.getName()}${
|
|
|
|
+ category ? `.${category}` : ""
|
|
|
|
+ }`,
|
|
data: {
|
|
data: {
|
|
moduleName: this._name,
|
|
moduleName: this._name,
|
|
...data
|
|
...data
|