diff --git a/.gitignore b/.gitignore index b507b50..ffc17d3 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ # Log file *.log +*.log.* # BlueJ files *.ctxt @@ -23,10 +24,12 @@ # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* + +#NetBeans Temp Files /Java/MoppyLib/.nb-gradle/ /Java/MoppyLib/build/ /Java/MoppyDeviceGUI/.nb-gradle/ /Java/MoppyDeviceGUI/build/ /Java/*/.nb-gradle-properties /Java/MoppyControlGUI/.nb-gradle/ -/Java/MoppyControlGUI/build/ \ No newline at end of file +/Java/MoppyControlGUI/build/ diff --git a/Java/MoppyControlGUI/src/main/java/com/moppy/control/MoppyControlGUI.java b/Java/MoppyControlGUI/src/main/java/com/moppy/control/MoppyControlGUI.java index 935c829..575db75 100644 --- a/Java/MoppyControlGUI/src/main/java/com/moppy/control/MoppyControlGUI.java +++ b/Java/MoppyControlGUI/src/main/java/com/moppy/control/MoppyControlGUI.java @@ -7,8 +7,11 @@ import com.moppy.core.midi.MoppyMIDISequencer; import com.moppy.core.status.StatusBus; import java.io.IOException; +import java.util.logging.FileHandler; import java.util.logging.Level; +import java.util.logging.LogManager; import java.util.logging.Logger; +import java.util.logging.SimpleFormatter; import javax.sound.midi.MidiUnavailableException; import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException; @@ -22,6 +25,14 @@ public class MoppyControlGUI { */ public static void main(String[] args) throws IOException, MidiUnavailableException { + // + //// Initialize Logger + // + + FileHandler logFileHandler = new FileHandler("moppy_control_gui.log", 5000000, 3, true); + logFileHandler.setFormatter(new SimpleFormatter()); + LogManager.getLogManager().getLogger("").addHandler(logFileHandler); + // //// Initialize Moppy System components //