Github user pwendell commented on a diff in the pull request: https://github.com/apache/spark/pull/332#discussion_r11330919 --- Diff: core/src/main/scala/org/apache/spark/Logging.scala --- @@ -30,65 +30,66 @@ trait Logging { // Make the log field transient so that objects with Logging can // be serialized and used on another machine @transient private var log_ : Logger = null + @transient protected var logName_ : String = null --- End diff -- It might be cleaner to do this: ``` protected def logName = { var className = this.getClass.getName // Ignore trailing $'s in the class names for Scala objects if (className.endsWith("$")) { className = className.substring(0, className.length - 1) } className } ``` Then let subclasses override that function. Then below you could just have: ``` log_ = Logger(LoggerFactory.getLogger(logName)) ```
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---