1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2026-04-02 08:12:47 +01:00
Files
supervisor/tests/fixtures/logs_export_host.txt
Jan Čermák 0814552b2a Use Journal Export Format for host (advanced) logs (#4963)
* Use Journal Export Format for host (advanced) logs

Add methods for handling Journal Export Format and use it for fetching
of host logs. This is foundation for colored streaming logs for other
endpoints as well.

* Make pylint happier - remove extra pass statement

* Rewrite journal gateway tests to mock ClientResponse's StreamReader

* Handle connection refused error when connecting to journal-gatewayd

* Use SYSTEMD_JOURNAL_GATEWAYD_SOCKET global path also for connection

* Use parsing algorithm suggested by @agners in review

* Fix timestamps in formatting, always use UTC for now

* Add tests for Accept header in host logs

* Apply suggestions from @agners

Co-authored-by: Stefan Agner <stefan@agner.ch>

* Bail out of parsing earlier if field is not in required fields

* Fix parsing issue discovered in the wild and add test case

* Make verbose formatter more tolerant

* Use some bytes' native functions for some minor optimizations

* Move MalformedBinaryEntryError to exceptions module, add test for it

---------

Co-authored-by: Stefan Agner <stefan@agner.ch>
2024-03-20 09:00:45 +01:00

37 lines
990 B
Plaintext

__CURSOR=s=83fee99ca0c3466db5fc120d52ca7dd8;i=203f2ce;b=f5a5c442fa6548cf97474d2d57c920b3;m=3191a3c620;t=612ccd299e7af;x=8675b540119d10bb
__REALTIME_TIMESTAMP=1709520776193967
__MONOTONIC_TIMESTAMP=212896826912
__SEQNUM=33813198
__SEQNUM_ID=83fee99ca0c3466db5fc120d52ca7dd8
_BOOT_ID=f5a5c442fa6548cf97474d2d57c920b3
PRIORITY=6
_TRANSPORT=journal
_UID=0
_GID=0
_CAP_EFFECTIVE=1ffffffffff
_MACHINE_ID=edb710b8363b4ff48aed6e75a27f85a6
_HOSTNAME=homeassistant
_RUNTIME_SCOPE=system
SYSLOG_FACILITY=37
TID=1
SYSLOG_IDENTIFIER=systemd
_PID=1
_COMM=systemd
_EXE=/usr/lib/systemd/systemd
_CMDLINE=/sbin/init
_SYSTEMD_CGROUP=/init.scope
_SYSTEMD_UNIT=init.scope
_SYSTEMD_SLICE=-.slice
CODE_FILE=src/core/job.c
JOB_TYPE=start
UNIT=systemd-hostnamed.service
CODE_LINE=768
CODE_FUNC=job_emit_done_message
MESSAGE=Started Hostname Service.
JOB_RESULT=done
MESSAGE_ID=39f53479d3a045ac8e11786248231fbf
JOB_ID=7205
INVOCATION_ID=e38ca30edd074417b011192307f10811
_SOURCE_REALTIME_TIMESTAMP=1709520776193926