- wired the actual conversion plumbing

- updated LIMITATION.txt file
This commit is contained in:
Ceki Gulcu 2008-02-21 18:27:02 +00:00
parent f54c28dddc
commit c5f9e2fcd9
4 changed files with 30 additions and 9 deletions

View File

@ -1,5 +1,14 @@
The slf4j-converter aims to
The slf4j-migrator aims to
General limitations
===================
- the FATAL level is not supported.
This is limitation is not deemed serious because there are usually
very few log statements bearing the FATAL level.
- if a method declares multipe loggers on the same line, the conversion will not be complete. Example:
@ -15,8 +24,12 @@ The slf4j-converter aims to
}
- the FATAL level is not supported.
When migrating from log4j
=========================
This is limitation is not deemed serious because there are usually
very few log statements bearing the FATAL level.
- Since NDC is not supported by SLF4J, the migrator cannot properly handle
NDC statements.
- Calls to PropertyConfigurator or DomConfigurator cannot be migrated since
SLF4J the equivalents.

View File

@ -4,7 +4,7 @@ public class Constant {
public final static int JCL_TO_SLF4J = 0;
public final static int LOG4J_TO_SLF4J = 1;
public final static int EMPTY_RULE_SET = 2;
public final static int NOP_TO_SLF4J = 2;
public final static int NB_FILES_MAX = 1;

View File

@ -26,7 +26,7 @@ public abstract class RuleSetFactory {
return new JCLRuleSet();
case Constant.LOG4J_TO_SLF4J:
return new Log4jRuleSet();
case Constant.EMPTY_RULE_SET:
case Constant.NOP_TO_SLF4J:
return new EmptyRuleSet();
default:
return null;

View File

@ -41,7 +41,6 @@ import javax.swing.JProgressBar;
import javax.swing.JRadioButton;
import javax.swing.JTextField;
import javax.swing.SpringLayout;
import javax.swing.SwingUtilities;
import javax.swing.WindowConstants;
import org.slf4j.converter.Constant;
@ -298,8 +297,17 @@ public class MigratorFrame extends JFrame implements ActionListener {
} else {
File projectFolder = new File(folderTextField.getText());
int conversionType;
if(radioJCL.isSelected()) {
conversionType = Constant.JCL_TO_SLF4J;
} else if (radioLog4j.isSelected()) {
conversionType = Constant.LOG4J_TO_SLF4J;
} else {
// we cannot possibly reach here
throw new IllegalStateException("One of JCL or log4j project must have been previously chosen.");
}
ConversionTask task = new ConversionTask(projectFolder, this,
Constant.EMPTY_RULE_SET);
conversionType);
task.launch();
}
} else if (BROWSE_COMMAND.equals(e.getActionCommand())) {