• 追加された行はこの色です。
  • 削除された行はこの色です。
* Sys::Syslog [#hd8495c5]

 use POSIX qw/setlocale LC_ALL
 use Sys::Syslog;
 
 setlocale(LC_ALL,'C');
 openlog '', {pid=>1}, 'local0'
ロケールを設定しないと、余計なタイムスタンプが書き込まれたので。
 $program = $0;
 openlog "$program $$", 'ndelay', 'user';         # 'user'もしくはLOG_USER (ファシリティ)
 syslog 'info', 'this is %s', ' a test message';  # 'info'もしくはLOG_INFO (レベル)
 closelog;

** 参考 [#cd8b8f63]
- http://search.cpan.org/perldoc?Sys::Syslog
- ファシリティ・レベル http://search.cpan.org/perldoc?Sys::Syslog#CONSTANTS


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS