croservices / cro-core

The heart of the Cro library for building distributed systems in Raku, including pipeline composition and TCP support.
https://cro.services/
Artistic License 2.0
27 stars 9 forks source link

what is the best way to log? #32

Open melezhik opened 3 years ago

melezhik commented 3 years ago

In mybfio cro app I just use naive(?) approach say "log message" howevere my messages are not appeared in stdout ( buffering ? ) straight way, and sometime only appear when I restart cro app ... weird enough

Maybe I just use it wrong and I have to utilize another ( cro? ) method for logging

I run my app as

nohup cro run > cro.log &
jnthn commented 3 years ago

Turn off output buffering in your service entry script (.out-buffer = False for $*OUT, $*ERR;). If we someday get a PTY implementation then the cro running will totally use it (I'm hoping libuv might do it and then we just have to expose it.)

melezhik commented 3 years ago

Thanks, I will try