mirror of
https://github.com/SunRed/haste-server.git
synced 2024-11-01 01:30:21 +01:00
13 lines
438 B
JavaScript
13 lines
438 B
JavaScript
|
module.exports = class HasteUtils {
|
||
|
//init class
|
||
|
constructor(options = {}){
|
||
|
//xd no options for now
|
||
|
}
|
||
|
|
||
|
//stringify json objects from winston message to cool "key=value" format
|
||
|
stringifyJSONMessagetoLogs(info){
|
||
|
//really KKona solution, but works for now
|
||
|
let keys = Object.keys(info).filter(k => k != 'message' && k != 'level');
|
||
|
return keys.map(k => `${k}=${info[k]}`).join(', ');
|
||
|
}
|
||
|
}
|