0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

syslogでdebug

Last updated at Posted at 2019-02-12

mruby on Yet Another Bare Metalでコンソール無しでデバッグメッセージを確認する方法です。

begin

yabm = YABM.new

addr = "10.10.10.123"
mask = "255.255.255.0"
gw = "10.10.10.3"
dns = "10.10.10.3"

yabm.netstart(addr, mask, gw, dns)

dist = "10.10.10.3"

yabm.udpinit

i = i + 1

rescue => e
  yabm.udpsend(dist, 514, e.to_s, e.to_s.length)
end

10.10.10.3のサーバのsyslogdでリモートのメッセージも取り込めるようにオプション無しで起動しておくと/var/log/messagesに(もちろんFreeBSDの場合ですが)

Feb 12 22:25:45 10.10.10.123 undefined method '+'

とでます。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?