Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

overly verbose logging #55

Open
dlasher opened this issue Sep 2, 2022 · 2 comments
Open

overly verbose logging #55

dlasher opened this issue Sep 2, 2022 · 2 comments

Comments

@dlasher
Copy link

dlasher commented Sep 2, 2022

While troubleshooting a crash issue on a pi3b+, I noticed that adsb-box is logging verbosely -- poked around for a while, couldn't figure out how to stop it.

Example:

Sep 2 18:43:24 localhost adsb-box.collectd[898]: + snapctl is-connected system-observe
Sep 2 18:43:24 localhost adsb-box.collectd[898]: + '[' 0 -eq 1 ']'
Sep 2 18:43:24 localhost adsb-box.collectd[898]: + for plug in $PLUGS
Sep 2 18:43:24 localhost adsb-box.collectd[898]: + snapctl is-connected network-observe
Sep 2 18:43:25 localhost adsb-box.collectd[898]: + '[' 0 -eq 1 ']'
Sep 2 18:43:25 localhost adsb-box.collectd[898]: + for plug in $PLUGS
Sep 2 18:43:25 localhost adsb-box.collectd[898]: + snapctl is-connected mount-observe
Sep 2 18:43:25 localhost adsb-box.collectd[898]: + WAIT=1
Sep 2 18:43:25 localhost adsb-box.collectd[898]: + '[' 1 -eq 1 ']'
Sep 2 18:43:25 localhost adsb-box.collectd[898]: + sleep 10
Sep 2 18:43:27 localhost adsb-box.piaware[922]: + break
Sep 2 18:43:27 localhost adsb-box.piaware[922]: + '[' 1 -eq 0 ']'
Sep 2 18:43:27 localhost adsb-box.piaware[922]: + true
Sep 2 18:43:27 localhost adsb-box.piaware[922]: + WAIT=0
Sep 2 18:43:27 localhost adsb-box.piaware[922]: + for plug in $PLUGS
Sep 2 18:43:27 localhost adsb-box.piaware[922]: + snapctl is-connected system-observe
Sep 2 18:43:27 localhost adsb-box.piaware[922]: + '[' 0 -eq 1 ']'
Sep 2 18:43:27 localhost adsb-box.piaware[922]: + for plug in $PLUGS
Sep 2 18:43:27 localhost adsb-box.piaware[922]: + snapctl is-connected network-observe
Sep 2 18:43:27 localhost adsb-box.piaware[922]: + '[' 0 -eq 1 ']'
Sep 2 18:43:27 localhost adsb-box.piaware[922]: + for plug in $PLUGS
Sep 2 18:43:27 localhost adsb-box.piaware[922]: + snapctl is-connected mount-observe
Sep 2 18:43:27 localhost adsb-box.piaware[922]: + WAIT=1
Sep 2 18:43:27 localhost adsb-box.piaware[922]: + '[' 1 -eq 1 ']'
Sep 2 18:43:27 localhost adsb-box.piaware[922]: + sleep 10

How do I shut that off?

@dlasher
Copy link
Author

dlasher commented Sep 2, 2022

(wouldn't mind stopping all the apparmor spam while we're at it:

Sep 2 18:44:41 localhost kernel: [ 629.629231] audit: type=1400 audit(1662144281.899:145): apparmor="DENIED" operation="mknod" profile="snap.adsb-box.rbfeeder" name="/var/log/rbfeeder.log" pid=1711 comm="rbfeeder" requested_mask="c" denied_mask="c" fsuid=0 ouid=0
Sep 2 18:44:41 localhost kernel: [ 629.629341] audit: type=1400 audit(1662144281.899:146): apparmor="DENIED" operation="mknod" profile="snap.adsb-box.rbfeeder" name="/var/log/rbfeeder.log" pid=1711 comm="rbfeeder" requested_mask="c" denied_mask="c" fsuid=0 ouid=0
Sep 2 18:44:41 localhost kernel: [ 629.629475] audit: type=1400 audit(1662144281.899:147): apparmor="DENIED" operation="mknod" profile="snap.adsb-box.rbfeeder" name="/var/log/rbfeeder.log" pid=1711 comm="rbfeeder" requested_mask="c" denied_mask="c" fsuid=0 ouid=0
Sep 2 18:44:41 localhost kernel: [ 629.629595] audit: type=1400 audit(1662144281.899:148): apparmor="DENIED" operation="mknod" profile="snap.adsb-box.rbfeeder" name="/var/log/rbfeeder.log" pid=1711 comm="rbfeeder" requested_mask="c" denied_mask="c" fsuid=0 ouid=0

@tsunghanliu
Copy link
Owner

The logs in the 1st comment are because some of connections are not ready. I'm adding additional controls to disable this kind of logs. Meanwhile, you can check if the snap connections are properly connected like these:

$ snap connections adsb-box
Interface         Plug                       Slot               Notes
hardware-observe  adsb-box:hardware-observe  :hardware-observe  manual
mount-observe     adsb-box:mount-observe     :mount-observe     manual
network           adsb-box:network           :network           -
network-bind      adsb-box:network-bind      :network-bind      -
network-observe   adsb-box:network-observe   :network-observe   manual
process-control   adsb-box:process-control   :process-control   manual
raw-usb           adsb-box:raw-usb           :raw-usb           manual
system-observe    adsb-box:system-observe    :system-observe    manual

If not, you can use sudo snap connect adsb-box:[plug-name to connect. for instance: sudo snap connect adsb-box:system-observe.

For the logs in the 2nd comment, I will also fix it in the coming release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants