除了像 http://upstart.ubuntu.com/wiki/Debugging 中建议的那样执行显式日志记录指令, 有没有一种方法可以输出 upstart 正在发生的事情?
- 引发了什么事件
- 什么服务改变了它的状态(启动/停止/停止)
- 发出了什么信号
- 服务启动时产生的输出
最佳答案
好的,我找到了一种获取它的方法:
$ sudo initctl log-priority # gives the actual (default) logging level
$ sudo initctl log-priority --help # gives available logging levels
$ sudo initctl log-priority info # is enough to get :
$ tail -f /var/log/syslog # - log of upstart events
$ tail -f /var/log/boot.log # - log of services output
关于logging - 启用 Upstart 日志输出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4335343/