1

I have test file like this

class SomeSpec extends Specification with Specs2RouteTest with SomeService

where I have written test cases, its workiing fine.

But I am not able to get log messages in log file, so I need to have logging in that spec, now we can do this by using

class SomeSpec extends Specification with Specs2RouteTest with 
SomeService with ActorLogging with Actor 

my problem is I dont want to use akka.actor.ActorLogging without using it, I want to get logs of specss in log file, so can you suggest some other way for it.

Sanjay Rabari
  • 2,091
  • 1
  • 17
  • 32

1 Answers1

1

Just use a non-Akaa logging library like Scala Logging.

It provides several mixins so you can do something like:

class SomeSpec extends Specification with Specs2RouteTest with SomeService with LazyLogging {
  logger.debug("This is very convenient ;-)")
}
rancidfishbreath
  • 3,944
  • 2
  • 30
  • 44