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
397 B
JavaScript
Raw Permalink Normal View History

2020-08-26 04:54:58 +02:00
module.exports = class HasteUtils {
2020-08-28 04:39:03 +02:00
//init class
constructor(options = {}){
//xd no options for now
}
2020-08-26 04:54:58 +02:00
2020-08-28 04:39:03 +02:00
//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(', ');
}
};