The third argument of the *log module is said to set a relative path where to store logs. It would be relative to one of the following depending on how the module is loaded.
global: ~/.znc/moddata/log/
user: ~/.znc/users/$USER/moddata/log/
network: ~/.znc/users/$USER/networks/$NETWORK/moddata/log/
I will refer to this path as BASE_PATH below
Based on above when giving an argument of $WINDOW, one would expect the log to be created at BASE_PATH/$WINDOW/. However, the observed behavior is BASE_PATH/$WINDOW/DEFAULT_PATH. DEFAULT_PATH being one of the paths defined in the wiki page.
The third argument of the *log module is said to set a relative path where to store logs. It would be relative to one of the following depending on how the module is loaded.
global: ~/.znc/moddata/log/
user: ~/.znc/users/$USER/moddata/log/
network: ~/.znc/users/$USER/networks/$NETWORK/moddata/log/
I will refer to this path as `BASE_PATH` below
Based on above when giving an argument of `$WINDOW`, one would expect the log to be created at `BASE_PATH/$WINDOW/`. However, the observed behavior is `BASE_PATH/$WINDOW/DEFAULT_PATH`.
`DEFAULT_PATH` being one of the paths defined in the wiki page.
<!-- github-sync-id:437477652 -->
Uhm. What exactly do you expect when you give a directory name as the path to log to? The module needs a file name to write to.
Specifically, this code happens:
https://github.com/znc/znc/blob/09a514ba02c6f0285ac3738b15a0adcd860af85f/modules/log.cpp#L364-L392
When the given path is a folder or does not contain `$USER` / `$WINDOW` / `$NETWORK` (depending on which level the module is loaded on), then append the default file name and path to the given log path.
<!-- github-comment-id:486931133 -->
I also tried that. When giving %Y-%m-%d.log as an argument to *log loaded in global settings. Log files are created here: ~/.znc/moddata/log/2019-04-26.log/newdimension/freenode/#znc
Edit: Are saying that the path needs to have the following?
Global requires $USER, $WINDOW AND $NETWORK
Network requires $WINDOW
User requires $WINDOW and $NETWORK
Edit 2: Above confirmed. Ended up using an argument of $NETWORK_$USER/$WINDOW.log to minimize nesting. Is there a way to strip $WINDOW of the quotes? I'm getting '#znc.log'
I also tried that. When giving `%Y-%m-%d.log` as an argument to *log loaded in global settings. Log files are created here: `~/.znc/moddata/log/2019-04-26.log/newdimension/freenode/#znc`
Edit: Are saying that the path needs to have the following?
Global requires $USER, $WINDOW AND $NETWORK
Network requires $WINDOW
User requires $WINDOW and $NETWORK
Edit 2: Above confirmed. Ended up using an argument of `$NETWORK_$USER/$WINDOW.log` to minimize nesting. Is there a way to strip $WINDOW of the quotes? I'm getting `'#znc.log'`
<!-- github-comment-id:486931964 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The third argument of the *log module is said to set a relative path where to store logs. It would be relative to one of the following depending on how the module is loaded.
global: ~/.znc/moddata/log/
user: ~/.znc/users/$USER/moddata/log/
network: ~/.znc/users/$USER/networks/$NETWORK/moddata/log/
I will refer to this path as
BASE_PATHbelowBased on above when giving an argument of
$WINDOW, one would expect the log to be created atBASE_PATH/$WINDOW/. However, the observed behavior isBASE_PATH/$WINDOW/DEFAULT_PATH.DEFAULT_PATHbeing one of the paths defined in the wiki page.Uhm. What exactly do you expect when you give a directory name as the path to log to? The module needs a file name to write to.
Specifically, this code happens:
https://github.com/znc/znc/blob/09a514ba02c6f0285ac3738b15a0adcd860af85f/modules/log.cpp#L364-L392
When the given path is a folder or does not contain
$USER/$WINDOW/$NETWORK(depending on which level the module is loaded on), then append the default file name and path to the given log path.I also tried that. When giving
%Y-%m-%d.logas an argument to *log loaded in global settings. Log files are created here:~/.znc/moddata/log/2019-04-26.log/newdimension/freenode/#zncEdit: Are saying that the path needs to have the following?
Global requires $USER, $WINDOW AND $NETWORK
Network requires $WINDOW
User requires $WINDOW and $NETWORK
Edit 2: Above confirmed. Ended up using an argument of
$NETWORK_$USER/$WINDOW.logto minimize nesting. Is there a way to strip $WINDOW of the quotes? I'm getting'#znc.log'That's your bash's autocompletion. It's not part of filename. You can confirm with
ls.