← iOS syslog
Syslog·Guide
All tools

The Syslog tool

iOS device logs as idevicesyslog, pymobiledevice3 and similar tools print them. Drop or paste a file, or send one from the iOS Device page. Everything runs in your browser and nothing is uploaded.

Jan 15 10:23:45 iPhone SpringBoard(FrontBoard)[57] <Notice>: Received state update for 412

Contents

  1. The Syslog library

1The Syslog library

lib/syslog.js is a JavaScript module that reads iOS syslog text into entries. It has no dependencies and no user interface, so it also runs in a module Web Worker or in jsc. It exports one class, Syslog, whose methods are all static:

import { Syslog } from "../lib/syslog.js";
MethodWhat it does
Syslog.parse(text){ entries, udid }. Each entry is { kind: "log", month, day, time, timestamp, process, subsystem, pid, level, levelClass, message, raw, multiline } or, for [connected …] / [disconnected] lines, { kind: "divider", text, raw }. timestamp is "01-15 10:23:45" (empty when the month isn't known); levelClass is fault, err, warn, note, info, debug or default (note for unknown levels). udid is the first connected device, or null.
Syslog.processes(entries)[{ process, count, pids }], the processes with the most lines first.
Syslog.subsystems(entries)[{ subsystem, count }], most lines first.
Syslog.timestamps(entries)The distinct timestamps, sorted.
Syslog.isSyslog(text)True when some line looks like a syslog header or a [connected line.
Syslog.LEVELS, Syslog.LEVEL_ORDEREach level's short label and class ({ Error: { short: "ERR", class: "err" }, … }), and the levels in severity order.
import { Syslog } from "../lib/syslog.js";

const { entries, udid } = Syslog.parse(text);
const faults = entries.filter(entry => entry.kind === "log" && entry.levelClass === "fault");
for (const entry of faults) {
	console.log(entry.timestamp, entry.process, entry.subsystem, entry.message);
}

Timestamps carry no year, so they sort correctly within one year only.