<ion-header>
  <ion-navbar>
    <ion-title>
      <span translate>Event log</span>
    </ion-title>
    <ion-buttons end>
      <button ion-button icon-only (click)="showMenu($event)">
        <ion-icon name="more"></ion-icon>
      </button>
    </ion-buttons>
  </ion-navbar>
</ion-header>

<ion-content>
  <ion-list>
    <button ion-item *ngFor="let record of logger.records" (click)="record.json = !record.json" text-wrap>
      <ion-icon item-left [name]="icons[record.level]?.name" [ngStyle]="icons[record.level]?.style"></ion-icon>
      <span>{{record.time | date:'HH:mm:ss'}}.{{(record.time % 1000) | number:'3.0-0'}}</span>
      <span *ngFor="let arg of record.args">
        {{record.json ? stringify(arg) : arg}}
      </span>
    </button>
  </ion-list>
</ion-content>
