我可以将服务日志发送到文件引用-Redirect the output of systemd service to a file
但是如何将systemd服务的输出重定向到syslogIdentifier
SyslogIdentifier可用于弹性拍子中以获取实时日志和许多其他情况。
主要是我的用例是从所有产品,开发人员和测试环境中获取弹性搜索中的实时日志。
您只需要添加一行-
[Unit]
.
.
[Service]
.
.
SyslogIdentifier = <YourAppName>
.
.
[Install]
.
.