Reputation: 4595
I am using an expect script to login into a machine via serial console and reboot the machine.
I can see all the logs on terminal. Is there a way these logs are moved into log file and only display FAILURE or SUCCESS ?
Thanks for your time
Upvotes: 1
Views: 249
Reputation: 881
1.
# disable log output to stdout
log_user 0
# send/expect dialogue is logged to my.log
# The -a flag forces output to be logged
# that was supressed by the log_user command.
log_file -a my.log
send_user
or send_tty
Upvotes: 2