Log file options Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
baz123
Posts: 166
Joined: Thu Jan 12, 2017 9:23 pm

Log file options

Post by baz123 »

I'm sure there used to be an option regarding the way logging happened.

I am trying to free up ram (the install is a VM on an HDD) and was going to move the log file to a non-tmpfs location. That config option seems to have gone.

Am I correct?
User avatar
johnvick
Legend
Posts: 693
Joined: Wed Jun 08, 2016 11:53 am
Location: New Zealand

Re: Log file options

Post by johnvick »

It's still there on my Odroid XU4, Z83 and Odroid C2 under dietpi-software.
User avatar
MichaIng
Site Admin
Posts: 2295
Joined: Sat Nov 18, 2017 6:21 pm

Re: Log file options

Post by MichaIng »

@baz123
Jep, as John suggested, either choose Log System => None in DietPi-Software + install, or even easier choose Uninstall and select DietPi-RAMlog there for uninstall.
megusta
Posts: 14
Joined: Sun Dec 30, 2018 1:16 pm

Log file options Docker?

Post by megusta »

do someone know where docker puts his logs from containers? I mean if I would add container with pihole, will pihole log to ram?
baz123
Posts: 166
Joined: Thu Jan 12, 2017 9:23 pm

Re: Log file options

Post by baz123 »

Thanks, I was sure it used to be in settings!
User avatar
MichaIng
Site Admin
Posts: 2295
Joined: Sat Nov 18, 2017 6:21 pm

Re: Log file options

Post by MichaIng »

We probably should add it there (as well). It's sometimes no a trivial question where to put settings, of those require some APT install/uninstall as well and the related software title is available in DietPi-Software.

E.g. Samba and NFS client can be installed with DietPi-Software but as well enabled simply via DietPi-Drive_Manager.
In case of logging it's the rsyslog+logrotate packages and a not too trivial step when disabling RAMlog, so that all log files in tmpfs are stored to disk on shutdown and loaded into /var/log on next boot (which is no tmpfs anymore then), so they are not lost.

However I aim to remove rsyslog+logrotate from logging options actually. It is simply doubled/obsolete with systemd-journald / journalctl. Instead it makes more sense to allow making journald logs persistent, if RAMlog is disabled, which can be simply done via mkdir /var/log/journal. Some 3rd party packages require/expect rsyslog, but as well it is theoretically independent from /var/log being tmpfs or not. Only minor issue is the quite verbose log of rsyslog that then fills RAM quite much. But with hourly clearing there should be not risk it gets full. And logrotate of course does not make any sense with RAMlog.
User avatar
MichaIng
Site Admin
Posts: 2295
Joined: Sat Nov 18, 2017 6:21 pm

Re: Log file options

Post by MichaIng »

@megusta
Container logs are by default at: /mnt/dietpi_userdata/docker-data/containers/[Container ID]/[Container ID]-json.log

You can move them to journald/journalctl (RAM) as well: https://github.com/MichaIng/DietPi/issues/2388
megusta
Posts: 14
Joined: Sun Dec 30, 2018 1:16 pm

Re: Log file options

Post by megusta »

MichaIng wrote: Sun Jun 23, 2019 6:14 pm @megusta
Container logs are by default at: /mnt/dietpi_userdata/docker-data/containers/[Container ID]/[Container ID]-json.log

You can move them to journald/journalctl (RAM) as well: https://github.com/MichaIng/DietPi/issues/2388
thx
Post Reply