audit
An append-only record of who did what on this node.
Each event is one JSON line in <node_state_path>/audit/<day>.log, in UTC:
sign-ins and refusals, launches and stops, and every administrative change
with the administrator who made it. A node keeps its own log; the dashboard
reads the logs of all nodes together.
attributelogger= logging.getLogger(__name__)func_directory() -> strReturn the directory of the audit logs.
Returns
strfuncrecord(event, user='', **fields) -> NoneAppend an event; a log that cannot be written never fails the request that caused it.
parameventstrWhat happened, launch or sign_in for example.
paramuserstr= ''Who did it, when someone did.
paramfieldsAny= {}Returns
Nonefuncdays() -> list[str]Return the days this node has a log for, newest first.
Returns
list[str]funcread(day='', query='', last='') -> list[dict[str, Any]]Return the events of a day, oldest first.
paramdaystr= ''YYYY-MM-DD in UTC; today when empty.
paramquerystr= ''Keep the events whose line contains every word of this, in any case.
paramlaststr= ''With day empty, also read the days before today back to this one.
Returns
list[dict[str, typing.Any]]