Esempio n. 1
0
  public void logTypedEvent(TypedEvent event) {
    if (!active || writer == null) return;

    AutState state = detectAutState();
    if (lastState == null || lastState != state) {
      writeAnnouncement("%s is the current AUT mode", state);
      lastState = state;
    }

    Map<String, Object> snapshot = makeSnapshot(event);
    write(
        "# %s %s - %s\n  %s\n",
        event.getClass().getName(),
        formatObject(event.widget),
        new SimpleDateFormat("yyyy/MM/dd HH:mm:ss:SSS").format(new Date()),
        formatEvent(event.widget, snapshot));
    writeStackTrace();
  }