add trails-tail-log function