[Mojolicious] Re: Event driven based on syslog messages

2019-07-05 Thread Luc Larochelle
Well thanks for taking the time to reply, I'll have a look into it. You wrote a long time ago, I was totally absorbed in a project. Best regards, Luc On Thursday, 30 May 2019 14:33:13 UTC-4, Heiko Jansen wrote: > > Sorry, completely missed your follow-up... > > I'd say the synopsis of Mojo::IOLo

[Mojolicious] Re: Event driven based on syslog messages

2019-05-30 Thread Heiko Jansen
Sorry, completely missed your follow-up... I'd say the synopsis of Mojo::IOLoop mostly shows what to do. Never tried it myself, but something along these lines should work: use Mojo::IOLoop; my $id = Mojo::IOLoop->client({ path => '/tmp/myapp.sock' } => sub { my ($loop, $err, $stream) = @_;

[Mojolicious] Re: Event driven based on syslog messages

2019-05-02 Thread Luc Larochelle
Hello Heiko, this seems absolutely right after reading a bit about it. Since I've never used Unix sockets nor Mojo::IOLoop, I'd like to double check my comprehension with you :) So rsyslogd sends output to a Unix Socket (in occurence, a file ?) and Mojo::IOLoop::Client reads its content in rea

[Mojolicious] Re: Event driven based on syslog messages

2019-04-26 Thread Heiko Jansen
Bit late to the party, but anyhow If you tell rsyslogd to send output to a socket (using omuxsock), you can then use Mojo::IOLoop::Client to connect() to a socket via the "path" argument. Afterwards you can make use of the IOLoop to process events for reading from the socket. That's what you