update logger and LJM to support log timestamps
This commit is contained in:
@@ -63,13 +63,13 @@ export default class JitsiMeetLogStorage {
|
||||
for (let i = 0, len = logEntries.length; i < len; i++) {
|
||||
const logEntry = logEntries[i];
|
||||
|
||||
if (typeof logEntry === 'object') {
|
||||
// Aggregated message
|
||||
logMessage += `(${logEntry.count}) ${logEntry.text}\n`;
|
||||
} else {
|
||||
// Regular message
|
||||
logMessage += `${logEntry}\n`;
|
||||
if (logEntry.timestamp) {
|
||||
logMessage += `${logEntry.timestamp} `;
|
||||
}
|
||||
if (logEntry.count > 1) {
|
||||
logMessage += `(${logEntry.count}) `;
|
||||
}
|
||||
logMessage += `${logEntry.text}\n`;
|
||||
}
|
||||
logMessage += '"}';
|
||||
|
||||
|
||||
@@ -39,7 +39,8 @@ function buildTransport() {
|
||||
'warn',
|
||||
'error'
|
||||
].reduce((logger, logName) => {
|
||||
logger[logName] = (...args: Array<string>) => {
|
||||
logger[logName] = (timestamp: string, ...args: Array<string>) => {
|
||||
// It ignores the timestamp argument, because LogBridge will add it on the native side anyway
|
||||
const nargs = args.map(arg => {
|
||||
if (arg instanceof Error) {
|
||||
const errorBody = {
|
||||
|
||||
Reference in New Issue
Block a user