Hi Only had time for a quick look but a few things:
- Don't add new calls to status_replace please. Use format API directly instead. - These option names aren't great. How about automatic-log and automatic-log-format (or automatic-log-file)? - The hunk in cmd_set_option_exec is ridiculously nested and way over the 80 column line length. If you use a helper function it should be fine. - In the same part, do not remove options the user set on windows when the global option is changed, just leave them alone and don't change the logging state for that window. You can just call option_get_number on w->options and it'll give you the global if the window option is not set. - In cmd_split/new_window_exec you shouldn't call cmdq_error and then not return an error. Either clean up and make the command fail, or change it to cmdq_info. - Why do you need cmd_string_expand_path? Isn't this already done when the set-option command is parsed? If not either it should be or variable expansion should be added for all string options not just one. - I'd rather avoid any new files. These functions are small and used once, they can go somewhere else. - Can't the logging fd use a bufferevent too? On Mon, Aug 19, 2013 at 11:31:20PM -0500, J Raynor wrote: > I've attached a new patch that implements logging without adding a new > command and without touching pipe-pane. > > There's a window option called logging-default-logname that's set to > "~/tmux-#S-#I-#P.log" by default. That's what name logfiles will get > when they get created. I mainly needed a string that would help me > see that status_replace() was working correctly. If you'd prefer > something else (you mentioned #{pane_id}), go ahead and change it. > > There's also a window option called logging-autolog. It's off by default. > > If you "set logging-autolog 1", then all panes in the window will > begin logging, and any new panes in the window will log automatically. > > If you "set logging-autolog 0", then all panes in the window will stop > logging, and any new panes in the window will not log. > > If you "set -g logging-autolog 1", then all panes in all windows in > all sessions will begin logging, and any new panes will log > automatically. > > If you "set -g logging-autolog 0", then all panes in all windows in > all sessions will stop logging, and any new panes will not log. > > > > When you set most options, there's just an update to the options > table. But for "automatic-rename" an action is carried out. I used > the same idea for doing the logging. ------------------------------------------------------------------------------ Introducing Performance Central, a new site from SourceForge and AppDynamics. Performance Central is your source for news, insights, analysis and resources for efficient Application Performance Management. Visit us today! http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk _______________________________________________ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users