add clientURL to logs from client
This commit is contained in:
parent
0f54dfdcb8
commit
0a399af81f
@ -48,23 +48,36 @@ class ServerLoggerStream extends ServerStream {
|
||||
class MeteorStream {
|
||||
write(rec) {
|
||||
const { fullInfo } = Auth;
|
||||
const clientURL = window.location.href;
|
||||
|
||||
this.rec = rec;
|
||||
if (fullInfo.meetingId != null) {
|
||||
if (!this.rec.extraInfo) {
|
||||
this.rec.extraInfo = {};
|
||||
}
|
||||
|
||||
this.rec.extraInfo.clientURL = clientURL;
|
||||
|
||||
Meteor.call(
|
||||
'logClient',
|
||||
nameFromLevel[this.rec.level],
|
||||
this.rec.msg,
|
||||
this.rec.logCode,
|
||||
this.rec.extraInfo || {},
|
||||
this.rec.extraInfo,
|
||||
fullInfo,
|
||||
);
|
||||
} else {
|
||||
Meteor.call('logClient', nameFromLevel[this.rec.level], this.rec.msg);
|
||||
Meteor.call(
|
||||
'logClient',
|
||||
nameFromLevel[this.rec.level],
|
||||
this.rec.msg,
|
||||
{ clientURL },
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function createStreamForTarget(target, options) {
|
||||
const TARGET_EXTERNAL = 'external';
|
||||
const TARGET_CONSOLE = 'console';
|
||||
|
Loading…
Reference in New Issue
Block a user