Page 1 of 1

How can logging be disabled?

Posted: 05 Jul 2018 00:46
by MANIAC
How can I prevent logs from being written to disk when using a Linux install?

Re: How can logging be disabled?

Posted: 05 Jul 2018 08:24
by echelon
Hi

2 possibilities, more or less like you want it:
1. use memory disk for logs
2. use logrotate to keep only 1 day

Or you can reduce the loglevel of i2p itself on http://127.0.0.1:7657/configlogging and for wrapper you need to look out for wrapper.conf.

echelon

Re: How can logging be disabled?

Posted: 08 Jul 2018 23:44
by MANIAC
Thanks echelon, I got things working.

Since I needed some help with this, here are some notes for other users:

I2P will fail to start if the log directory is missing. I had problems symlinking this directory to /dev/null, but it might have been because of user error. If you want to create a tmpfs with fstab, you want to recreate the folder path and set the uid and gid permissions. If you do a tmpfs for the whole /var/log directory, I2P will fail because it needs its folder to exist already. By default, tmpfs partitions are set to half of the available RAM, so you may want to choose a size the fstab entry. I think 10-20M would be fine, but I'm open to corrections. A tmpfs partition won't use any space unless it's needed. Here's an example for I2P running as a service:

Code: Select all

tmpfs	/var/log/i2p	tmpfs	nodev,nosuid,size=10M,uid=i2psvc,gid=i2psvc	0	0
Another log is eventlog.txt in I2P's i2p-config directory. I found I could symlink it to /dev/null without problems after deleting the real file.

Code: Select all

ln -s /dev/null eventlog.txt