mirror of
https://github.com/sigmasternchen/xtext-core
synced 2025-03-16 00:38:56 +00:00
Added logging.
This commit is contained in:
parent
966b59539d
commit
6f20bd98c5
10 changed files with 27 additions and 24 deletions
|
@ -6,6 +6,6 @@ Bundle-Version: 1.0.0
|
|||
Bundle-Vendor: itemis AG
|
||||
Bundle-RequiredExecutionEnvironment: J2SE-1.5
|
||||
Export-Package: org.eclipse.xtext.util
|
||||
Require-Bundle: org.apache.commons.logging;bundle-version="1.0.4",
|
||||
org.eclipse.emf.ecore;bundle-version="2.3.2",
|
||||
org.junit;bundle-version="3.8.2"
|
||||
Require-Bundle: org.eclipse.emf.ecore;bundle-version="2.3.2",
|
||||
org.junit;bundle-version="3.8.2",
|
||||
org.eclipse.xtext.log4j;bundle-version="1.2.15"
|
||||
|
|
|
@ -14,8 +14,7 @@ import java.io.IOException;
|
|||
import java.io.InputStream;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* @author Jan Köhnlein - Initial contribution and API
|
||||
|
@ -23,7 +22,7 @@ import org.apache.commons.logging.LogFactory;
|
|||
*/
|
||||
public class Files {
|
||||
|
||||
private static Log log = LogFactory.getLog(Files.class);
|
||||
private static Logger log = Logger.getLogger(Files.class);
|
||||
|
||||
public static void copyFiles(String sourceDir, String targetDir, List<String> files) {
|
||||
File target = new File(targetDir);
|
||||
|
|
|
@ -27,9 +27,9 @@ Export-Package: org.eclipse.xtext,
|
|||
org.eclipse.xtext.util,
|
||||
org.eclipse.xtext.xtextutil,
|
||||
org.eclipse.xtext.xtextutil.util
|
||||
Require-Bundle: org.eclipse.emf.ecore;visibility:=reexport,
|
||||
Require-Bundle: org.eclipse.xtext.log4j;bundle-version="1.2.15",
|
||||
org.eclipse.emf.ecore;visibility:=reexport,
|
||||
org.antlr;visibility:=reexport,
|
||||
org.apache.commons.logging,
|
||||
org.openarchitectureware.util.stdlib,
|
||||
org.eclipse.emf.ecore.xmi;bundle-version="2.3.2";visibility:=reexport,
|
||||
org.eclipse.xtext.service;bundle-version="1.0.0";visibility:=reexport,
|
||||
|
|
8
plugins/org.eclipse.xtext/src/log4j.properties
Normal file
8
plugins/org.eclipse.xtext/src/log4j.properties
Normal file
|
@ -0,0 +1,8 @@
|
|||
log4j.rootLogger=debug, default
|
||||
|
||||
log4j.appender.default=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.default.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.default.layout.ConversionPattern=!!standalone!! %-4r [%t] %-5p %c %x - %m%n
|
||||
|
||||
log4j.logger.org.eclipse.xtext.ui=WARN
|
||||
log4j.logger.org.eclipse.xtext.reference.ui=DEBUG
|
|
@ -4,8 +4,7 @@ import java.io.IOException;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
import org.eclipse.emf.common.util.TreeIterator;
|
||||
import org.eclipse.emf.common.util.URI;
|
||||
|
@ -19,7 +18,8 @@ import org.eclipse.xtext.resource.ClassloaderClasspathUriResolver;
|
|||
import org.eclipse.xtext.resource.XtextResourceSet;
|
||||
|
||||
public class EcoreUtil2 extends EcoreUtil {
|
||||
private static Log log = LogFactory.getLog(EcoreUtil2.class);
|
||||
|
||||
private static Logger log = Logger.getLogger(EcoreUtil2.class);
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <T extends EObject> T getContainerOfType(EObject ele, Class<T> type) {
|
||||
|
|
|
@ -4,15 +4,14 @@ import java.lang.reflect.Method;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.eclipse.xtext.conversion.IValueConverter;
|
||||
import org.eclipse.xtext.conversion.IValueConverterService;
|
||||
import org.eclipse.xtext.conversion.ValueConverter;
|
||||
|
||||
public class AbstractAnnotationBasedValueConverterService implements IValueConverterService {
|
||||
|
||||
private Log log = LogFactory.getLog(AbstractAnnotationBasedValueConverterService.class);
|
||||
private static Logger log = Logger.getLogger(AbstractAnnotationBasedValueConverterService.class);
|
||||
|
||||
public final String toString(Object value, String lexerRule) {
|
||||
return getConverter(lexerRule).toString(value);
|
||||
|
|
|
@ -19,8 +19,7 @@ import org.antlr.runtime.Parser;
|
|||
import org.antlr.runtime.RecognitionException;
|
||||
import org.antlr.runtime.Token;
|
||||
import org.antlr.runtime.TokenStream;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
import org.eclipse.emf.common.util.URI;
|
||||
import org.eclipse.emf.common.util.WrappedException;
|
||||
|
@ -45,7 +44,7 @@ import org.eclipse.xtext.util.Strings;
|
|||
|
||||
public abstract class AbstractAntlrParser extends Parser {
|
||||
|
||||
private static Log log = LogFactory.getLog(AbstractAntlrParser.class);
|
||||
private static Logger log = Logger.getLogger(AbstractAntlrParser.class);
|
||||
|
||||
protected CompositeNode currentNode;
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@ import org.eclipse.xtext.parsetree.reconstr.IInstanceDescription;
|
|||
|
||||
public class WhitespacePreservingCallback extends SimpleSerializingCallback {
|
||||
|
||||
// private final Log log = LogFactory.getLog(getClass());
|
||||
private Map<CompositeNode, Map<AbstractElement, Integer>> numberOfOccurences = new HashMap<CompositeNode, Map<AbstractElement, Integer>>();
|
||||
|
||||
public WhitespacePreservingCallback(IValueConverterService converterService) {
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
package org.eclipse.xtext.xtextutil.impl;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.eclipse.xtext.AbstractMetamodelDeclaration;
|
||||
import org.eclipse.xtext.GeneratedMetamodel;
|
||||
import org.eclipse.xtext.xtextutil.MetaModel;
|
||||
|
||||
public class XtextutilUtil {
|
||||
|
||||
private static Log log = LogFactory.getLog(XtextutilUtil.class);
|
||||
private static Logger log = Logger.getLogger(XtextutilUtil.class);
|
||||
|
||||
public static String alias(MetaModelImpl metaModelImpl) {
|
||||
AbstractMetamodelDeclaration declaration = metaModelImpl.getDeclaration();
|
||||
|
|
|
@ -8,8 +8,7 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.xtext;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.eclipse.emf.common.util.URI;
|
||||
import org.eclipse.emf.ecore.resource.Resource;
|
||||
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
|
||||
|
@ -34,7 +33,8 @@ import org.eclipse.xtext.testlanguages.TestLanguage;
|
|||
*/
|
||||
public class GenerateAllTestGrammars {
|
||||
private static String path = "./src-gen";
|
||||
private static Log log = LogFactory.getLog(GenerateAllTestGrammars.class);
|
||||
|
||||
private static Logger log = Logger.getLogger(GenerateAllTestGrammars.class);
|
||||
|
||||
public final static Class<?>[] testclasses = new Class[] { AbstractTestLanguage.class,ConcreteTestLanguage.class,XtextGrammarTest.class, MetamodelRefTest.class,
|
||||
DummyLanguage.class, TestLanguage.class, SimpleReconstrTest.class, ComplexReconstrTest.class,
|
||||
|
|
Loading…
Reference in a new issue