1
0
mirror of https://github.com/comatory/fb2iCal synced 2025-06-05 22:09:25 +02:00

feature: add endpoint for logging instrumentation

This commit is contained in:
Ondřej Synáček
2020-12-12 13:19:34 +01:00
parent 0cca2a96bf
commit 737620e2ca
5 changed files with 47 additions and 2 deletions

View File

@@ -8,9 +8,9 @@ class FirebaseTransport extends Transport {
this._db = options.db
}
log(info, callback) {
async log(info, callback) {
try {
this._db.ref(`log-${new Date().getTime()}`).set(info)
await this._db.ref(`log-${new Date().getTime()}`).set(info)
callback(null, info)
this.emit('logged', info)
} catch (err) {