Implementor Erelei Posted November 18, 2017 Implementor Report Share Posted November 18, 2017 Add this to your script init .tin file: #event {SESSION CONNECTED} { #script {logFilePath} {date +'logs/%Y/%B/%d/'}; #script {logFileName} {date +'%I_%M%p.log'}; #system {mkdir -p ${logFilePath[1]}}; #log {overwrite} {${logFilePath[1]}${logFileName[1]}} } This will create logs with the following setup: [:~/tintin/scripts] $ cd logs [:~/tintin/scripts/logs] $ ls 2014 2015 2016 2017 [:~/tintin/scripts/logs] $ cd 2017 [:~/tintin/scripts/logs/2017] $ ls August February January June March November September [:~/tintin/scripts/logs/2017] $ cd November [:~/tintin/scripts/logs/2017/November] $ ls 01 [:~/tintin/scripts/logs/2017/November] $ cd 01 [:~/tintin/scripts/logs/2017/November/01] $ ls 01_49AM.log 01_53AM.log [:~/tintin/scripts/logs/2017/November/01] $ If you are using wintin, this will have to be modified to use windows folder creation commands and directory posix. 1 Link to comment Share on other sites More sharing options...
Recommended Posts