Philippus commented on code in PR #2805:
URL: https://github.com/apache/pekko/pull/2805#discussion_r3009478011


##########
stream/src/main/scala/org/apache/pekko/stream/Attributes.scala:
##########
@@ -720,6 +722,23 @@ object Attributes {
 
     /** Use to enable logging at DEBUG level for certain operations when 
configuring [[Attributes#logLevels]] */
     final val Debug: Logging.LogLevel = Logging.DebugLevel
+
+    /** INTERNAL API */
+    @InternalApi
+    private[pekko] def defaultErrorLevel(system: ActorSystem): 
Logging.LogLevel =
+      
fromString(system.settings.config.getString("pekko.stream.materializer.stage-errors-default-log-level"))
+
+    /** INTERNAL API */
+    @InternalApi
+    private[pekko] def fromString(str: String): Logging.LogLevel = {
+      Helpers.toRootLowerCase(str) match {
+        case "off"     => Off
+        case "error"   => Error
+        case "warning" => Warning
+        case "info"    => Info
+        case "debug"   => Debug
+      }
+    }

Review Comment:
   Can be done in a follow-up.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to