暴发户脚本不logging到文件

Linux CentOS 6.5

这是我在/etc/init/

 start on runlevel [2345] stop on runlevel [!2345] exec /usr/bin/riofs --fuse-options="allow_other" --fmode=0777 --dmode=0777 ct.recordergo /mnt/applications/recorder/streams/_definst_/s3 

我想在启动时运行一次这个程序。

我在/var/log/upstart里面没有任何日志。

我不确定脚本是否正常工作。 如何才能logging成功或失败?

您可以使用initctl log-priority <priority>命令启用对系统日志的debugging。

要更改Upstart将消息logging到系统日志的优先级,可以随时使用log-priority命令更改日志优先级,如下所示:

 initctl log-priority <priority> 

其中<priority>可以是下列之一:

debugging,信息,消息,警告,错误,致命

有关更多信息,请参阅http://upstart.ubuntu.com/cookbook/#debugging

Uposart在Centos中的版本非常老旧(从2010年的v0.6.5),并没有日志支持。 使用Upstart Cookbook中logging的解决方法: