ceylon / ceylon-runtime

DEPRECATED
24 stars 5 forks source link

Don’t spam stderr in debug mode #54

Closed lucaswerkmeister closed 10 years ago

lucaswerkmeister commented 10 years ago

When running the following simple program in debug mode in the IDE...

shared void run() {
    print("Hello, ``process.arguments.first else "World"``!");
}

... you get over two thousand (2365) lines of debug output like

Note: Ceylon home directory is '/home/lucas/git/ceylon/ceylon-dist/dist' 
Note: path = /home/lucas/.eclipse/org.eclipse.platform_4.3.0_946975857_linux_gtk_x86_64/plugins/com.redhat.ceylon.eclipse.ui_1.0.0.v20140205-2224-Final/defaultRepository/org/slf4j/api/1.6.1/org.slf4j.api-1.6.1.jar (OK) 
Debug: Locally loading module ceylon.runtime:1.0.0 from local module loader @7ffd5908 (roots: /home/lucas/.eclipse/org.eclipse.platform_4.3.0_946975857_linux_gtk_x86_64/plugins/com.redhat.ceylon.eclipse.ui_1.0.0.v20140205-2224-Final/defaultRepository) 
Debug: JMX.mbean.registered java.lang:type=MemoryManager,name=CodeCacheManager 
Debug: Loading class ceylon.language.equal_ locally from Module "ceylon.language:1.0.0" from local module loader @7ffd5908 (roots: /home/lucas/.eclipse/org.eclipse.platform_4.3.0_946975857_linux_gtk_x86_64/plugins/com.redhat.ceylon.eclipse.ui_1.0.0.v20140205-2224-Final/defaultRepository) 

That’s all probably valuable information to you, but it makes the console completely unusable for users. If I step into or over any instruction, that might trigger more debug messages, flushing everything valuable that my program might have printed earlier.

(I hope this is the right repository? I’m just guessing)

quintesse commented 10 years ago

I hope this is the right repository? I’m just guessing

This belongs in the ceylon-eclipse-ide issue tracker actually. Because it's the IDE that decides to turn on the most verbose logging when Debug mode is used. While in fact that should be a separate option.

lucaswerkmeister commented 10 years ago

Yep, ceylon/ceylon-ide-eclipse#735. Sorry!

quintesse commented 10 years ago

Ah I see you already found it yourself :)

lucaswerkmeister commented 10 years ago

Yeah, I just didn’t think to look in that repo before.