znc-log-viewer icon indicating copy to clipboard operation
znc-log-viewer copied to clipboard

Make log directory configurable/Support different log module scope

Open Topy44 opened this issue 7 years ago • 5 comments

I loaded the log module for the user, not for each network seperately. This makes the log directory ~/.znc/users/$USER/moddata/log/ instead of ~/.znc/users/$USER/networks/$NETWORK/moddata/log/. There is also the option of loading the module globally, in which case the logs are in ~/.znc/moddata/log/. It would be useful to support these options. It is also possible to install ZNC in a custom directory, in which case it would not be in ~/.znc, this should also be supported. It should support a command line parameter and, ideally, some kind of persistent configuration, through a config file or environment variables.

Topy44 avatar Aug 09 '17 09:08 Topy44

The home directory is defined here:

https://github.com/robinsmidsrod/znc-log-viewer/blob/master/bin/znc-log-viewer#L66

Does ZNC install any configuration or environment variables that would make it possible for us to find its configuration directory if it is non-standard? If so, that function could be improved to find that. Patches are welcome for that.

I thought that if you load the log module in these other levels it doesn't log the same content as the log module under networks. I might be mistaken, but I'd like to know if the contents of those logs are the same or not. If it is the same, what kind of logic would you propose to look for those files as well or instead of the existing ones (under networks/)?

robinsmidsrod avatar Aug 09 '17 09:08 robinsmidsrod

I am about to leave for two weeks, I am happy to look into it when I am back. I do not know Perl, so I am afraid I cannot author a patch myself, but I will gladly help out with any information required.

Topy44 avatar Aug 09 '17 09:08 Topy44

Well, if you can help me with the exact logic I'm sure I should be able to figure something out. Have a nice vacation. Ping me in here when you're back.

robinsmidsrod avatar Aug 09 '17 10:08 robinsmidsrod

Hi, I happen to be having the same issue. I've enabled logging globally instead of by network. Please let me know what I can do to help get this resolved.

PatrickBostwick avatar Aug 10 '17 06:08 PatrickBostwick

@PatrickBostwick Adding a sample of what is in that log file and the exact path relative to the ~/.znc directory would be useful. If you have multiple log files then all of them would be useful to have listed.

robinsmidsrod avatar Aug 10 '17 12:08 robinsmidsrod