tmux-logging icon indicating copy to clipboard operation
tmux-logging copied to clipboard

logging output path

Open selfuryon opened this issue 8 years ago • 6 comments

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 avatar Dec 06 '17 19:12 selfuryon

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 avatar Dec 06 '17 20:12 selfuryon

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"

selfuryon avatar Dec 06 '17 22:12 selfuryon

Hey,

I'd accept a PR for this feature.

bruno- avatar Dec 14 '17 11:12 bruno-

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

selfuryon avatar Dec 14 '17 13:12 selfuryon

I have just added new PR #20

selfuryon avatar Dec 17 '17 21:12 selfuryon

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

selfuryon avatar Dec 25 '17 08:12 selfuryon