Skip to content

Conversation

@isaias
Copy link
Contributor

@isaias isaias commented Aug 20, 2014

Note about tests: The best way to write tests for Log is use the TestEventListener and EventFilter of Akka, but the current Actors aren't using default ActorLogging and the current configuration are outputting results to a file instead STDOUT.

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@rxin
Copy link
Contributor

rxin commented Aug 20, 2014

Why don't we just change ActorLogReceive to log messages not defined in the partial function?

@isaias
Copy link
Contributor Author

isaias commented Aug 20, 2014

@rxin, the trait ActorLogReceive gets the concrete implementation through receiveWithLogging function overriding of implementing Actor and applying it, so I think that on trait I can't identify the unhandled message of concrete implementation. Maybe I'm missing something, but I'll review.

BR

@rxin
Copy link
Contributor

rxin commented Aug 20, 2014

You just need to change

    override def isDefinedAt(o: Any): Boolean = _receiveWithLogging.isDefinedAt(o)

to

    override def isDefinedAt(o: Any): Boolean = {
      val handled = _receiveWithLogging.isDefinedAt(o)
      if (!handled) {
        log ...
      }
      handled
    }

@isaias
Copy link
Contributor Author

isaias commented Aug 20, 2014

@rxin Very nice, it works. Should be better to close this PR and send another just with the trait changes?

BR

@rxin
Copy link
Contributor

rxin commented Aug 20, 2014

Sure.

@isaias
Copy link
Contributor Author

isaias commented Aug 20, 2014

Thanks

@isaias isaias closed this Aug 20, 2014
@isaias isaias deleted the SPARK-2312 branch August 20, 2014 08:19
asfgit pushed a commit that referenced this pull request Apr 15, 2015
The  previous solution has changed based on #2048 discussions.

Author: Isaias Barroso <[email protected]>

Closes #2055 from isaias/SPARK-2312 and squashes the following commits:

f61d9e6 [Isaias Barroso] Change Log level for unhandled message to debug
f341777 [Isaias Barroso] [SPARK-2312] Logging Unhandled messages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants