resolve "CLIENT LOG: [object Object]"
This commit is contained in:
parent
c698ad5add
commit
e1fc9a237e
@ -1,7 +1,11 @@
|
|||||||
import Logger from '/imports/startup/server/logger';
|
import Logger from '/imports/startup/server/logger';
|
||||||
|
|
||||||
const logClient = (type, log, ...args) => {
|
const logClient = (type, log, ...args) => {
|
||||||
|
if (typeof log === 'string' || log instanceof String) {
|
||||||
Logger.log(type, `CLIENT LOG: ${log}\n`, ...args);
|
Logger.log(type, `CLIENT LOG: ${log}\n`, ...args);
|
||||||
|
} else {
|
||||||
|
Logger.log(type, `CLIENT LOG: ${JSON.stringify(log)}\n`, ...args);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export default logClient;
|
export default logClient;
|
||||||
|
Loading…
Reference in New Issue
Block a user