[brailleblaster] 2 new revisions pushed by mwhapples on 2014-07-17 11:35 GMT

  • From: brailleblaster@xxxxxxxxxxxxxx
  • To: brailleblaster@xxxxxxxxxxxxx
  • Date: Thu, 17 Jul 2014 11:35:29 +0000

2 new revisions:

Revision: 3d11a822bff4
Branch:   mwhapples_slf4j
Author:   Michael Whapples
Date:     Thu Jul 17 07:20:36 2014 UTC
Log:      Change to slf4j for logging.
http://code.google.com/p/brailleblaster/source/detail?r=3d11a822bff4

Revision: abd7621f2cd3
Branch:   mwhapples_slf4j
Author:   Michael Whapples
Date:     Thu Jul 17 11:34:16 2014 UTC
Log:      Improvements to logging, including configuration.
http://code.google.com/p/brailleblaster/source/detail?r=abd7621f2cd3

==============================================================================
Revision: 3d11a822bff4
Branch:   mwhapples_slf4j
Author:   Michael Whapples
Date:     Thu Jul 17 07:20:36 2014 UTC
Log:      Change to slf4j for logging.
http://code.google.com/p/brailleblaster/source/detail?r=3d11a822bff4

Modified:
 /src/main/org/brailleblaster/BBIni.java
 /src/main/org/brailleblaster/Subcommands.java
 /src/main/org/brailleblaster/abstractClasses/AbstractView.java
 /src/main/org/brailleblaster/document/BBDocument.java
 /src/main/org/brailleblaster/document/Normalizer.java
 /src/main/org/brailleblaster/document/SemanticFileHandler.java
 /src/main/org/brailleblaster/embossers/EmbossersManager.java
 /src/main/org/brailleblaster/louisutdml/LogHandler.java
 /src/main/org/brailleblaster/mathml/ImageCreator.java
 /src/main/org/brailleblaster/perspectives/braille/Manager.java
/src/main/org/brailleblaster/perspectives/braille/document/BBSemanticsTable.java /src/main/org/brailleblaster/perspectives/braille/document/BrailleDocument.java /src/main/org/brailleblaster/perspectives/braille/spellcheck/SpellChecker.java
 /src/main/org/brailleblaster/perspectives/braille/views/tree/TreeView.java
 /src/main/org/brailleblaster/perspectives/braille/views/wp/TextView.java
 /src/main/org/brailleblaster/printers/PrintersManager.java
 /src/main/org/brailleblaster/util/FileUtils.java
 /src/main/org/brailleblaster/wordprocessor/FontManager.java
 /src/main/org/brailleblaster/wordprocessor/WPManager.java

=======================================
--- /src/main/org/brailleblaster/BBIni.java     Wed Jul 16 08:12:31 2014 UTC
+++ /src/main/org/brailleblaster/BBIni.java     Thu Jul 17 07:20:36 2014 UTC
@@ -41,9 +41,9 @@
 import java.net.URISyntaxException;
 import java.net.URL;
 import java.util.Properties;
-import java.util.logging.FileHandler;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;

 import org.brailleblaster.util.FileUtils;
 import org.brailleblaster.util.PropertyFileManager;
@@ -76,7 +76,7 @@
        private static String debugFilePath;
        private static boolean gotGui = true;
        private static boolean multipleSubcommands = false;
-       private static Logger logger;
+       private static Logger logger = LoggerFactory.getLogger(BBIni.class);
        private static final String productName = "BrailleBlaster ND";
        private static final String BBVersion = "2014.06.05";
        private static final String releaseDate = "June 5, 2014";
@@ -100,7 +100,7 @@
        public final static String propExtension = ".properties";
        private static boolean hSubcommands = false;
        private static boolean hLiblouisutdml = false;
-       private static FileHandler logFile;
+       // private static FileHandler logFile;
        private static final String BBID = "brlblst";
        private static String instanceId;
        private static String defaultCfg;
@@ -219,20 +219,19 @@
                if (!logPath.exists()) {
                        logPath.mkdirs();
                }
-               logger = Logger.getLogger("org.brailleblaster");
-               try {
-                       logFile = new FileHandler(logFilesPath + fileSep + 
"log.xml");
-               }
-               catch (IOException e) {
-                       e.printStackTrace();
-                       logger.log(Level.SEVERE, "cannot open logfile", e);
-                       e.printStackTrace();
-               }
-               if (logFile != null) {
-                       logger.addHandler(logFile);
-               }
+               logger = LoggerFactory.getLogger("org.brailleblaster");
+               // try {
+                       // logFile = new FileHandler(logFilesPath + fileSep + 
"log.xml");
+               // }
+               // catch (IOException e) {
+                       // e.printStackTrace();
+                       // logger.error("cannot open logfile", e);
+               // }
+               // if (logFile != null) {
+                       // logger.addHandler(logFile);
+               // }
                // disable output to console
-               logger.setUseParentHandlers(false);
+               // logger.setUseParentHandlers(false);
                if (args.length > 0) {
                        int i = 0;
                        while (i < args.length) {
@@ -267,10 +266,10 @@
                }
                catch (UnsatisfiedLinkError e) {
                        e.printStackTrace();
-                       logger.log(Level.SEVERE, "Problem with liblouisutdml 
library", e);
+                       logger.error("Problem with liblouisutdml library", e);
                }
                catch (Exception e) {
-                       logger.log(Level.WARNING, "This shouldn't happen", e);
+                       logger.warn("This shouldn't happen", e);
                }
        }

=======================================
--- /src/main/org/brailleblaster/Subcommands.java Thu Jul 3 16:07:57 2014 UTC +++ /src/main/org/brailleblaster/Subcommands.java Thu Jul 17 07:20:36 2014 UTC
@@ -40,8 +40,8 @@
 import org.daisy.printing.PrinterDevice;
 import java.io.File;
 import javax.print.PrintException;
-import java.util.logging.Logger;
-import java.util.logging.Level;
+import org.slf4j.Logger;
+
 import java.util.Arrays;

 /**
@@ -59,8 +59,7 @@
        Subcommands(String[] args) {
                logger = BBIni.getLogger();
                if (!BBIni.haveLiblouisutdml()) {
-                       logger.log(Level.SEVERE,
-                                       "The Braille translation facility is 
absent.");
+                       logger.error("The Braille translation facility is 
absent.");
                }
                // ParseCommandLine.getInstance().parseCommand (args);
                louisutdml = LibLouisUTDML.getInstance();
@@ -158,7 +157,7 @@
                        PrinterDevice embosser = new 
PrinterDevice(embosserName, true);
                        embosser.transmit(translatedFile);
                } catch (PrintException e) {
-                       logger.log(Level.SEVERE, "Embosser is  not working", e);
+                       logger.error("Embosser is  not working", e);
                }
                lbuLog.showLog();
        }
=======================================
--- /src/main/org/brailleblaster/abstractClasses/AbstractView.java Thu Jul 3 16:07:57 2014 UTC +++ /src/main/org/brailleblaster/abstractClasses/AbstractView.java Thu Jul 17 07:20:36 2014 UTC
@@ -30,7 +30,7 @@

 package org.brailleblaster.abstractClasses;

-import java.util.logging.Logger;
+import org.slf4j.Logger;

 import nu.xom.Element;
 import nu.xom.Node;
=======================================
--- /src/main/org/brailleblaster/document/BBDocument.java Thu Jul 3 16:07:57 2014 UTC +++ /src/main/org/brailleblaster/document/BBDocument.java Thu Jul 17 07:20:36 2014 UTC
@@ -41,8 +41,7 @@
 import java.util.List;
 import java.util.Map;
 import java.util.EnumMap;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import org.slf4j.Logger;

 import nu.xom.Attribute;
 import nu.xom.Builder;
@@ -218,26 +217,26 @@
                catch(ConnectException e){
                        new Notify(lh.localValue("connectionError"));
                        e.printStackTrace();
-                       logger.log(Level.SEVERE, "Connections Error", e);
+                       logger.error("Connections Error", e);
                        return false;
                }
                catch(UnknownHostException e){
                        new Notify(lh.localValue("connectionError"));
                        e.printStackTrace();
-                       logger.log(Level.SEVERE, "Unknown Host Error", e);
+                       logger.error("Unknown Host Error", e);
                        return false;
                }
                catch (ParsingException e) {
new Notify(lh.localValue("processingProb") + fileName + "\n" + lh.localValue("seeTrace"));
                        new CheckLiblouisutdmlLog().displayLog();
                        e.printStackTrace();
-                       logger.log(Level.SEVERE, "Parse Error", e);
+                       logger.error("Parse Error", e);
                        return false;
                }
                catch (IOException e) {
new Notify (lh.localValue("ioProb") + fileName + "\n" + lh.localValue("seeTrace"));
                        e.printStackTrace();
-                       logger.log(Level.SEVERE, "IO Error", e);
+                       logger.error("IO Error", e);
                        return false;
                }
        }
@@ -376,7 +375,7 @@
                                return false;
                }
                catch(Exception ex){
-                       logger.log(Level.SEVERE, "Exception", ex);
+                       logger.error("Exception", ex);
                        return false;
                }
        }
=======================================
--- /src/main/org/brailleblaster/document/Normalizer.java Mon Jul 7 18:27:33 2014 UTC +++ /src/main/org/brailleblaster/document/Normalizer.java Thu Jul 17 07:20:36 2014 UTC
@@ -6,8 +6,7 @@
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.UnknownHostException;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import org.slf4j.Logger;

 import org.brailleblaster.BBIni;
 import org.brailleblaster.util.Notify;
@@ -55,27 +54,27 @@
                catch(ConnectException e){
new Notify("Brailleblaster failed to access necessary materials from online. Please check your internet connection and try again.");
                        e.printStackTrace();
-                       log.log(Level.SEVERE, "Connections Error", e);
+                       log.error("Connections Error", e);
                }
                catch(UnknownHostException e){
new Notify("Brailleblaster failed to access necessary materials from online. Please check your internet connection and try again.");
                        e.printStackTrace();
-                       log.log(Level.SEVERE, "Unknown Host Error", e);
+                       log.error("Unknown Host Error", e);
                }
                catch (ParserConfigurationException e) {
new Notify("An error occurred while reading the document. Please check whehther the document contains vaild XML.");
                        e.printStackTrace();
-                       log.log(Level.SEVERE, "Parse Error", e);
+                       log.error("Parse Error", e);
                }
                catch (SAXException e) {
new Notify("An error occurred while reading the document. Please check whehther the document contains vaild XML.");
                        e.printStackTrace();
-                       log.log(Level.SEVERE, "Sax Error", e);
+                       log.error("Sax Error", e);
                }
                catch (IOException e) {
                        new Notify("An error occurred while reading the 
document.");
                        e.printStackTrace();
-                       log.log(Level.SEVERE, "IO Error", e);
+                       log.error("IO Error", e);
                }
        }

@@ -175,17 +174,17 @@
                        return true;
                } catch (TransformerConfigurationException e) {
                        e.printStackTrace();
-                       log.log(Level.SEVERE, "Transformer Configuration 
Exception", e);
+                       log.error("Transformer Configuration Exception", e);
                        return false;
                }
                catch (TransformerException e) {
                        e.printStackTrace();
-                       log.log(Level.SEVERE, "Transformer Exception", e);
+                       log.error("Transformer Exception", e);
                        return false;
                }
                catch(Exception e){
                        e.printStackTrace();
-                       log.log(Level.SEVERE, "Unforeseen Exception", e);
+                       log.error("Unforeseen Exception", e);
                        return false;
                }
     }
=======================================
--- /src/main/org/brailleblaster/document/SemanticFileHandler.java Fri Nov 22 14:34:16 2013 UTC +++ /src/main/org/brailleblaster/document/SemanticFileHandler.java Thu Jul 17 07:20:36 2014 UTC
@@ -6,8 +6,7 @@
 import java.io.FileReader;
 import java.io.IOException;
 import java.util.HashMap;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import org.slf4j.Logger;

 import org.brailleblaster.BBIni;
 import org.brailleblaster.util.FileUtils;
@@ -49,11 +48,11 @@
                        reader.close();
                } catch (FileNotFoundException e) {
                        e.printStackTrace();
-                       log.log(Level.SEVERE, "File Not Found Exception", e);
+                       log.error("File Not Found Exception", e);
                }
                catch (IOException e) {
                        e.printStackTrace();
-                       log.log(Level.SEVERE, "IO Exception", e);
+                       log.error("IO Exception", e);
                }

                return defaultSem;
@@ -163,11 +162,11 @@
        }
        catch(FileNotFoundException e){
                e.printStackTrace();
-               log.log(Level.SEVERE, "File Not Found Exception", e);
+               log.error("File Not Found Exception", e);
        }
        catch(IOException e){
                e.printStackTrace();
-               log.log(Level.SEVERE, "IO Exception", e);
+               log.error("IO Exception", e);
        }
        }

=======================================
--- /src/main/org/brailleblaster/embossers/EmbossersManager.java Tue Jun 10 15:12:13 2014 UTC +++ /src/main/org/brailleblaster/embossers/EmbossersManager.java Thu Jul 17 07:20:36 2014 UTC
@@ -34,8 +34,8 @@
 package org.brailleblaster.embossers;

 import java.io.File;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+
+import org.slf4j.Logger;

 import javax.print.PrintException;

@@ -80,7 +80,7 @@
                        } catch (PrintException e) {
                                LocaleHandler lh = new LocaleHandler();
new Notify(lh.localValue("cannotEmboss") + ": " + data.name + "\n" + e.getMessage());
-                               logger.log(Level.SEVERE, "Print Exception", e);
+                               logger.error("Print Exception", e);
                        }
                }
        }
=======================================
--- /src/main/org/brailleblaster/louisutdml/LogHandler.java Wed Jul 16 08:12:31 2014 UTC +++ /src/main/org/brailleblaster/louisutdml/LogHandler.java Thu Jul 17 07:20:36 2014 UTC
@@ -1,33 +1,25 @@
 package org.brailleblaster.louisutdml;

-import java.util.logging.Level;
-import java.util.logging.Logger;
-import java.util.HashMap;
-import java.util.Map;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;

 import org.liblouis.LogCallback;
 import org.liblouis.LogLevel;

 public class LogHandler implements LogCallback {

- private final static Map<Integer, Level> LEVEL_MAPPINGS = new HashMap<Integer, Level>();
-       static {
-               LEVEL_MAPPINGS.put(LogLevel.FATAL, Level.SEVERE);
-               LEVEL_MAPPINGS.put(LogLevel.ERROR, Level.SEVERE);
-               LEVEL_MAPPINGS.put(LogLevel.WARNING, Level.WARNING);
-               LEVEL_MAPPINGS.put(LogLevel.INFO, Level.INFO);
-               LEVEL_MAPPINGS.put(LogLevel.DEBUG, Level.FINE);
-               LEVEL_MAPPINGS.put(LogLevel.OFF, Level.OFF);
-               LEVEL_MAPPINGS.put(LogLevel.ALL, Level.ALL);
-       }
-       private Logger logger;
-       public LogHandler() {
-               this.logger = Logger.getLogger("org.brailleblaster.louisutdml");
-       }
+ private static final Logger logger = LoggerFactory.getLogger(LogHandler.class);
        @Override
        public void logMessage(int level, String message) {
-               Level javaLogLevel = LEVEL_MAPPINGS.get(level);
-               this.logger.log(javaLogLevel, message);
+               if (level >= LogLevel.ERROR) {
+                       logger.error(message);
+               } else if (level >= LogLevel.WARNING) {
+                       logger.warn(message);
+               } else if (level >= LogLevel.INFO) {
+                       logger.info(message);
+               } else if (level >= LogLevel.DEBUG) {
+                       logger.debug(message);
+               }
        }

 }
=======================================
--- /src/main/org/brailleblaster/mathml/ImageCreator.java Mon Apr 7 15:41:15 2014 UTC +++ /src/main/org/brailleblaster/mathml/ImageCreator.java Thu Jul 17 07:20:36 2014 UTC
@@ -36,13 +36,13 @@
                        return new Image(d, imageData);
                }
                catch (ParserConfigurationException e1) {
-                       BBIni.getLogger().log(Level.SEVERE, "Parser Config 
Error", e1);
+                       BBIni.getLogger().error("Parser Config Error", e1);
                }
                catch (SAXException e1) {
-                       BBIni.getLogger().log(Level.SEVERE, "Sax Error", e1);
+                       BBIni.getLogger().error("Sax Error", e1);
                }
                catch (IOException e1) {
-                       BBIni.getLogger().log(Level.SEVERE, "IOException 
Error", e1);
+                       BBIni.getLogger().error("IOException Error", e1);
                }

                return null;
=======================================
--- /src/main/org/brailleblaster/perspectives/braille/Manager.java Mon Jul 14 19:18:30 2014 UTC +++ /src/main/org/brailleblaster/perspectives/braille/Manager.java Thu Jul 17 07:20:36 2014 UTC
@@ -36,8 +36,7 @@
 import java.io.File;
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import org.slf4j.Logger;

 import nu.xom.Document;
 import nu.xom.Element;
@@ -320,13 +319,13 @@
                        }
                        else {
                                System.out.println("The Document Base document tree 
is empty");
- logger.log(Level.SEVERE, "The Document Base document tree is null, the file failed to parse properly"); + logger.error("The Document Base document tree is null, the file failed to parse properly");
                                //workingFilePath = null;
                        }
                }
                catch(Exception e){
                        e.printStackTrace();
-                       logger.log(Level.SEVERE, "Unforeseen Exception", e);
+                       logger.error("Unforeseen Exception", e);
                }
        }

@@ -1066,7 +1065,7 @@
                catch (IOException e) {
new Notify("An error occurred while refreshing the document. Please save your work and try again.");
                        e.printStackTrace();
-                       logger.log(Level.SEVERE, "IO Exception", e);
+                       logger.error("IO Exception", e);
                }
        }

=======================================
--- /src/main/org/brailleblaster/perspectives/braille/document/BBSemanticsTable.java Thu Jun 19 17:24:34 2014 UTC +++ /src/main/org/brailleblaster/perspectives/braille/document/BBSemanticsTable.java Thu Jul 17 07:20:36 2014 UTC
@@ -7,8 +7,7 @@
 import java.util.Map.Entry;
 import java.util.Set;
 import java.util.TreeMap;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import org.slf4j.Logger;

 import org.brailleblaster.BBIni;
 import org.brailleblaster.util.FileUtils;
@@ -104,7 +103,7 @@
                }
                catch(Exception e){
new Notify("The application failed to load due to errors in " + BBIni.getDefaultConfigFile());
-                       logger.log(Level.SEVERE, "Config File Error", e);
+                       logger.error("Config File Error", e);
                }
        }

=======================================
--- /src/main/org/brailleblaster/perspectives/braille/document/BrailleDocument.java Mon Jul 14 19:18:30 2014 UTC +++ /src/main/org/brailleblaster/perspectives/braille/document/BrailleDocument.java Thu Jul 17 07:20:36 2014 UTC
@@ -125,9 +125,9 @@

        private void changeTextNode(Node n, String text){
                Text temp = (Text)n;
-               logger.log(Level.INFO, "Original Text Node Value: " + 
temp.getValue());
+               logger.info("Original Text Node Value: " + temp.getValue());
                temp.setValue(text);
-               logger.log(Level.INFO, "New Text Node Value: " +  
temp.getValue());
+               logger.info("New Text Node Value: " +  temp.getValue());
                System.out.println("New Node Value:\t" + temp.getValue());
        }

@@ -149,7 +149,7 @@
                        }
                        logString += t.brailleList.get(i).n.getValue() + "\n";
                }
-               logger.log(Level.INFO, "Original Braille Node Value:\n" + 
logString);
+               logger.info("Original Braille Node Value:\n" + logString);

                Element parent = t.parentElement();
                Element child = (Element)t.brailleList.getFirst().n.getParent();
@@ -173,7 +173,7 @@
                        }
                }

-               logger.log(Level.INFO, "New Braille Node Value:\n" + 
insertionString);
+               logger.info("New Braille Node Value:\n" + insertionString);
                message.put("newBrailleText", insertionString);
                message.put("newBrailleLength", insertionString.length());
                return total;
@@ -201,7 +201,7 @@
                                first = false;
                        }
                }
-               logger.log(Level.INFO, "Original Braille Node Value:\n" + 
logString);
+               logger.info("Original Braille Node Value:\n" + logString);

                Element parent = t.parentElement();
                if(t.brailleList.size() > 0){
@@ -217,7 +217,7 @@

                t.brailleList.clear();
t.brailleList.add(new BrailleMapElement(startOffset, startOffset + textNode.getValue().length(),textNode)); - logger.log(Level.INFO, "New Braille Node Value:\n" + textNode.getValue());
+               logger.info("New Braille Node Value:\n" + textNode.getValue());
                message.put("newBrailleText", textNode.getValue());
                message.put("newBrailleLength", textNode.getValue().length());
                return total;
@@ -380,7 +380,7 @@
                }
                catch (UnsupportedEncodingException e) {
                        e.printStackTrace();
-                       logger.log(Level.SEVERE, "Unsupported Encoding 
Exception", e);
+                       logger.error("Unsupported Encoding Exception", e);
                        return -1;
                }
        }
=======================================
--- /src/main/org/brailleblaster/perspectives/braille/spellcheck/SpellChecker.java Thu Dec 12 13:50:22 2013 UTC +++ /src/main/org/brailleblaster/perspectives/braille/spellcheck/SpellChecker.java Thu Jul 17 07:20:36 2014 UTC
@@ -1,7 +1,6 @@
 package org.brailleblaster.perspectives.braille.spellcheck;

-import java.util.logging.Level;
-import java.util.logging.Logger;
+import org.slf4j.Logger;

 import org.brailleblaster.BBIni;
 import org.brailleblaster.localization.LocaleHandler;
@@ -28,13 +27,13 @@
                }
                catch(UnsatisfiedLinkError e){
                        e.printStackTrace();
-                       logger.log(Level.SEVERE, "DLL did not load", e);
+                       logger.error("DLL did not load", e);
                        active = false;
                        return;
                }
                catch(Exception e){
                        e.printStackTrace();
-                       logger.log(Level.SEVERE, "DLL did not load", e);
+                       logger.error("DLL did not load", e);
                        active = false;
                        return;
                }
@@ -53,7 +52,7 @@
                }
                catch(UnsatisfiedLinkError e){
                        e.printStackTrace();
-                       logger.log(Level.SEVERE, "openDict Unsatisfied Link 
Error", e);
+                       logger.error("openDict Unsatisfied Link Error", e);
                        return -1;
                }
        }
=======================================
--- /src/main/org/brailleblaster/perspectives/braille/views/tree/TreeView.java Tue Jun 10 14:48:42 2014 UTC +++ /src/main/org/brailleblaster/perspectives/braille/views/tree/TreeView.java Thu Jul 17 07:20:36 2014 UTC
@@ -42,7 +42,7 @@
                                Class<?> clss = Class.forName(tree);
                                return TreeView.createTree(clss, m, group);
                        } catch (ClassNotFoundException e) {
-                               logger.log(Level.SEVERE, "Class Not Found 
Exception", e);
+                               logger.error("Class Not Found Exception", e);
                        }
                }

@@ -75,17 +75,17 @@
Constructor<?> constructor = clss.getConstructor(new Class[]{Manager.class, Group.class});
                        return (BBTree)constructor.newInstance(manager, group);
                } catch (NoSuchMethodException e) {
-                       logger.log(Level.SEVERE, "No Such Method Exception", e);
+                       logger.error("No Such Method Exception", e);
                } catch (SecurityException e) {
-                       logger.log(Level.SEVERE, "Security Exception", e);
+                       logger.error("Security Exception", e);
                } catch (InstantiationException e) {
-                       logger.log(Level.SEVERE, "Instantiation Exception", e);
+                       logger.error("Instantiation Exception", e);
                } catch (IllegalAccessException e) {
-                       logger.log(Level.SEVERE, "Illegal Access Exception", e);
+                       logger.error("Illegal Access Exception", e);
                } catch (IllegalArgumentException e) {
-                       logger.log(Level.SEVERE, "Illegal Argument Exception", 
e);
+                       logger.error("Illegal Argument Exception", e);
                } catch (InvocationTargetException e) {
-                       logger.log(Level.SEVERE, "Invocation Exception", e);
+                       logger.error("Invocation Exception", e);
                }

                return null;
=======================================
--- /src/main/org/brailleblaster/perspectives/braille/views/wp/TextView.java Mon Jul 14 19:18:30 2014 UTC +++ /src/main/org/brailleblaster/perspectives/braille/views/wp/TextView.java Thu Jul 17 07:20:36 2014 UTC
@@ -907,7 +907,7 @@
                }
                catch(StringIndexOutOfBoundsException e){
new Notify("An error occured while translating. Be aware the this may affect cursor accurarcy and other translations in the document. The document is most likely not be suitable for editing. Check the logs for details"); - logger.log(Level.SEVERE, "Index Error:\t" + n.getParent().toXML().toString(), e);
+                       logger.error("Index Error:\t" + 
n.getParent().toXML().toString(), e);
                        text.append(n.getValue().substring(start));
                }

@@ -994,7 +994,7 @@
                }
                catch(StringIndexOutOfBoundsException e){
new Notify("An error occured while translating. Be aware the this may affect cursor accurarcy and other translations in the document. The document is most likely not be suitable for editing. Check the logs for details"); - logger.log(Level.SEVERE, "Index Error:\t" + n.getParent().toXML().toString(), e);
+                       logger.error("Index Error:\t" + 
n.getParent().toXML().toString(), e);
                        text.append(n.getValue().substring(start));
                }

=======================================
--- /src/main/org/brailleblaster/printers/PrintersManager.java Tue Jun 10 15:12:13 2014 UTC +++ /src/main/org/brailleblaster/printers/PrintersManager.java Thu Jul 17 07:20:36 2014 UTC
@@ -34,7 +34,7 @@
 package org.brailleblaster.printers;

 import org.brailleblaster.BBIni;
-import java.util.logging.Logger;
+import org.slf4j.Logger;

 import org.eclipse.swt.*;
 import org.eclipse.swt.graphics.*;
=======================================
--- /src/main/org/brailleblaster/util/FileUtils.java Tue Jun 3 17:05:28 2014 UTC +++ /src/main/org/brailleblaster/util/FileUtils.java Thu Jul 17 07:20:36 2014 UTC
@@ -41,8 +41,7 @@
 import java.io.IOException;
 import java.io.FileNotFoundException;
 import java.io.UnsupportedEncodingException;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import org.slf4j.Logger;

 import nu.xom.Document;
 import nu.xom.Serializer;
@@ -245,17 +244,17 @@
        }
        catch (FileNotFoundException e) {
                e.printStackTrace();
-               logger.log(Level.SEVERE, "File Not Found Exception", e);
+               logger.error("File Not Found Exception", e);
                return false;
        }
        catch (UnsupportedEncodingException e) {
                e.printStackTrace();
-               logger.log(Level.SEVERE, "Unsupported Encoding Exception", e);
+               logger.error("Unsupported Encoding Exception", e);
                return false;
        }
        catch (IOException e) {
                e.printStackTrace();
-               logger.log(Level.SEVERE, "IO Exception", e);
+               logger.error("IO Exception", e);
                return false;
        }
 }
=======================================
--- /src/main/org/brailleblaster/wordprocessor/FontManager.java Tue Apr 15 14:34:57 2014 UTC +++ /src/main/org/brailleblaster/wordprocessor/FontManager.java Thu Jul 17 07:20:36 2014 UTC
@@ -33,8 +33,7 @@

 package org.brailleblaster.wordprocessor;

-import java.util.logging.Level;
-import java.util.logging.Logger;
+import org.slf4j.Logger;

 import org.brailleblaster.BBIni;
 import org.brailleblaster.localization.LocaleHandler;
@@ -127,7 +126,7 @@

                String loc = lh.getLocale().toString();
                if (!loc.contentEquals(lh.localValue("localeResource"))) {
- logger.log(Level.WARNING, "Locale resource for " + loc + " not found. Using default."); + logger.warn("Locale resource for " + loc + " not found. Using default."); // new Notify("Locale resource for '" + lh.getLocale().getDisplayName() + "' not found.");
                }
        }
=======================================
--- /src/main/org/brailleblaster/wordprocessor/WPManager.java Wed Jul 16 11:31:12 2014 UTC +++ /src/main/org/brailleblaster/wordprocessor/WPManager.java Thu Jul 17 07:20:36 2014 UTC
@@ -52,15 +52,15 @@
 import org.brailleblaster.util.YesNoChoice;

 import java.util.LinkedList;
-import java.util.logging.Level;
-import java.util.logging.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;

 public class WPManager {
     /**
* This is the controller for the whole word processing operation. It is the * entry point for the word processor, and therefore the only public class.
      */
- private static Logger logger = Logger.getLogger("org.brailleblaster.wordprocessor"); + private static Logger logger = LoggerFactory.getLogger(WPManager.class);
     public static Display display;
     private Shell shell;
     private FormLayout layout;
@@ -125,7 +125,7 @@
            shell.addListener(SWT.Close, new Listener() {
                @Override
                        public void handleEvent(Event event) {
- logger.log(Level.INFO, "Main Shell handling Close event, about to dispose the main Display"); + logger.info("Main Shell handling Close event, about to dispose the main Display");

                   while(managerList.size() > 0){
                           Controller temp = managerList.removeFirst();

==============================================================================
Revision: abd7621f2cd3
Branch:   mwhapples_slf4j
Author:   Michael Whapples
Date:     Thu Jul 17 11:34:16 2014 UTC
Log:      Improvements to logging, including configuration.
http://code.google.com/p/brailleblaster/source/detail?r=abd7621f2cd3

Added:
 /src/main/org/brailleblaster/logback/LogFileFinder.java
 /src/resources/logback.xml
Modified:
 /src/main/org/brailleblaster/BBIni.java
 /src/main/org/brailleblaster/Subcommands.java
 /src/main/org/brailleblaster/abstractClasses/AbstractView.java
 /src/main/org/brailleblaster/document/BBDocument.java
 /src/main/org/brailleblaster/document/Normalizer.java
 /src/main/org/brailleblaster/document/SemanticFileHandler.java
 /src/main/org/brailleblaster/embossers/EmbossersManager.java
 /src/main/org/brailleblaster/mathml/ImageCreator.java
 /src/main/org/brailleblaster/perspectives/braille/Manager.java
/src/main/org/brailleblaster/perspectives/braille/document/BBSemanticsTable.java /src/main/org/brailleblaster/perspectives/braille/document/BrailleDocument.java /src/main/org/brailleblaster/perspectives/braille/spellcheck/SpellChecker.java
 /src/main/org/brailleblaster/perspectives/braille/views/tree/TreeView.java
 /src/main/org/brailleblaster/perspectives/braille/views/wp/TextView.java
 /src/main/org/brailleblaster/printers/PrintersManager.java
 /src/main/org/brailleblaster/util/FileUtils.java
 /src/main/org/brailleblaster/wordprocessor/FontManager.java

=======================================
--- /dev/null
+++ /src/main/org/brailleblaster/logback/LogFileFinder.java Thu Jul 17 11:34:16 2014 UTC
@@ -0,0 +1,30 @@
+package org.brailleblaster.logback;
+
+import java.io.File;
+
+import ch.qos.logback.core.Context;
+import ch.qos.logback.core.PropertyDefinerBase;
+import ch.qos.logback.core.spi.PropertyDefiner;
+import ch.qos.logback.core.status.Status;
+
+import org.eclipse.swt.SWT;
+
+public class LogFileFinder extends PropertyDefinerBase implements PropertyDefiner {
+
+       private File logPath;
+       public LogFileFinder() {
+               File bbHome = new File(System.getProperty("user.home"), 
".brlblst");
+               if (SWT.getPlatform().equals("win32")) {
+                       bbHome = new File(System.getenv("APPDATA"), "brlblst");
+               }
+               logPath = new File(bbHome, "log");
+               if (!logPath.exists()) {
+                       logPath.mkdirs();
+               }
+       }
+       @Override
+       public String getPropertyValue() {
+               return logPath.getAbsolutePath();
+       }
+
+}
=======================================
--- /dev/null
+++ /src/resources/logback.xml  Thu Jul 17 11:34:16 2014 UTC
@@ -0,0 +1,12 @@
+<configuration>
+  <define name="logPath" class="org.brailleblaster.logback.LogFileFinder"/>
+  <appender name="bbFileAppender" class="ch.qos.logback.core.FileAppender">
+    <file>${logPath}/bb.log</file>
+    <encoder>
+ <pattern>%d{HH:mm:ss.SSS} %-5level [%thread] %logger{36} - %msg%n</pattern>
+    </encoder>
+  </appender>
+  <root level="debug">
+    <appender-ref ref="bbFileAppender"/>
+  </root>
+</configuration>
=======================================
--- /src/main/org/brailleblaster/BBIni.java     Thu Jul 17 07:20:36 2014 UTC
+++ /src/main/org/brailleblaster/BBIni.java     Thu Jul 17 11:34:16 2014 UTC
@@ -42,15 +42,13 @@
 import java.net.URL;
 import java.util.Properties;

-import org.slf4j.LoggerFactory;
-import org.slf4j.Logger;
-
 import org.brailleblaster.util.FileUtils;
 import org.brailleblaster.util.PropertyFileManager;
 import org.eclipse.swt.SWT;
 import org.liblouis.LibLouis;
 import org.liblouis.LibLouisUTDML;
-import org.liblouis.LogLevel;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;


 /**
@@ -76,7 +74,7 @@
        private static String debugFilePath;
        private static boolean gotGui = true;
        private static boolean multipleSubcommands = false;
-       private static Logger logger = LoggerFactory.getLogger(BBIni.class);
+       private final static Logger logger = 
LoggerFactory.getLogger(BBIni.class);
        private static final String productName = "BrailleBlaster ND";
        private static final String BBVersion = "2014.06.05";
        private static final String releaseDate = "June 5, 2014";
@@ -219,7 +217,6 @@
                if (!logPath.exists()) {
                        logPath.mkdirs();
                }
-               logger = LoggerFactory.getLogger("org.brailleblaster");
                // try {
                        // logFile = new FileHandler(logFilesPath + fileSep + 
"log.xml");
                // }
@@ -403,9 +400,9 @@
                return recentDocs;
        }

-       public static Logger getLogger() {
-               return logger;
-       }
+       // public static Logger getLogger() {
+               // return logger;
+       // }

        public static PropertyFileManager getPropertyFileManager(){
                return propManager;
=======================================
--- /src/main/org/brailleblaster/Subcommands.java Thu Jul 17 07:20:36 2014 UTC +++ /src/main/org/brailleblaster/Subcommands.java Thu Jul 17 11:34:16 2014 UTC
@@ -36,11 +36,17 @@
 import org.brailleblaster.util.CheckLiblouisutdmlLog;
 import org.brailleblaster.wordprocessor.WPManager;
 import org.liblouis.LibLouisUTDML;
+
 import java.io.Console;
+
 import org.daisy.printing.PrinterDevice;
+
 import java.io.File;
+
 import javax.print.PrintException;
+
 import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;

 import java.util.Arrays;

@@ -50,14 +56,13 @@
  */

 class Subcommands {
-       private Logger logger = BBIni.getLogger();
+ private final static Logger logger = LoggerFactory.getLogger(Subcommands.class);
        private LibLouisUTDML louisutdml;
        private CheckLiblouisutdmlLog lbuLog = new CheckLiblouisutdmlLog();
        private String subcommand;
        private String[] subArgs;

        Subcommands(String[] args) {
-               logger = BBIni.getLogger();
                if (!BBIni.haveLiblouisutdml()) {
                        logger.error("The Braille translation facility is 
absent.");
                }
=======================================
--- /src/main/org/brailleblaster/abstractClasses/AbstractView.java Thu Jul 17 07:20:36 2014 UTC +++ /src/main/org/brailleblaster/abstractClasses/AbstractView.java Thu Jul 17 11:34:16 2014 UTC
@@ -31,6 +31,7 @@
 package org.brailleblaster.abstractClasses;

 import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;

 import nu.xom.Element;
 import nu.xom.Node;
@@ -53,7 +54,7 @@
        protected boolean locked;
        protected Group group;
        protected Manager manager;
-       protected static Logger logger = BBIni.getLogger();
+ protected static Logger logger = LoggerFactory.getLogger(AbstractView.class);

        public AbstractView() {
        }
=======================================
--- /src/main/org/brailleblaster/document/BBDocument.java Thu Jul 17 07:20:36 2014 UTC +++ /src/main/org/brailleblaster/document/BBDocument.java Thu Jul 17 11:34:16 2014 UTC
@@ -41,7 +41,9 @@
 import java.util.List;
 import java.util.Map;
 import java.util.EnumMap;
+
 import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;

 import nu.xom.Attribute;
 import nu.xom.Builder;
@@ -80,7 +82,7 @@
        private static String fileSep = BBIni.getFileSep();
        protected LibLouisUTDML lutdml = LibLouisUTDML.getInstance();
        protected FileUtils fu = new FileUtils();
-       protected static Logger logger = BBIni.getLogger();
+ protected static Logger logger = LoggerFactory.getLogger(BBDocument.class);
        private ArrayList<String>missingSemanticsList;
        private ArrayList<String>mistranslationList;
        private String systemId;
=======================================
--- /src/main/org/brailleblaster/document/Normalizer.java Thu Jul 17 07:20:36 2014 UTC +++ /src/main/org/brailleblaster/document/Normalizer.java Thu Jul 17 11:34:16 2014 UTC
@@ -6,8 +6,9 @@
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.net.UnknownHostException;
+
 import org.slf4j.Logger;
-
+import org.slf4j.LoggerFactory;
 import org.brailleblaster.BBIni;
 import org.brailleblaster.util.Notify;
 import org.w3c.dom.Document;
@@ -31,7 +32,7 @@
 public class Normalizer {
        File f;
        Document doc;
-       static Logger log = BBIni.getLogger();
+       final static Logger log = LoggerFactory.getLogger(Normalizer.class);
        String originalPubId;
        String originalSystemId;
        DocumentType docType;
=======================================
--- /src/main/org/brailleblaster/document/SemanticFileHandler.java Thu Jul 17 07:20:36 2014 UTC +++ /src/main/org/brailleblaster/document/SemanticFileHandler.java Thu Jul 17 11:34:16 2014 UTC
@@ -6,8 +6,9 @@
 import java.io.FileReader;
 import java.io.IOException;
 import java.util.HashMap;
+
 import org.slf4j.Logger;
-
+import org.slf4j.LoggerFactory;
 import org.brailleblaster.BBIni;
 import org.brailleblaster.util.FileUtils;

@@ -16,7 +17,7 @@
        private String configPath;
        private String defaultSemanticsFiles;
        private FileUtils fu;
-       private Logger log = BBIni.getLogger();
+ private final static Logger log = LoggerFactory.getLogger(SemanticFileHandler.class);
        private HashMap<String, String> defaults;

        public SemanticFileHandler(String configPath){
=======================================
--- /src/main/org/brailleblaster/embossers/EmbossersManager.java Thu Jul 17 07:20:36 2014 UTC +++ /src/main/org/brailleblaster/embossers/EmbossersManager.java Thu Jul 17 11:34:16 2014 UTC
@@ -36,6 +36,7 @@
 import java.io.File;

 import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;

 import javax.print.PrintException;

@@ -57,7 +58,7 @@
        Logger logger;

        public EmbossersManager(){
-               logger = BBIni.getLogger();
+               logger = LoggerFactory.getLogger(EmbossersManager.class);
                this.shell = new Shell(Display.getDefault(), SWT.DIALOG_TRIM);
                embosser = new PrintDialog(this.shell);
        }
=======================================
--- /src/main/org/brailleblaster/mathml/ImageCreator.java Thu Jul 17 07:20:36 2014 UTC +++ /src/main/org/brailleblaster/mathml/ImageCreator.java Thu Jul 17 11:34:16 2014 UTC
@@ -1,8 +1,10 @@
 package org.brailleblaster.mathml;

+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import java.io.IOException;
 import java.io.StringReader;
-import java.util.logging.Level;

 import javax.xml.parsers.DocumentBuilder;
 import javax.xml.parsers.DocumentBuilderFactory;
@@ -24,6 +26,7 @@
 import net.sourceforge.jeuclid.swt.MathRenderer;

 public class ImageCreator {
+ private final static Logger logger = LoggerFactory.getLogger(ImageCreator.class);
        public static Image createImage(Display d, Element e, int fontHeight){
                MathRenderer mr = MathRenderer.getInstance();
                DocumentBuilderFactory dbFactory = 
DocumentBuilderFactory.newInstance();
@@ -36,13 +39,13 @@
                        return new Image(d, imageData);
                }
                catch (ParserConfigurationException e1) {
-                       BBIni.getLogger().error("Parser Config Error", e1);
+                       logger.error("Parser Config Error", e1);
                }
                catch (SAXException e1) {
-                       BBIni.getLogger().error("Sax Error", e1);
+                       logger.error("Sax Error", e1);
                }
                catch (IOException e1) {
-                       BBIni.getLogger().error("IOException Error", e1);
+                       logger.error("IOException Error", e1);
                }

                return null;
=======================================
--- /src/main/org/brailleblaster/perspectives/braille/Manager.java Thu Jul 17 07:20:36 2014 UTC +++ /src/main/org/brailleblaster/perspectives/braille/Manager.java Thu Jul 17 11:34:16 2014 UTC
@@ -36,7 +36,9 @@
 import java.io.File;
 import java.io.IOException;
 import java.util.ArrayList;
+
 import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;

 import nu.xom.Document;
 import nu.xom.Element;
@@ -106,7 +108,7 @@
        String configSettings = null;
        static String recentFileName = null;
        LocaleHandler lh = new LocaleHandler();
-       static Logger logger;
+       final static Logger logger = LoggerFactory.getLogger(Manager.class);
        public BrailleDocument document;
        private FontManager fontManager;
        private boolean simBrailleDisplayed;
@@ -133,9 +135,6 @@
                pb = new BBProgressBar(wp.getShell());
                fontManager.setFontWidth(simBrailleDisplayed);
                srch = new SearchDialog(wp.getShell(), SWT.NONE, this);
-
-               logger = BBIni.getLogger();
-
                if(docName != null)
                        openDocument(docName);
                else {
@@ -173,9 +172,6 @@
                pb = new BBProgressBar(wp.getShell());
                fontManager.setFontWidth(simBrailleDisplayed);
                srch = new SearchDialog(wp.getShell(), SWT.NONE, this);
-
-               logger = BBIni.getLogger();
-
                document = new BrailleDocument(this, doc, this.styles);
                vi = ViewFactory.createUpdater(arch, document, text, braille, 
treeView);

=======================================
--- /src/main/org/brailleblaster/perspectives/braille/document/BBSemanticsTable.java Thu Jul 17 07:20:36 2014 UTC +++ /src/main/org/brailleblaster/perspectives/braille/document/BBSemanticsTable.java Thu Jul 17 11:34:16 2014 UTC
@@ -7,8 +7,9 @@
 import java.util.Map.Entry;
 import java.util.Set;
 import java.util.TreeMap;
+
 import org.slf4j.Logger;
-
+import org.slf4j.LoggerFactory;
 import org.brailleblaster.BBIni;
 import org.brailleblaster.util.FileUtils;
 import org.brailleblaster.util.Notify;
@@ -83,7 +84,7 @@
        TreeMap<String,Styles> table;
        FileUtils fu = new FileUtils();
        String config;
-       static Logger logger = BBIni.getLogger();
+       static Logger logger = LoggerFactory.getLogger(BBSemanticsTable.class);

        public BBSemanticsTable(String config){
                try {
=======================================
--- /src/main/org/brailleblaster/perspectives/braille/document/BrailleDocument.java Thu Jul 17 07:20:36 2014 UTC +++ /src/main/org/brailleblaster/perspectives/braille/document/BrailleDocument.java Thu Jul 17 11:34:16 2014 UTC
@@ -5,7 +5,6 @@
 import java.io.UnsupportedEncodingException;
 import java.nio.charset.Charset;
 import java.util.ArrayList;
-import java.util.logging.Level;

 import nu.xom.Attribute;
 import nu.xom.Builder;
=======================================
--- /src/main/org/brailleblaster/perspectives/braille/spellcheck/SpellChecker.java Thu Jul 17 07:20:36 2014 UTC +++ /src/main/org/brailleblaster/perspectives/braille/spellcheck/SpellChecker.java Thu Jul 17 11:34:16 2014 UTC
@@ -1,7 +1,7 @@
 package org.brailleblaster.perspectives.braille.spellcheck;

 import org.slf4j.Logger;
-
+import org.slf4j.LoggerFactory;
 import org.brailleblaster.BBIni;
 import org.brailleblaster.localization.LocaleHandler;

@@ -13,12 +13,11 @@
     private static native Suggestions checkSug(String wd);
     private static native void closeDict();

-    private Logger logger;
+ private final static Logger logger = LoggerFactory.getLogger(SpellChecker.class);
     public boolean active;
     private String dictPath, affPath;

        public SpellChecker(String dictPath, String affPath){
-               logger = BBIni.getLogger();
                this.dictPath = dictPath;
                this.affPath = affPath;

=======================================
--- /src/main/org/brailleblaster/perspectives/braille/views/tree/TreeView.java Thu Jul 17 07:20:36 2014 UTC +++ /src/main/org/brailleblaster/perspectives/braille/views/tree/TreeView.java Thu Jul 17 11:34:16 2014 UTC
@@ -2,7 +2,6 @@

 import java.lang.reflect.Constructor;
 import java.lang.reflect.InvocationTargetException;
-import java.util.logging.Level;

 import org.brailleblaster.BBIni;
 import org.brailleblaster.abstractClasses.AbstractView;
=======================================
--- /src/main/org/brailleblaster/perspectives/braille/views/wp/TextView.java Thu Jul 17 07:20:36 2014 UTC +++ /src/main/org/brailleblaster/perspectives/braille/views/wp/TextView.java Thu Jul 17 11:34:16 2014 UTC
@@ -32,7 +32,6 @@

 import java.util.ArrayList;
 import java.util.Map.Entry;
-import java.util.logging.Level;

 import nu.xom.Element;
 import nu.xom.Node;
@@ -42,10 +41,10 @@
 import org.brailleblaster.perspectives.braille.document.BBSemanticsTable;
import org.brailleblaster.perspectives.braille.document.BBSemanticsTable.Styles; import org.brailleblaster.perspectives.braille.document.BBSemanticsTable.StylesType;
-import org.brailleblaster.perspectives.braille.mapping.maps.MapList;
import org.brailleblaster.perspectives.braille.mapping.elements.BrlOnlyMapElement; import org.brailleblaster.perspectives.braille.mapping.elements.PageMapElement; import org.brailleblaster.perspectives.braille.mapping.elements.TextMapElement;
+import org.brailleblaster.perspectives.braille.mapping.maps.MapList;
 import org.brailleblaster.perspectives.braille.messages.Message;
 import org.brailleblaster.perspectives.braille.messages.Sender;
 import org.brailleblaster.util.Notify;
=======================================
--- /src/main/org/brailleblaster/printers/PrintersManager.java Thu Jul 17 07:20:36 2014 UTC +++ /src/main/org/brailleblaster/printers/PrintersManager.java Thu Jul 17 11:34:16 2014 UTC
@@ -35,7 +35,7 @@

 import org.brailleblaster.BBIni;
 import org.slf4j.Logger;
-
+import org.slf4j.LoggerFactory;
 import org.eclipse.swt.*;
 import org.eclipse.swt.graphics.*;
 import org.eclipse.swt.widgets.*;
@@ -52,7 +52,7 @@
        GC gc;
        FontData[] printerFontData;
        RGB printerForeground, printerBackground;
-       Logger logger;
+ final static Logger logger = LoggerFactory.getLogger(PrintersManager.class);

        int lineHeight = 0;
        int tabWidth = 0;
@@ -65,7 +65,6 @@
        PrintDialog dialog;

     public PrintersManager (Shell shell, StyledText st) {
-       logger = BBIni.getLogger();
        this.text = st;
        this.textToPrint = st.getText() + "\n";
        this.dialog = new PrintDialog(shell, SWT.SHELL_TRIM);
=======================================
--- /src/main/org/brailleblaster/util/FileUtils.java Thu Jul 17 07:20:36 2014 UTC +++ /src/main/org/brailleblaster/util/FileUtils.java Thu Jul 17 11:34:16 2014 UTC
@@ -41,7 +41,9 @@
 import java.io.IOException;
 import java.io.FileNotFoundException;
 import java.io.UnsupportedEncodingException;
+
 import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;

 import nu.xom.Document;
 import nu.xom.Serializer;
@@ -54,7 +56,7 @@
  * and for searching directories.
  */
 public class FileUtils {
-       static Logger logger = BBIni.getLogger();
+       static Logger logger = LoggerFactory.getLogger(FileUtils.class);

     public FileUtils() {
     }
=======================================
--- /src/main/org/brailleblaster/wordprocessor/FontManager.java Thu Jul 17 07:20:36 2014 UTC +++ /src/main/org/brailleblaster/wordprocessor/FontManager.java Thu Jul 17 11:34:16 2014 UTC
@@ -34,7 +34,7 @@
 package org.brailleblaster.wordprocessor;

 import org.slf4j.Logger;
-
+import org.slf4j.LoggerFactory;
 import org.brailleblaster.BBIni;
 import org.brailleblaster.localization.LocaleHandler;
 import org.brailleblaster.perspectives.braille.Manager;
@@ -55,7 +55,7 @@
        private int daisyFontHeight = 12;
        private int brailleFontHeight = 14;
        static LocaleHandler lh = new LocaleHandler();
-       static Logger logger = BBIni.getLogger();
+       final static Logger logger = LoggerFactory.getLogger(FontManager.class);
        private boolean displayBrailleFont = false;

        private Manager m;

Other related posts:

  • » [brailleblaster] 2 new revisions pushed by mwhapples on 2014-07-17 11:35 GMT - brailleblaster