You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-29 16:43:09 +03:00
Add more logging scopes to session IDs
This uses prefix chaining to correlate several scopes together.
This commit is contained in:
@@ -68,8 +68,9 @@ interface PrefixedLogger extends Logger {
|
||||
}
|
||||
|
||||
function extendLogger(logger: PrefixedLogger) {
|
||||
logger.withPrefix = function(prefix: string) {
|
||||
return getPrefixedLogger(this.prefix + prefix);
|
||||
logger.withPrefix = function(prefix: string): PrefixedLogger {
|
||||
const existingPrefix = this.prefix || "";
|
||||
return getPrefixedLogger(existingPrefix + prefix);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user