From 7108050abc2902d67e67b7e8ad7198c62534b3a2 Mon Sep 17 00:00:00 2001 From: Amedeo Paglione Date: Sun, 21 Sep 2003 23:24:29 +0000 Subject: [PATCH] Changed System.err with the more appropriate Log. --- com/gallery/GalleryRemote/util/GRI18n.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/com/gallery/GalleryRemote/util/GRI18n.java b/com/gallery/GalleryRemote/util/GRI18n.java index dbeeb87..39c65df 100644 --- a/com/gallery/GalleryRemote/util/GRI18n.java +++ b/com/gallery/GalleryRemote/util/GRI18n.java @@ -6,6 +6,7 @@ package com.gallery.GalleryRemote.util; import com.gallery.GalleryRemote.GalleryRemote; +import com.gallery.GalleryRemote.Log; import com.gallery.GalleryRemote.prefs.PreferenceNames; import java.util.Locale; @@ -14,6 +15,8 @@ public class GRI18n implements PreferenceNames { private static final String RESNAME = "com.gallery.GalleryRemote.resources.GRResources"; + private static final String MODULE = "MainFrame"; + private static GRI18n ourInstance; private Locale grLocale; private ResourceBundle grResBundle; @@ -51,10 +54,12 @@ public String getString(String key) { try { msg = grResBundle.getString(key); } catch (NullPointerException e) { - System.err.println(e.toString()); + Log.log(Log.ERROR, MODULE, "Key null error"); + Log.logException(Log.ERROR, MODULE, e); msg = "[NULLKEY]"; } catch (MissingResourceException e) { - System.err.println(e.toString()); + Log.log(Log.INFO, MODULE, "Key [" + key + "] not defined"); + Log.logException(Log.INFO, MODULE, e); msg = "["+key+"]"; } @@ -66,7 +71,8 @@ private void setResBoundle() { try { grResBundle = ResourceBundle.getBundle(RESNAME, grLocale); } catch (MissingResourceException e) { - System.err.println(e.toString()); + Log.log(Log.ERROR, MODULE, "Resource bundle error"); + Log.logException(Log.ERROR, MODULE, e); } }