sent/received messages excluding the deathwatch heartbeats?

74 views
Skip to first unread message

Sam Halliday

unread,
Jan 16, 2015, 12:41:55 PM1/16/15
to akka...@googlegroups.com
Hi all,

I'm trying to debug a remoting issue and I need to look at the logs of the messages that are sent.

However, the logs are completely filled up with the send/receive of deathwatch messages.

Without turning off deathwatch, is there any way to exclude it from the logs?

Latest akka stable, logging config looks like

akka {
  remote {
    log-sent-messages = on
    log-received-messages = on
    log-frame-size-exceeding = 1000b

    log-remote-lifecycle-events = off

    watch-failure-detector {
      # Our timeouts can be so high, the PHI model basically doesn't
      # know what to do, so just use a single timeout. 
      acceptable-heartbeat-pause = 60 s
    }
  }

  actor {
    debug {
      receive = on
      #autoreceive = on
      #lifecycle = on
      #fsm = on
      #event-stream = on
      unhandled = on
    }
}

Sam Halliday

unread,
Jan 19, 2015, 5:02:39 AM1/19/15
to akka...@googlegroups.com
Is this something that would be suitable for an RFE?

More generally it would be good to have an option to only log userland messages in remoting.

Martynas Mickevičius

unread,
Jan 21, 2015, 11:29:07 AM1/21/15
to akka...@googlegroups.com
Hi Sam,

you can use custom event listener to display the log messages that you are interested in.

Here you can find a simple example demonstrating that. And there is a documentation section explaining this. 

--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+...@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.



--
Martynas Mickevičius
TypesafeReactive Apps on the JVM

Patrik Nordwall

unread,
Jan 21, 2015, 4:37:10 PM1/21/15
to akka...@googlegroups.com
You could also use slf4j logger and define the filter in the logback config (or whatever impl you prefer).

An alternative; use grep/egrep to filter out the relevant information from the log file after the fact.

/Patrik

Sam Halliday

unread,
Jan 22, 2015, 4:55:04 PM1/22/15
to akka...@googlegroups.com
Thanks Martynas,

It's a shame that this would be needed. It feels very much like the heartbeats should be considered part of the system layer when it comes to logging, and therefore already filtered. Seeing heartbeats when debugging makes it incredibly difficult to see anything.

My concern with a custom logger like this is that it will quickly get out of sync with the stock one and I might be missing out on various performance/bug fixes as akka is released. That said, the ability to see genuine messages in the logs when debugging is invaluable, so it might be worth it.

Sam Halliday

unread,
Jan 22, 2015, 6:09:29 PM1/22/15
to akka...@googlegroups.com
Thanks Patrik,

That's always an option with logback, but I'd rather not have to go there.

Grep in this case is not an option as the logs are coming through in a
Jenkins console and very noisy. I'd like to be able to just read it
off. The custom event handler sounds like it might be a good option
but I'd also like you to consider making logging heartbeat messages
optional as the value in seeing them is really rather low compared to
being able to see our domain messages.

Best regards,
Sam
> You received this message because you are subscribed to a topic in the
> Google Groups "Akka User List" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/akka-user/FbpqhhBZfKY/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
Reply all
Reply to author
Forward
0 new messages