Parameters
Optionaloptions: {
minimumLevel?:
| "garbage"
| "debug"
| "info"
| "warning"
| "error"
| "javascript";
search?: string;
since?: number;
}
Returns {
date: Date;
level: "garbage" | "debug" | "info" | "warning" | "error" | "javascript";
message: string;
sequence: number;
}[]
The matching messages, oldest first
Get the messages currently in the Hammerspoon Console, oldest first. This is the same history the Console window shows, so it's limited by the "Console history length" setting (which applies to each level separately), and
hs.clearConsole()empties it.Each message is an object with:
sequence: a number that's higher for each newer message. Pass the last one you've seen assinceto get only the messages logged after itdate: aDatefor when the message was loggedlevel:"garbage","debug","info","warning","error"or"javascript"(forconsole.log()and friends)message: the message's textOptions (all optional):
minimumLevel: only get messages at this level or above, e.g."warning"for warnings and errors (and"javascript"messages, which count as the highest level). Defaults to every levelsearch: only get messages that contain this text, ignoring casesince: only get messages whosesequenceis higher than this