mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-3242] removed filter for string in example log component (#3511)
* [ADF-3242] removed filter for string in example log component * [ADF-3242] added try catch for circular dependency objects * [ADF-3242] added try catch and removed error message
This commit is contained in:
@@ -32,13 +32,18 @@ export class LogComponent {
|
|||||||
constructor(public logService: LogService) {
|
constructor(public logService: LogService) {
|
||||||
|
|
||||||
logService.onMessage.subscribe((message) => {
|
logService.onMessage.subscribe((message) => {
|
||||||
if (typeof message.text === 'string') {
|
let contentMessage = '';
|
||||||
this.logs.push({ type: message.type, text: JSON.stringify(message.text) });
|
try {
|
||||||
|
contentMessage = JSON.stringify(message.text);
|
||||||
|
} catch (error) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.logs.push({ type: message.type, text: contentMessage});
|
||||||
this.logsData = new ObjectDataTableAdapter(this.logs, [
|
this.logsData = new ObjectDataTableAdapter(this.logs, [
|
||||||
{ type: 'text', key: 'type', title: 'Log level', sortable: true },
|
{ type: 'text', key: 'type', title: 'Log level', sortable: true },
|
||||||
{ type: 'text', key: 'text', title: 'Message', sortable: false }
|
{ type: 'text', key: 'text', title: 'Message', sortable: false }
|
||||||
]);
|
]);
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user