Artificial intelligent assistant

how to use logger to write info to log 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 ?** **expected output** Wed Mar 6 18:16:54 UTC 2019 INFO server is up

You have misunderstood the `-f` option.

From the FreeBSD `logger(1)` manual:

> `-f file`
>
> Read the contents of the specified file into syslog. This option is ignored when a message is also specified.

The `logger` utility will send the message to the syslog service (by default on the local machine) and depending on its configuration and the priority/tag of the message, it will be appended to one or several log files. You can't log to a _specific_ log file without configuring syslog to treat your log messages specially.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 86cd3d79339f3ef92edd6c98c357a4d4