1
0
Fork 0
mirror of https://github.com/SunRed/haste-server.git synced 2024-11-01 01:30:21 +01:00
haste-server/lib/util.js

13 lines
438 B
JavaScript
Raw Normal View History

2020-08-26 04:54:58 +02:00
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(', ');
}
}