1
0
Fork 0
mirror of https://github.com/SunRed/haste-server.git synced 2024-11-27 11:20:18 +01:00
haste-server/lib/util.js
2020-08-28 04:39:03 +02:00

13 lines
No EOL
397 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(', ');
}
};