Skip to content

Reduce verbosity of logs. #110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 4, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/dotty/tools/dotc/transform/Splitter.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Splitter extends TreeTransform {
/** Replace self referencing idents with ThisTypes. */
override def transformIdent(tree: Ident)(implicit ctx: Context, info: TransformerInfo) = tree.tpe match {
case ThisType(cls) =>
println(s"owner = ${ctx.owner}, context = ${ctx}")
ctx.debuglog(s"owner = ${ctx.owner}, context = ${ctx}")
This(cls) withPos tree.pos
case _ => tree
}
Expand Down
5 changes: 2 additions & 3 deletions test/test/DottyTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,17 @@ class DottyTest {
val base = new ContextBase
import base.settings._
val ctx = base.initialCtx.fresh
.setSetting(verbose, true)
//.setSetting(verbose, true)
// .withSetting(debug, true)
// .withSetting(debugTrace, true)
// .withSetting(prompt, true)
.setSetting(Ylogcp, true)
//.setSetting(Ylogcp, true)
.setSetting(printtypes, true)
.setSetting(pageWidth, 90)
.setSetting(log, List("<some"))
// .withTyperState(new TyperState(new ConsoleReporter()(base.initialCtx)))

// .withSetting(uniqid, true)
println(ctx.settings)
base.definitions.init(ctx)
ctx
}
Expand Down
2 changes: 1 addition & 1 deletion test/test/ShowClassTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import org.junit.Test
class ShowClassTests extends DottyTest {

def debug_println(msg: => Any) = {
if (!sys.props.isDefinedAt("dotty.travis.build"))
if (sys.props.isDefinedAt("test.ShowClassTests.verbose"))
println(msg)
}

Expand Down
1 change: 0 additions & 1 deletion test/test/transform/CreateCompanionObjectsTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class CreateCompanionObjectsTest extends DottyTest {
override def name: String = "test"
}
val transformed = transformer.transform(tree).toString
println(transformed)
val classPattern = "TypeDef(Modifiers(,,List()),A,"
val classPos = transformed.indexOf(classPattern)
val moduleClassPattern = "TypeDef(Modifiers(final module <synthetic>,,List()),A$"
Expand Down