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

zfswatcher does not create directory for logs #10

Open
vlambaard opened this issue Mar 13, 2019 · 4 comments
Open

zfswatcher does not create directory for logs #10

vlambaard opened this issue Mar 13, 2019 · 4 comments

Comments

@vlambaard
Copy link

vlambaard commented Mar 13, 2019

Hi, I receive the following notification when I do zfswatcher -t

zfswatcher -t

2019-03-12 23:12:26 [NOTIFIER] error opening log file: open /var/log/zfswatcher/zfswatcher.log: no such file or directory

If you create the directory manually and restart it logs to the file.

OS is Debian 9.7

@rouben
Copy link
Owner

rouben commented Mar 17, 2019

AFAIK most software does not create directories for log files; it's up to the package to do this... do you think it's better to fix this in the package post-install/reconfigure script?

@Nozzie
Copy link

Nozzie commented Mar 15, 2022

I also noticed this. When I do a 'make install', I expect to get a functioning program. But zfswatcher won't start without a valid log location.
Same goes for the systemd zfswatcher.service file, it is provided in the etc dir, but it is not copied. Although that might be more difficult to fix since you have to take different systems into account.

@rouben
Copy link
Owner

rouben commented Mar 15, 2022

I was hesitant to just assume something like /var/log/zfswatcher as the default path for logs. Is this consistent across all platforms that zfswatcher supports (e.g. Solaris/Illumos, *BSD, etc)?

I suppose if it's hard-coded in the config as a default, there's no harm in this assumption. The onus would be on the end-user to ensure that if they move the log file location, they would need to ensure that the path in the new location exists and is writable by the zfswatcher process.

With regards to systemd unit files, I think the location of those is safer to presume since systemd is unique to Linux and is not supported on *BSD or Solaris/Illumos. So if anyone wants to test the systemd unit files and confirm that they work, we can put them in the make install and the RPM/DEB packages.

@Danoontjes
Copy link

I have been using the zfswatcher.service file provided in the etc/ dir of this repo It works just fine.
Maybe change the Documentation line, it still points to http://zfswatcher.damicon.fi/

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

No branches or pull requests

4 participants