summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorIulian Dragos <jaguarul@gmail.com>2016-10-19 14:32:38 +0200
committerIulian Dragos <jaguarul@gmail.com>2016-10-25 15:41:26 +0200
commit614f3de8ec09bc1d1e8b309cc0851345c7f1390d (patch)
tree5a8ee915a19bbc15a420227dc246ae399f910b2e /src/compiler
parentf66ed4d4f798fa693f87702769252ddfc6b81cf3 (diff)
downloadscala-614f3de8ec09bc1d1e8b309cc0851345c7f1390d.tar.gz
scala-614f3de8ec09bc1d1e8b309cc0851345c7f1390d.tar.bz2
scala-614f3de8ec09bc1d1e8b309cc0851345c7f1390d.zip
[backport] Replace println with log calls in BrowsingLoaders
This alternative symbol loader is used in the presentation compiler and may generate output even when the compiler should be silent. See SI-8717 for more context, even though this does not really fix the ticket.
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/symtab/BrowsingLoaders.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/BrowsingLoaders.scala b/src/compiler/scala/tools/nsc/symtab/BrowsingLoaders.scala
index c2d0f5ccec..d3c7ba4d76 100644
--- a/src/compiler/scala/tools/nsc/symtab/BrowsingLoaders.scala
+++ b/src/compiler/scala/tools/nsc/symtab/BrowsingLoaders.scala
@@ -87,16 +87,16 @@ abstract class BrowsingLoaders extends GlobalSymbolLoaders {
if (packagePrefix == root.fullName) {
enterClass(root, name.toString, new SourcefileLoader(src))
entered += 1
- } else println("prefixes differ: "+packagePrefix+","+root.fullName)
+ } else log("prefixes differ: "+packagePrefix+","+root.fullName)
case ModuleDef(_, name, _) =>
if (packagePrefix == root.fullName) {
val module = enterModule(root, name.toString, new SourcefileLoader(src))
entered += 1
if (name == nme.PACKAGEkw) {
- println("open package module: "+module)
+ log("open package module: "+module)
openPackageModule(module, root)
}
- } else println("prefixes differ: "+packagePrefix+","+root.fullName)
+ } else log("prefixes differ: "+packagePrefix+","+root.fullName)
case _ =>
}
}
@@ -121,7 +121,7 @@ abstract class BrowsingLoaders extends GlobalSymbolLoaders {
browseTopLevel(root, src)
} catch {
case ex: syntaxAnalyzer.MalformedInput =>
- println("[%s] caught malformed input exception at offset %d: %s".format(src, ex.offset, ex.msg))
+ log(s"[$src] caught malformed input exception at offset ${ex.offset}: ${ex.msg}")
super.enterToplevelsFromSource(root, name, src)
}
}