diff options
| author | Jonathan Bauer | 2014-09-22 16:55:49 +0200 |
|---|---|---|
| committer | Jonathan Bauer | 2014-09-22 16:55:49 +0200 |
| commit | 8379b2e4a5dd76fcbd344b7a152dc14629f64ae9 (patch) | |
| tree | 3b5082edd282f0143b5ea67ebf3f0956b8eed814 /dozentenmodul/src/main/java/util | |
| parent | [client] NEW: Logging mechanisms for the client (diff) | |
| download | tutor-module-8379b2e4a5dd76fcbd344b7a152dc14629f64ae9.tar.gz tutor-module-8379b2e4a5dd76fcbd344b7a152dc14629f64ae9.tar.xz tutor-module-8379b2e4a5dd76fcbd344b7a152dc14629f64ae9.zip | |
[client] do commit the changes :)
Diffstat (limited to 'dozentenmodul/src/main/java/util')
| -rw-r--r-- | dozentenmodul/src/main/java/util/ResourceLoader.java | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/dozentenmodul/src/main/java/util/ResourceLoader.java b/dozentenmodul/src/main/java/util/ResourceLoader.java index 06200e5a..49c54d9d 100644 --- a/dozentenmodul/src/main/java/util/ResourceLoader.java +++ b/dozentenmodul/src/main/java/util/ResourceLoader.java @@ -1,5 +1,7 @@ package util; +import gui.intro.Login_GUI; + import java.awt.Color; import java.awt.Font; import java.awt.Graphics2D; @@ -10,6 +12,8 @@ import java.net.URL; import javax.swing.ImageIcon; +import org.apache.log4j.Logger; + /** * Helper class for loading resources. * This should be error safe loaders with a fall back in case the @@ -18,6 +22,11 @@ import javax.swing.ImageIcon; public class ResourceLoader { /** + * Logger for this class + */ + private final static Logger LOGGER = Logger.getLogger(ResourceLoader.class); + + /** * Load the given resource as an ImageIcon. * This is guaranteed to never throw an Exception and always return * an ImageIcon. If the requested resource could not be loaded, @@ -30,12 +39,12 @@ public class ResourceLoader { public static ImageIcon getIcon(String path, String description) { URL url = ResourceLoader.class.getResource(path); if (url == null) { - System.out.println("Resource not found: " + path); + LOGGER.error("Resource not found: " + path); } else { try { return new ImageIcon(url, description); } catch (Exception e) { - System.out.println("Resource not loadable: " + path); + LOGGER.error("Resource not loadable: " + path); } } // If we reach here loading failed, create image containing error |
