Akka Stream log operator documentation fix (#27654)

* Fix Akka Stream log operator documentation example

* Keep Scala documentation example in sync
This commit is contained in:
Jakob Merljak 2019-09-10 13:24:24 +02:00 committed by Patrik Nordwall
parent a32a89b656
commit 4576835cce
2 changed files with 5 additions and 5 deletions

View file

@ -35,7 +35,7 @@ import java.util.Arrays;
// #log // #log
import akka.stream.Attributes; import akka.stream.Attributes;
import akka.stream.javadsl.Source;
// #log // #log
import java.time.Duration; import java.time.Duration;
@ -52,8 +52,8 @@ class SourceOrFlow {
.addAttributes( .addAttributes(
Attributes.createLogLevels( Attributes.createLogLevels(
Attributes.logLevelOff(), // onElement Attributes.logLevelOff(), // onElement
Attributes.logLevelError(), // onFailure Attributes.logLevelInfo(), // onFinish
Attributes.logLevelInfo())) // onFinish Attributes.logLevelError())) // onFailure
// #log // #log
; ;
} }

View file

@ -18,8 +18,8 @@ object Log {
.addAttributes( .addAttributes(
Attributes.logLevels( Attributes.logLevels(
onElement = Attributes.LogLevels.Off, onElement = Attributes.LogLevels.Off,
onFailure = Attributes.LogLevels.Error, onFinish = Attributes.LogLevels.Info,
onFinish = Attributes.LogLevels.Info)) onFailure = Attributes.LogLevels.Error))
//#log //#log
} }
} }