Permalink
Browse files

fix merge conflict.

  • Loading branch information...
1 parent e9bbda1 commit 96375d8a728b4ce90b45fa56c14e2e9324218be9 @robey robey committed Jan 12, 2011
Showing with 3 additions and 13 deletions.
  1. +3 −13 src/main/scala/net/lag/logging/Logger.scala
@@ -18,7 +18,7 @@ package net.lag.logging
import java.util.{Calendar, logging => javalog}
import scala.collection.Map
-import scala.collection.mutable
+import scala.collection.{jcl, mutable}
import net.lag.configgy.ConfigMap
@@ -275,18 +275,8 @@ object Logger {
loggersCache.get(name) match {
case logger: Logger =>
logger
- case None =>
- val logger = new Logger(name, javalog.Logger.getLogger(name))
case null =>
- val manager = javalog.LogManager.getLogManager
- val logger = manager.getLogger(name) match {
- case null =>
- val javaLogger = javalog.Logger.getLogger(name)
- manager.addLogger(javaLogger)
- new Logger(name, javaLogger)
- case x: javalog.Logger =>
- new Logger(name, x)
- }
+ val logger = new Logger(name, javalog.Logger.getLogger(name))
logger.setUseParentHandlers(true)
val oldLogger = loggersCache.putIfAbsent(name, logger)
@@ -333,7 +323,7 @@ object Logger {
/**
* Iterate the Logger objects that have been created.
*/
- def elements: Iterator[Logger] = loggersCache.values
+ def elements: Iterator[Logger] = (new jcl.IterableWrapper[Logger] { val underlying = loggersCache.values() }).elements
/**
* Create a Logger (or find an existing one) and configure it according

0 comments on commit 96375d8

Please sign in to comment.