I want to use the logger command in order to write logs to /var/log/server.log
NOTE: These examples use the FreeBSD version of logger. Your system may have different options, so read your local documentation!
logger -p INFO -f /var/log/server.log -t MY_LOG_TAG "server is up"
This suppose to send the message to be logged in /var/log/server.log with the info, It includes a tag (-t MY_LOG_TAG), which is included in each line.
but the syntax with the logger not append the log to /var/log/server.log
please advice what is wring with the logger syntax ?
second is it possible to add the date in the log line ?
Wed Mar 6 18:16:54 UTC 2019 INFO server is up