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

logging output path #19

Open
selfuryon opened this issue Dec 6, 2017 · 6 comments
Open

logging output path #19

selfuryon opened this issue Dec 6, 2017 · 6 comments

Comments

@selfuryon
Copy link
Contributor

Hello! I found some configurable variables in this package. This is really helpful! But I found that path in this variables should exist before you can drop off the logs by this path.
It will be really fine if I can only specify the full path like "%Y-%m-%d/#{session_name}.log" without manual creating "%Y-%m-%d" folders.
Can you make it?

@selfuryon
Copy link
Contributor Author

Right now I use this configuration:

set -g @logging-path '$HOME/logs'
set -g @logging-filename "%Y-%m-%d_#{session_name}-#{window_index}-#{pane_index}.log"

But I should create logs folder manually. And I just want to use config like this:

set -g @logging-path '$HOME/logs/%Y-%m-%d'
set -g @logging-filename "#{session_name}-#{window_index}-#{pane_index}.log"

@selfuryon
Copy link
Contributor Author

I have found that variables which used are not expanded. Example in my config will be like "$HOME/logs/%Y-%m-%d" not like "/home/user/logs/2017-12-07". So the simple try to add after this sentence only mkdir -p "${logging_path}" doesn't work =\ and eval "$logging_path" works only for $HOME not for "%Н-%m-%d"

@bruno-
Copy link
Member

bruno- commented Dec 14, 2017

Hey,

I'd accept a PR for this feature.

@selfuryon
Copy link
Contributor Author

Ok, I will try to add this feature and after I make PR.

@selfuryon
Copy link
Contributor Author

I have just added new PR #20

@selfuryon
Copy link
Contributor Author

Can anyone check my PR? :) It's very simple

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

No branches or pull requests

2 participants