Commit 2335e388 authored by Sascha Niklas Schneiders's avatar Sascha Niklas Schneiders
Browse files

added new Logger init in tests

parent 91c75be6
/**
*
* ******************************************************************************
* MontiCAR Modeling Family, www.se-rwth.de
* Copyright (c) 2017, Software Engineering Group at RWTH Aachen,
* All rights reserved.
*
* This project is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this project. If not, see <http://www.gnu.org/licenses/>.
* *******************************************************************************
*/
package de.monticore.lang.embeddedmontiarc; package de.monticore.lang.embeddedmontiarc;
import de.se_rwth.commons.logging.Log; import de.se_rwth.commons.logging.Log;
...@@ -9,7 +29,7 @@ public class LogConfig extends Log { ...@@ -9,7 +29,7 @@ public class LogConfig extends Log {
static Log log; static Log log;
boolean disableOutput = true; boolean disableOutput = true;
static { public static void init() {
log = new LogConfig(); log = new LogConfig();
Log.setLog(log); Log.setLog(log);
} }
...@@ -43,4 +63,19 @@ public class LogConfig extends Log { ...@@ -43,4 +63,19 @@ public class LogConfig extends Log {
} }
} }
@Override
protected void doTrace(String msg, Throwable t, String logName) {
if (!disableOutput) {
super.doTrace(msg, t, logName);
}
}
@Override
protected void doTrace(String msg, String logName) {
if (!disableOutput) {
super.doTrace(msg, logName);
}
}
} }
...@@ -47,6 +47,8 @@ public class AbstractSymtabTest { ...@@ -47,6 +47,8 @@ public class AbstractSymtabTest {
mp.addEntry(Paths.get(m)); mp.addEntry(Paths.get(m));
} }
GlobalScope scope = new GlobalScope(mp, fam); GlobalScope scope = new GlobalScope(mp, fam);
LogConfig.init();
return scope; return scope;
} }
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment