asynkron / protoactor-go

Proto Actor - Ultra fast distributed actors for Go, C# and Java/Kotlin
http://proto.actor
Apache License 2.0
5.04k stars 523 forks source link

redirect output log #193

Open notdodo opened 6 years ago

notdodo commented 6 years ago

Hi!

Is it possibile to redirect the output of actor logging to stderr or to a file? Something like log.SetOutput(iow).

The problem: using a tui (i.e.: https://github.com/jroimartin/gocui) I cannot redirect or capture the output of the actor log.

EDIT: forgot to mention that I'd prefer a solution using the library instead of redirect the output to another file descriptor (i.e. ./run >& log.txt)

hulucc commented 3 years ago

I need this too.

cupen commented 3 years ago

You can make a pr for it. https://github.com/AsynkronIT/protoactor-go/blob/dev/log/string_encoder.go#L23

coverthesea commented 3 years ago

I also need this,Logs cannot be integrated into my business. I suggest that can set a logger ,this logger has "debug,info,error..." interface