Change in logging behaviour on Ubuntu Core

That’s somewhat awkward. We should think through this and see if we need to split out these cases.

Fair points.

What’s the practical difference? The core option may be set in the gadget, assuming that’s the direction we go.

I’d misunderstood an earlier comment you made and assumed that this change couldn’t be accomplished via a core snap config item:

So if it’s possible to control which logging system is used via a core snap config item, then I’m +1, given that we don’t make journald the default value. What I’m opposed to is removing an existing feature/mechanism via an update, such that existing customers have to do extra work to restore it.

https://github.com/snapcore/core/pull/21 was the initial approach … resulting in a:

snap set/get service.rsyslog.disable=true|false

config option … i can clean it up (drop timesyncd) and re-propose it if wanted …

1 Like

Yes, given the feedback above and the previous discussions, it seems safe and sane to simply allow disabling the service conditionally. We can reevaluate that on 18.04 or once we have multiple bases.

Thanks @ogra.

FYI, there is a snappy-debug in edge that will use journalctl, but it has some issues I was unable to fix in time before going on holiday so I didn’t push it to stable. It will work on Ubuntu Core though and will prefer journalctl over syslog there, so if people need it:

$ sudo snap install snappy-debug --edge

or if upgrading:

$ sudo snap refresh snappy-debug --edge
1 Like

i have seeded rsyslog back into the edge image and have a matching PR at https://github.com/snapcore/core/pull/45

people wanting to make use of it need to set the option from their gadget…

which in 2.27 should work using the config defaults functionality there

1 Like

so following Gadget snaps
this would then look like:

defaults:
  99T7MUlRhtI3U0QFgl5mXXESAiSwt776:
    service:
      rsyslog:
        disabled: true

if i understand the doc correctly (99T7MUlRhtI3U0QFgl5mXXESAiSwt776 is the snap-id for core)
is that right ?

yes, that’s snap-id is correct

A post was split to a new topic: Status of logging in Ubuntu Core

@ogra - In putting an UC18 system into a production environment that uses remote logging, it seems that this has never happened. I understand there is an effort to make systemd-journal-remote work as a snap, but regardless of that, many sites standardize on syslog as the central log server, and core18 doesn’t provide any facilities for this natively and there doesn’t appear to be any snaps to achieve this. Is this work still planned for an rsyslog snap or a snap that is simply designed to forward logs (eg, perhaps with snap set)?

rsyslog is completely gone from core18 so a snap set command wouldnt be possible anymore, but we have two new snaps that at least allow central logging, despite not being rsyslog compatible. The setup is described at: