0

我为我的应用程序创建了一个服务文件并通过systemctl start app. 问题是当我使用时,journalctl -fe /opt/app我看到每个事件有两行:

Oct 21 18:48:18 test /opt/app[18010]: INFO  [db.InitializeMongo.func1:157] - mongo: try to connect to [127.0.0.1:27017]/app
Oct 21 18:48:18 test app[18010]: 2021-10-21 18:48:18 INFO  [db.InitializeMongo.func1:157] - mongo: try to connect to [127.0.0.1:27017]/app
Oct 21 18:48:18 test /opt/app[18010]: INFO  [db.InitializeMongo.func1:172] - mongo: OK
Oct 21 18:48:18 test app[18010]: 2021-10-21 18:48:18 INFO  [db.InitializeMongo.func1:172] - mongo: OK
Oct 21 18:48:18 test /opt/app[18010]: INFO  [utils.StartHttpServer.func1:21] - http: start server on '0.0.0.0:8080'
Oct 21 18:48:18 test app[18010]: 2021-10-21 18:48:18 INFO  [utils.StartHttpServer.func1:21] - http: start server on '0.0.0.0:8080'
4

0 回答 0