Add shutdown reason to logs?

I was reading the shutdown man page and I noticed this paragraph:

Code:
At shutdown time    a message is written to    the system log,    containing the
       time of shutdown, the person who    initiated the shutdown and the reason.

I’ve always been interested about this part, because in the past I have worked with routers based on Linux where there was a reboot or a shutdown script that would allow you to enter the reason why you’re doing the shutdown and that would be logged.

is there a native or out of the box way to do this with the poweroff command? or the only way I have is to create a script that will prompt for a user input and then log it into Messages.log and then run the shutdown command ?
 
Code:
SYNOPSIS
     shutdown [-] [-c | -f | -h | -p | -r | -k] [-o [-n]] [-q] time
              [warning-message ...]
shutdown(8)

# shutdown -r now "System will reboot now"

Code:
Jul 29 09:45:25 fbsd-test shutdown[79675]: reboot by dice: System will reboot now
 
Back
Top