functions/tail-log.ps1
function get-log { param($logdir = "log", $last = 100, [switch][bool]$wait = $true) ipmo require req process $logfile = ls $logdir | sort LastWriteTime -Descending | select -first 1 $logfile | get-content -last $last -wait:$wait #| write-indented -mark "$logfile > " } add-alias tail-log get-log |