Include imports in the GraphStage logging snippets (#23378)
This commit is contained in:
parent
d083fcffd8
commit
aec87a94c4
2 changed files with 10 additions and 3 deletions
|
|
@ -9,7 +9,13 @@ import akka.stream.Attributes;
|
|||
import akka.stream.Materializer;
|
||||
import akka.stream.Outlet;
|
||||
import akka.stream.SourceShape;
|
||||
import akka.stream.stage.*;
|
||||
//#stage-with-logging
|
||||
import akka.stream.stage.AbstractOutHandler;
|
||||
import akka.stream.stage.GraphStage;
|
||||
import akka.stream.stage.GraphStageLogic;
|
||||
import akka.stream.stage.GraphStageLogicWithLogging;
|
||||
|
||||
//#stage-with-logging
|
||||
import jdocs.AbstractJavaTest;
|
||||
import org.junit.Test;
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import java.util.concurrent.ThreadLocalRandom
|
|||
|
||||
import akka.stream._
|
||||
import akka.stream.scaladsl._
|
||||
import akka.stream.stage.{ GraphStage, GraphStageLogic, OutHandler, StageLogging }
|
||||
import akka.testkit.{ AkkaSpec, EventFilter }
|
||||
|
||||
class GraphStageLoggingDocSpec extends AkkaSpec("akka.loglevel = DEBUG") {
|
||||
|
|
@ -16,6 +15,8 @@ class GraphStageLoggingDocSpec extends AkkaSpec("akka.loglevel = DEBUG") {
|
|||
implicit val ec = system.dispatcher
|
||||
|
||||
//#stage-with-logging
|
||||
import akka.stream.stage.{ GraphStage, GraphStageLogic, OutHandler, StageLogging }
|
||||
|
||||
final class RandomLettersSource extends GraphStage[SourceShape[String]] {
|
||||
val out = Outlet[String]("RandomLettersSource.out")
|
||||
override val shape: SourceShape[String] = SourceShape(out)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue