-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from yarl/dev
version 18.02
- Loading branch information
Showing
18 changed files
with
305 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
If you are reporting a bug please: | ||
|
||
- Check the bug has already been reported (https://github.com/yarl/pattypan/issues). | ||
- Explain the current issue. | ||
- Describe the expected behavior. | ||
- Add the problematic spreadsheet and a example media file (drag & drop here). | ||
- Add the PattyPan log file (drag & drop here). You find a link to the PattyPan log at the application start screen. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package pattypan; | ||
|
||
import java.io.IOException; | ||
import java.nio.file.Files; | ||
import java.nio.file.Path; | ||
import java.nio.file.Paths; | ||
import java.util.logging.ConsoleHandler; | ||
import java.util.logging.FileHandler; | ||
import java.util.logging.Logger; | ||
import java.util.logging.SimpleFormatter; | ||
import pattypan.Settings; | ||
|
||
public class LogManager { | ||
public static final Logger logger = Logger.getLogger(Main.class.getName()); | ||
|
||
public LogManager() { | ||
try { | ||
Path logFileLocation = Paths.get(Util.getApplicationDirectory() + "/logs"); | ||
if (!Files.exists(logFileLocation)) { | ||
Files.createDirectories(logFileLocation); | ||
} | ||
|
||
if (!Settings.getSetting("version").equals(Settings.VERSION)) { | ||
Files.deleteIfExists(Paths.get(logFileLocation.toString() + "/pattypan.log")); | ||
} | ||
|
||
FileHandler fh = new FileHandler(logFileLocation.toString() + "/pattypan.log", true); | ||
fh.setFormatter(new SimpleFormatter()); | ||
logger.addHandler(fh); | ||
logger.addHandler(new ConsoleHandler()); | ||
logger.setUseParentHandlers(false); // remove console prefix for privacy | ||
} catch (SecurityException e) { | ||
e.printStackTrace(); | ||
} catch (IOException e) { | ||
e.printStackTrace(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.