Verify on jammy: PASS
=====================

1. Enable journald logging of audit events

```
sudo systemctl stop systemd-journald.service
sudo systemctl start systemd-journald-audit.socket
sudo systemctl start systemd-journald.service
sudo /usr/sbin/auditctl -e 1

systemctl is-active systemd-journald-audit.socket
active
```

2. Install snapd 2.77.1+ubuntu22.04 from jammy-proposed, restart snapd,
trigger the same event

```
snap version --verbose
snap            2.77.1+ubuntu22.04
snapd           2.77.1+ubuntu22.04
series          16
ubuntu          22.04
kernel          5.15.0-198-generic
architecture    amd64
snapd-bin-from  native-package
snap-bin-from   native-package
```

apt-cache policy: Installed 2.77.1+ubuntu22.04 from jammy-proposed.
Built with Go 1.23.1.

4. Repeat the journalctl | grep. The inner JSON object ends with } with
no trailing newline inside the stringified JSON. Each matching
journalctl -o json line parses as JSON.

```
journalctl -b0 _TRANSPORT=audit -o json | grep -F 'Security logging'

"MESSAGE":"TRUSTED_APP pid=256062 uid=0 auid=4294967295 ses=4294967295 
subj=unconfined 
msg='{\"datetime\":\"2026-10-08T12:03:37.161209042Z\",\"level\":\"INFO\",\"description\":\"Security
 logging 
enabled\",\"app_id\":\"canonical.snapd.snapd\",\"type\":\"security\",\"category\":\"SYS\",\"event\":\"sys_logging_enabled\"}'
 <==== NO NEWLINE
```

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2160691

Title:
  snapd outputs newline after json log

To manage notifications about this bug go to:
https://bugs.launchpad.net/snapd/+bug/2160691/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to