Skip to content

Commit

Permalink
Fixed an issue of log4j creating extra instances. Derive all logger f…
Browse files Browse the repository at this point in the history
…rom Base.class.getName() static instance. Also, turned debugging on for Mac OS X version.

Former-commit-id: d386510
  • Loading branch information
ricklon committed May 14, 2011
1 parent 6c9cb3a commit faabec3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/src/processing/app/Base.java
Expand Up @@ -122,7 +122,7 @@ static public void main(String args[]) {
try {
BasicConfigurator.configure();
Logger.getRootLogger().setLevel(Level.DEBUG);
logger.debug("DEBUG: Logging enabled.");
logger.debug("DEBUG: Logging enabled." + Base.class.getName());


File versionFile = getContentFile("lib/version.txt");
Expand Down
10 changes: 4 additions & 6 deletions app/src/processing/app/debug/Compiler.java
Expand Up @@ -42,7 +42,7 @@

public class Compiler implements MessageConsumer {

static Logger logger = Logger.getLogger(Compiler.class.getName());
static Logger logger = Logger.getLogger(Base.class.getName());

static final String BUGS_URL = "http://code.google.com/p/arduino/issues/list";
static final String SUPER_BADNESS = "Compiler error, please submit this code to "
Expand Down Expand Up @@ -70,9 +70,7 @@ public class Compiler implements MessageConsumer {
ArrayList<String> includePaths;

public Compiler() {
//BasicConfigurator.configure();
//Logger.getRootLogger().setLevel(Level.DEBUG);
//logger.debug("DEBUG: Compiler.java: Logging enabled.");
logger.debug("DEBUG: Compiler.java: Logging on.");

}

Expand All @@ -90,6 +88,8 @@ public Compiler() {
* Only if there's a problem. Only then.
*/
public boolean compile(Sketch sketch, String buildPath,String primaryClassName, boolean verbose) throws RunnerException {
logger.debug("DEBUG: Compiler.java: Start Compile(...).");

this.sketch = sketch;
this.buildPath = buildPath;
this.primaryClassName = primaryClassName;
Expand Down Expand Up @@ -534,9 +534,7 @@ ArrayList<String> getIncludes(String corePath)
includePaths.add(corePath);
for (File file : sketch.getImportedLibraries())
{
//includePaths.add(file.getPath());
includePaths.add(file.getPath());

}
return includePaths;
}
Expand Down
2 changes: 1 addition & 1 deletion build/build.xml
Expand Up @@ -221,7 +221,7 @@
</target>

<target name="macosx-run" depends="macosx-build" description="Run Mac OS X version">
<exec executable="macosx/work/Arduino.app/Contents/MacOS/JavaApplicationStub" spawn="true"/>
<exec executable="macosx/work/Arduino.app/Contents/MacOS/JavaApplicationStub" spawn="false"/>
</target>

<target name="macosx-dist" if="macosx" depends="macosx-build" description="Create a .dmg of the Mac OS X version">
Expand Down

0 comments on commit faabec3

Please sign in to comment.