- Introduce `tmux_logger` app for categorized output - Implement pane logging via `tmux pipe-pane` - Add `log`, `logpath`, `logreset` options to panes - Update `Pane` struct with logging state and cleanup - Refactor `logger.new` to use `LoggerFactoryArgs`
18 lines
295 B
V
18 lines
295 B
V
module logger
|
|
|
|
import freeflowuniverse.herolib.core.pathlib
|
|
|
|
// Logger Factory
|
|
pub struct LoggerFactoryArgs {
|
|
pub mut:
|
|
path string
|
|
}
|
|
|
|
pub fn new(args LoggerFactoryArgs) !Logger {
|
|
mut p := pathlib.get_dir(path: args.path, create: true)!
|
|
return Logger{
|
|
path: p
|
|
lastlog_time: 0
|
|
}
|
|
}
|