Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

shut off spamming by changing logging from INFO to FINE, closes #65

  • Loading branch information...
commit b9d244f0cf8f17e5927d0136504fa5d453725d18 1 parent 3a9ecb3
void authored
Showing with 107 additions and 122 deletions.
  1. +0 −1  nifty-controls/src/main/java/de/lessvoid/nifty/controls/MessageBox.java
  2. +0 −2  nifty-controls/src/main/java/de/lessvoid/nifty/controls/chatcontrol/ChatControl.java
  3. +37 −37 nifty-core/src/main/java/de/lessvoid/nifty/Nifty.java
  4. +4 −4 nifty-core/src/main/java/de/lessvoid/nifty/NiftyEventAnnotationProcessor.java
  5. +2 −2 nifty-core/src/main/java/de/lessvoid/nifty/NiftyMethodInvoker.java
  6. +1 −2  nifty-core/src/main/java/de/lessvoid/nifty/NiftyStopwatch.java
  7. +2 −2 nifty-core/src/main/java/de/lessvoid/nifty/controls/dynamic/ScreenCreator.java
  8. +5 −5 nifty-core/src/main/java/de/lessvoid/nifty/effects/Effect.java
  9. +2 −2 nifty-core/src/main/java/de/lessvoid/nifty/effects/EffectProcessorImpl.java
  10. +0 −3  nifty-core/src/main/java/de/lessvoid/nifty/effects/impl/Hide.java
  11. +0 −3  nifty-core/src/main/java/de/lessvoid/nifty/effects/impl/Show.java
  12. +3 −3 nifty-core/src/main/java/de/lessvoid/nifty/elements/Element.java
  13. +5 −5 nifty-core/src/main/java/de/lessvoid/nifty/loaderv2/NiftyLoader.java
  14. +10 −10 nifty-core/src/main/java/de/lessvoid/nifty/loaderv2/types/NiftyType.java
  15. +1 −1  nifty-core/src/main/java/de/lessvoid/nifty/loaderv2/types/RegisterMouseCursorType.java
  16. +4 −4 nifty-core/src/main/java/de/lessvoid/nifty/loaderv2/types/ScreenType.java
  17. +2 −2 nifty-core/src/main/java/de/lessvoid/nifty/render/image/ImageModeHelper.java
  18. +2 −3 nifty-core/src/main/java/de/lessvoid/nifty/screen/Screen.java
  19. +0 −4 nifty-core/src/main/java/de/lessvoid/xml/tools/MethodInvoker.java
  20. +5 −5 nifty-examples/src/main/java/de/lessvoid/nifty/examples/LwjglInitHelper.java
  21. +5 −5 nifty-examples/src/main/java/de/lessvoid/nifty/examples/defaultcontrols/LwjglInitHelper.java
  22. +1 −1  nifty-examples/src/main/resources/logging.properties
  23. +5 −5 nifty-html/src/test/java/example/LwjglInitHelper.java
  24. +1 −1  nifty-renderer-java2d/src/main/java/de/lessvoid/nifty/java2d/renderer/FontProviderJava2dImpl.java
  25. +1 −1  nifty-renderer-jogl2/src/main/java/de/lessvoid/nifty/renderer/jogl/render/JoglRenderDevice.java
  26. +3 −3 nifty-renderer-lwjgl/src/main/java/de/lessvoid/nifty/renderer/lwjgl/input/LwjglInputSystem.java
  27. +2 −2 nifty-renderer-lwjgl/src/main/java/de/lessvoid/nifty/renderer/lwjgl/render/LwjglRenderDevice.java
  28. +4 −4 nifty-soundsystem-openal/src/main/java/de/lessvoid/nifty/sound/openal/slick/SoundStore.java
View
1  nifty-controls/src/main/java/de/lessvoid/nifty/controls/MessageBox.java
@@ -73,7 +73,6 @@ public MessageBox(Nifty nifty, MessageType messageType, String message,
@Override
public void bind(Nifty nifty, Screen screen, Element element,
Properties parameter, Attributes controlDefinitionAttributes) {
- System.out.println("binding MessageBox");
messageboxPopup = element;
this.nifty = nifty;
if (controlDefinitionAttributes.isSet("buttonCaptions")) {
View
2  nifty-controls/src/main/java/de/lessvoid/nifty/controls/chatcontrol/ChatControl.java
@@ -190,7 +190,6 @@ public void update() {
*/
public final void sendText() {
final String text = textControl.getText();
- LOGGER.log(Level.INFO, "sending text {0}", text);
nifty.publishEvent(getId(), new ChatTextSendEvent(this, text));
textControl.setText("");
}
@@ -205,7 +204,6 @@ public final void sendText() {
*/
@Override
public boolean keyEvent(final NiftyInputEvent inputEvent) {
- LOGGER.log(Level.INFO, "event received: {0}", inputEvent);
if (inputEvent == NiftyStandardInputEvent.SubmitText) {
sendText();
return true;
View
74 nifty-core/src/main/java/de/lessvoid/nifty/Nifty.java
@@ -155,14 +155,14 @@ public String getVersion() {
}
result = out.toString("ISO-8859-1");
} catch (Exception e) {
- log.log(Level.SEVERE, "unable to read version file from classpath", e);
+ log.log(Level.WARNING, "unable to read version file from classpath", e);
} finally {
try {
if (stream != null) {
stream.close();
}
} catch (IOException e) {
- log.log(Level.SEVERE, "unable to close version file from classpath stream. this is a bit odd", e);
+ log.log(Level.WARNING, "unable to close version file from classpath stream. this is a bit odd", e);
}
}
return result;
@@ -209,10 +209,10 @@ private void initializeClipboard() {
Class.forName("java.awt.datatransfer.Clipboard");
clipboard = new ClipboardAWT();
} catch (ClassNotFoundException e) {
- log.info("unable to access class 'java.awt.datatransfer.Clipboard'. clipboard will be disabled.");
+ log.warning("unable to access class 'java.awt.datatransfer.Clipboard'. clipboard will be disabled.");
clipboard = new ClipboardNull();
} catch (Throwable e) {
- log.info("unable to access class 'java.awt.datatransfer.Clipboard'. clipboard will be disabled.");
+ log.warning("unable to access class 'java.awt.datatransfer.Clipboard'. clipboard will be disabled.");
clipboard = new ClipboardNull();
}
}
@@ -247,7 +247,7 @@ public void unsubscribeAnnotations(final Object object) {
}
ClassSaveEventTopicSubscriber theSubscriber = new ClassSaveEventTopicSubscriber(elementId, subscriber, eventClass);
getEventService().subscribeStrongly(elementId, theSubscriber);
- log.info("-> subscribe [" + elementId + "] screen [" + screen + "] -> [" + theSubscriber + "(" + subscriber + "),(" + eventClass + ")]");
+ log.fine("-> subscribe [" + elementId + "] screen [" + screen + "] -> [" + theSubscriber + "(" + subscriber + "),(" + eventClass + ")]");
subscriberRegister.register(screen, elementId, theSubscriber);
}
@@ -260,7 +260,7 @@ public void unsubscribe(final String elementId, final Object object) {
return;
}
getEventService().unsubscribe(elementId, (EventTopicSubscriber<?>) object);
- log.info("<- unsubscribe [" + elementId + "] -> [" + object + "]");
+ log.fine("<- unsubscribe [" + elementId + "] -> [" + object + "]");
}
}
@@ -560,17 +560,17 @@ public void validateXml(final InputStream stream) throws Exception {
* @param filename filename to load
*/
void loadFromFile(final String filename) {
- log.info("loadFromFile [" + filename + "]");
+ log.fine("loadFromFile [" + filename + "]");
try {
long start = timeProvider.getMsTime();
NiftyType niftyType = loader.loadNiftyXml("nifty.nxs", getResourceAsStream(filename), this);
niftyType.create(this, timeProvider);
- if (log.isLoggable(Level.INFO)) {
- log.info(niftyType.output());
+ if (log.isLoggable(Level.FINE)) {
+ log.fine(niftyType.output());
}
long end = timeProvider.getMsTime();
- log.info("loadFromFile took [" + (end - start) + "]");
+ log.fine("loadFromFile took [" + (end - start) + "]");
} catch (Exception e) {
throw new RuntimeException(e);
}
@@ -581,17 +581,17 @@ void loadFromFile(final String filename) {
* @param stream stream to load
*/
void loadFromStream(final InputStream stream) {
- log.info("loadFromStream []");
+ log.fine("loadFromStream []");
try {
long start = timeProvider.getMsTime();
NiftyType niftyType = loader.loadNiftyXml("nifty.nxs", stream, this);
niftyType.create(this, timeProvider);
- if (log.isLoggable(Level.INFO)) {
- log.info(niftyType.output());
+ if (log.isLoggable(Level.FINE)) {
+ log.fine(niftyType.output());
}
long end = timeProvider.getMsTime();
- log.info("loadFromStream took [" + (end - start) + "]");
+ log.fine("loadFromStream took [" + (end - start) + "]");
} catch (Exception e) {
throw new RuntimeException(e);
}
@@ -615,11 +615,11 @@ void prepareScreens(final String xmlId) {
*/
public void gotoScreen(final String id) {
if (gotoScreenInProgess) {
- log.info("gotoScreen [" + id + "] aborted because still in gotoScreenInProgress phase");
+ log.fine("gotoScreen [" + id + "] aborted because still in gotoScreenInProgress phase");
return;
}
- log.info("gotoScreen [" + id + "]");
+ log.fine("gotoScreen [" + id + "]");
gotoScreenInProgess = true;
if (currentScreen.isNull()) {
@@ -640,7 +640,7 @@ public void perform() {
* @param id the new screen id we should go to.
*/
private void gotoScreenInternal(final String id) {
- log.info("gotoScreenInternal [" + id + "]");
+ log.fine("gotoScreenInternal [" + id + "]");
// When someone calls nifty.closePopup() directly followed by a nifty.gotoScreen() the gotoScreen will now win and
// we don't wait for the pending Popups to be closed. We'll simply remove the close Popup events since they would be
@@ -1196,9 +1196,9 @@ public void loadStyleFile(final String styleFile) {
NiftyType niftyType = new NiftyType();
loader.loadStyleFile("nifty-styles.nxs", styleFile, niftyType, this);
niftyType.create(this, getTimeProvider());
- if (log.isLoggable(Level.INFO)) {
- log.info("loadStyleFile");
- log.info(niftyType.output());
+ if (log.isLoggable(Level.FINE)) {
+ log.fine("loadStyleFile");
+ log.fine(niftyType.output());
}
} catch (Exception e) {
log.log(Level.WARNING, e.getMessage(), e);
@@ -1210,9 +1210,9 @@ public void loadControlFile(final String controlFile) {
NiftyType niftyType = new NiftyType();
loader.loadControlFile("nifty-controls.nxs", controlFile, niftyType);
niftyType.create(this, getTimeProvider());
- if (log.isLoggable(Level.INFO)) {
- log.info("loadControlFile");
- log.info(niftyType.output());
+ if (log.isLoggable(Level.FINE)) {
+ log.fine("loadControlFile");
+ log.fine(niftyType.output());
}
} catch (Exception e) {
log.log(Level.WARNING, e.getMessage(), e);
@@ -1227,9 +1227,9 @@ public void registerResourceBundle(final String id, final String filename) {
resourceBundle.getAttributes().set("filename", filename);
niftyType.addResourceBundle(resourceBundle);
niftyType.create(this, getTimeProvider());
- if (log.isLoggable(Level.INFO)) {
- log.info("registerResourceBundle");
- log.info(niftyType.output());
+ if (log.isLoggable(Level.FINE)) {
+ log.fine("registerResourceBundle");
+ log.fine(niftyType.output());
}
} catch (Exception e) {
log.log(Level.WARNING, e.getMessage(), e);
@@ -1242,9 +1242,9 @@ public void registerEffect(final String name, final String classParam) {
RegisterEffectType registerEffect = new RegisterEffectType(name, classParam);
niftyType.addRegisterEffect(registerEffect);
niftyType.create(this, getTimeProvider());
- if (log.isLoggable(Level.INFO)) {
- log.info("registerEffect");
- log.info(niftyType.output());
+ if (log.isLoggable(Level.FINE)) {
+ log.fine("registerEffect");
+ log.fine(niftyType.output());
}
} catch (Exception e) {
log.log(Level.WARNING, e.getMessage(), e);
@@ -1259,9 +1259,9 @@ public void registerSound(final String id, final String filename) {
registerSound.getAttributes().set("filename", filename);
niftyType.addRegisterSound(registerSound);
niftyType.create(this, getTimeProvider());
- if (log.isLoggable(Level.INFO)) {
- log.info("registerSound");
- log.info(niftyType.output());
+ if (log.isLoggable(Level.FINE)) {
+ log.fine("registerSound");
+ log.fine(niftyType.output());
}
} catch (Exception e) {
log.log(Level.WARNING, e.getMessage(), e);
@@ -1276,9 +1276,9 @@ public void registerMusic(final String id, final String filename) {
registerMusic.getAttributes().set("filename", filename);
niftyType.addRegisterMusic(registerMusic);
niftyType.create(this, getTimeProvider());
- if (log.isLoggable(Level.INFO)) {
- log.info("registerMusic");
- log.info(niftyType.output());
+ if (log.isLoggable(Level.FINE)) {
+ log.fine("registerMusic");
+ log.fine(niftyType.output());
}
} catch (Exception e) {
log.warning(e.getMessage());
@@ -1503,7 +1503,7 @@ public void unsubscribeScreen(final Screen screen) {
for (int i=0; i<list.size(); i++) {
ClassSaveEventTopicSubscriber subscriber = list.get(i);
getEventService().unsubscribe(subscriber.getElementId(), subscriber);
- log.info("<- unsubscribe screen for [" + screen + "] [" + subscriber.getElementId() + "] -> [" + subscriber + "]");
+ log.fine("<- unsubscribe screen for [" + screen + "] [" + subscriber.getElementId() + "] -> [" + subscriber + "]");
}
list.clear();
}
@@ -1523,7 +1523,7 @@ public void unsubscribeElement(final Screen screen, final String elementId) {
for (int i=0; i<list.size(); i++) {
ClassSaveEventTopicSubscriber subscriber = list.get(i);
getEventService().unsubscribe(subscriber.getElementId(), subscriber);
- log.info("<- unsubscribe element [" + elementId + "] [" + subscriber.getElementId() + "] -> [" + subscriber + "]");
+ log.fine("<- unsubscribe element [" + elementId + "] [" + subscriber.getElementId() + "] -> [" + subscriber + "]");
}
list.clear();
}
View
8 nifty-core/src/main/java/de/lessvoid/nifty/NiftyEventAnnotationProcessor.java
@@ -78,10 +78,10 @@ private static void patternProcess(final Object obj, final Method method, final
if (add) {
Subscriber subscriber = new Subscriber(obj, method, eventClass);
eventService.subscribeStrongly(pattern, subscriber);
- log.info("-> subscribe [" + pattern + "] -> [" + subscriber + "]");
+ log.fine("-> subscribe [" + pattern + "] -> [" + subscriber + "]");
} else {
eventService.unsubscribe(pattern, obj);
- log.info("<- unsubscribe [" + pattern + "] -> [" + obj + "]");
+ log.fine("<- unsubscribe [" + pattern + "] -> [" + obj + "]");
}
}
@@ -89,10 +89,10 @@ private static void idProcess(final Object obj, final Method method, final boole
if (add) {
Subscriber subscriber = new Subscriber(obj, method, eventClass);
eventService.subscribeStrongly(id, subscriber);
- log.info("-> subscribe [" + id + "] -> [" + subscriber + "]");
+ log.fine("-> subscribe [" + id + "] -> [" + subscriber + "]");
} else {
eventService.unsubscribe(id, obj);
- log.info("<- unsubscribe [" + id + "] -> [" + obj + "]");
+ log.fine("<- unsubscribe [" + id + "] -> [" + obj + "]");
}
}
View
4 nifty-core/src/main/java/de/lessvoid/nifty/NiftyMethodInvoker.java
@@ -39,9 +39,9 @@ public NiftyMethodInvoker(final Nifty nifty, final String methodParam, final Obj
this.target = new Object[targetParam.length];
System.arraycopy(targetParam, 0, target, 0, targetParam.length);
- log.info("target objects for [" + methodWithName + "]");
+ log.fine("target objects for [" + methodWithName + "]");
for (Object o : target) {
- log.info(o.toString());
+ log.fine(o.toString());
}
}
}
View
3  nifty-core/src/main/java/de/lessvoid/nifty/NiftyStopwatch.java
@@ -9,7 +9,6 @@
private static Stack<Long> stack = new Stack<Long>();
{
- System.out.println("init: " + log);
}
public static void start() {
@@ -22,7 +21,7 @@ public static void stop(final String message) {
for (int i=0; i<stack.size(); i++) {
b.append(".");
}
- log.info("[" + String.format("%04d", length) + "] " + b + message);
+ log.fine("[" + String.format("%04d", length) + "] " + b + message);
}
private static long now() {
View
4 nifty-core/src/main/java/de/lessvoid/nifty/controls/dynamic/ScreenCreator.java
@@ -73,7 +73,7 @@ private void addInputMapping(final Screen screen, final String inputMappingClass
if (inputMappingClass != null) {
NiftyInputMapping inputMapping = ClassHelper.getInstance(inputMappingClass, NiftyInputMapping.class);
if (!(screenController instanceof KeyInputHandler)) {
- log.info("class [" + screenController + "] tries to use inputMapping [" + inputMappingClass + "] but does not implement [" + KeyInputHandler.class.getName() + "]");
+ log.warning("class [" + screenController + "] tries to use inputMapping [" + inputMappingClass + "] but does not implement [" + KeyInputHandler.class.getName() + "]");
} else {
screen.addKeyboardInputHandler(inputMapping, KeyInputHandler.class.cast(screenController));
}
@@ -84,7 +84,7 @@ private void addPreInputMapping(final Screen screen, final String inputMappingCl
if (inputMappingClass != null) {
NiftyInputMapping inputMapping = ClassHelper.getInstance(inputMappingClass, NiftyInputMapping.class);
if (!(screenController instanceof KeyInputHandler)) {
- log.info("class [" + screenController + "] tries to use inputMapping [" + inputMappingClass + "] but does not implement [" + KeyInputHandler.class.getName() + "]");
+ log.warning("class [" + screenController + "] tries to use inputMapping [" + inputMappingClass + "] but does not implement [" + KeyInputHandler.class.getName() + "]");
} else {
screen.addPreKeyboardInputHandler(inputMapping, KeyInputHandler.class.cast(screenController));
}
View
10 nifty-core/src/main/java/de/lessvoid/nifty/effects/Effect.java
@@ -129,7 +129,7 @@ public boolean start(final String alternate, final String customKey) {
return false;
}
- log.info("starting effect [" + getStateString() + "] with customKey [" + customKey + "]");
+ log.fine("starting effect [" + getStateString() + "] with customKey [" + customKey + "]");
internalStart();
return true;
}
@@ -250,7 +250,7 @@ private boolean canStartEffect(final String alternate, final String customKey) {
// don't start this effect when it has an alternateKey set.
if (isAlternateEnable()) {
- log.info(
+ log.fine(
"starting effect [" + getStateString() + "] canceled because alternateKey [" + alternate + "] and effect " +
"isAlternateEnable()");
return false;
@@ -259,7 +259,7 @@ private boolean canStartEffect(final String alternate, final String customKey) {
// we have an alternate key
if (isAlternateDisable() && alternateDisableMatches(alternate)) {
// don't start this effect. it has an alternateKey set and should be used for disable matches only
- log.info(
+ log.fine(
"starting effect [" + getStateString() + "] canceled because alternateKey [" + alternate + "] matches " +
"alternateDisableMatches()");
return false;
@@ -267,7 +267,7 @@ private boolean canStartEffect(final String alternate, final String customKey) {
if (isAlternateEnable() && !alternateEnableMatches(alternate)) {
// start with alternateEnable but names don't match ... don't start
- log.info(
+ log.fine(
"starting effect [" + getStateString() + "] canceled because alternateKey [" + alternate + "] does not " +
"match alternateEnableMatches()");
return false;
@@ -275,7 +275,7 @@ private boolean canStartEffect(final String alternate, final String customKey) {
}
if (!customKeyMatches(customKey)) {
- log.info(
+ log.fine(
"starting effect [" + getStateString() + "] canceled because customKey [" + customKey + "] does not match " +
"key set at the effect");
return false;
View
4 nifty-core/src/main/java/de/lessvoid/nifty/effects/EffectProcessorImpl.java
@@ -322,10 +322,10 @@ private void startEffect(final Effect e, final String alternate, final String cu
}
if (!activeEffects.contains(e)) {
- log.info("adding effect as active");
+ log.fine("adding effect as active");
activeEffects.add(e);
} else {
- log.info("NOT adding effect as active because it's already registered as active");
+ log.fine("NOT adding effect as active because it's already registered as active");
}
}
View
3  nifty-core/src/main/java/de/lessvoid/nifty/effects/impl/Hide.java
@@ -1,7 +1,5 @@
package de.lessvoid.nifty.effects.impl;
-import java.util.logging.Logger;
-
import de.lessvoid.nifty.Nifty;
import de.lessvoid.nifty.effects.EffectImpl;
import de.lessvoid.nifty.effects.EffectProperties;
@@ -23,7 +21,6 @@ public void execute(
final float normalizedTime,
final Falloff falloff,
final NiftyRenderEngine r) {
- Logger.getAnonymousLogger().info("hide [" + targetElement + "]");
if (targetElement != null) {
targetElement.hide();
} else {
View
3  nifty-core/src/main/java/de/lessvoid/nifty/effects/impl/Show.java
@@ -1,7 +1,5 @@
package de.lessvoid.nifty.effects.impl;
-import java.util.logging.Logger;
-
import de.lessvoid.nifty.Nifty;
import de.lessvoid.nifty.effects.EffectImpl;
import de.lessvoid.nifty.effects.EffectProperties;
@@ -23,7 +21,6 @@ public void execute(
final float normalizedTime,
final Falloff falloff,
final NiftyRenderEngine r) {
- Logger.getAnonymousLogger().info("show [" + targetElement + "]");
if (targetElement != null) {
targetElement.show();
} else {
View
6 nifty-core/src/main/java/de/lessvoid/nifty/elements/Element.java
@@ -2063,7 +2063,7 @@ public void setStyle(final String newStyle) {
elementType.applyEffects(nifty, screen, this);
elementType.applyInteract(nifty, screen, this);
- log.info("after setStyle [" + newStyle + "]\n" + elementType.output(0));
+ log.fine("after setStyle [" + newStyle + "]\n" + elementType.output(0));
notifyListeners();
}
@@ -2072,12 +2072,12 @@ public String getStyle() {
}
void removeStyle(final String style) {
- log.info("before removeStyle [" + style + "]\n" + elementType.output(0));
+ log.fine("before removeStyle [" + style + "]\n" + elementType.output(0));
elementType.removeWithTag(style);
effectManager.removeAllEffects();
- log.info("after removeStyle [" + style + "]\n" + elementType.output(0));
+ log.fine("after removeStyle [" + style + "]\n" + elementType.output(0));
notifyListeners();
}
View
10 nifty-core/src/main/java/de/lessvoid/nifty/loaderv2/NiftyLoader.java
@@ -41,7 +41,7 @@ public NiftyType loadNiftyXml(
final Nifty nifty) throws Exception {
try {
long start = timeProvider.getMsTime();
- log.info("loading new nifty xml file with schemaId [" + schemaId + "]");
+ log.fine("loading new nifty xml file with schemaId [" + schemaId + "]");
XmlParser parser = new XmlParser(new MXParser());
parser.read(inputStreamXml);
@@ -51,7 +51,7 @@ public NiftyType loadNiftyXml(
niftyType.loadControls(this);
long end = timeProvider.getMsTime();
- log.info("loaded nifty xml file with schemaId [" + schemaId + "] took [" + (end - start) + " ms]");
+ log.fine("loaded nifty xml file with schemaId [" + schemaId + "] took [" + (end - start) + " ms]");
return niftyType;
} finally {
@@ -65,7 +65,7 @@ public boolean validateNiftyXml(final InputStream inputStreamXml) throws Excepti
validate(inputStreamXml);
long end = timeProvider.getMsTime();
- log.info("validating nifty xml took [" + (end - start) + " ms]");
+ log.fine("validating nifty xml took [" + (end - start) + " ms]");
return true;
}
@@ -97,7 +97,7 @@ public void loadStyleFile(
final String styleFilename,
final NiftyType niftyType,
final Nifty nifty) throws Exception {
- log.info("loading new nifty style xml file [" + styleFilename + "] with schemaId [" + schemaId + "]");
+ log.fine("loading new nifty style xml file [" + styleFilename + "] with schemaId [" + schemaId + "]");
XmlParser parser = new XmlParser(new MXParser());
InputStream stream = nifty.getResourceAsStream(styleFilename);
@@ -114,7 +114,7 @@ public void loadControlFile(
final String schemaId,
final String controlFilename,
final NiftyType niftyType) throws Exception {
- log.info("loading new nifty controls xml file [" + controlFilename + "] with schemaId [" + schemaId + "]");
+ log.fine("loading new nifty controls xml file [" + controlFilename + "] with schemaId [" + schemaId + "]");
XmlParser parser = new XmlParser(new MXParser());
InputStream stream = nifty.getResourceAsStream(controlFilename);
View
20 nifty-core/src/main/java/de/lessvoid/nifty/loaderv2/types/NiftyType.java
@@ -72,21 +72,21 @@ public void addScreen(final ScreenType screenType) {
public void create(final Nifty nifty, final TimeProvider timeProvider) {
StopWatch stopWatch = new StopWatch(timeProvider);
stopWatch.start();
- log.info("debug out [" + stopWatch.stop() + "]");
+ log.fine("debug out [" + stopWatch.stop() + "]");
stopWatch.start();
for (ResourceBundleType resourceBundle : resourceBundles) {
resourceBundle.translateSpecialValues(nifty, null);
resourceBundle.materialize(nifty);
}
- log.info("resourceBundles [" + stopWatch.stop() + "]");
+ log.fine("resourceBundles [" + stopWatch.stop() + "]");
stopWatch.start();
for (StyleType style : styles) {
style.translateSpecialValues(nifty, null);
nifty.registerStyle(style);
}
- log.info("registerStyle [" + stopWatch.stop() + "]");
+ log.fine("registerStyle [" + stopWatch.stop() + "]");
stopWatch.start();
for (ControlDefinitionType controlDefintion : controlDefinitions) {
@@ -94,49 +94,49 @@ public void create(final Nifty nifty, final TimeProvider timeProvider) {
controlDefintion.makeFlat();
nifty.registerControlDefintion(controlDefintion);
}
- log.info("registerControlDefinition [" + stopWatch.stop() + "]");
+ log.fine("registerControlDefinition [" + stopWatch.stop() + "]");
stopWatch.start();
for (RegisterEffectType registerEffectType : registeredEffect) {
registerEffectType.translateSpecialValues(nifty, null);
nifty.registerEffect(registerEffectType);
}
- log.info("registerEffect [" + stopWatch.stop() + "]");
+ log.fine("registerEffect [" + stopWatch.stop() + "]");
stopWatch.start();
for (RegisterSoundType registerSoundType : registeredSounds) {
registerSoundType.translateSpecialValues(nifty, null);
registerSoundType.materialize(nifty.getSoundSystem());
}
- log.info("registerSound [" + stopWatch.stop() + "]");
+ log.fine("registerSound [" + stopWatch.stop() + "]");
stopWatch.start();
for (RegisterMusicType registerMusicType : registeredMusic) {
registerMusicType.translateSpecialValues(nifty, null);
registerMusicType.materialize(nifty.getSoundSystem());
}
- log.info("registerMusic [" + stopWatch.stop() + "]");
+ log.fine("registerMusic [" + stopWatch.stop() + "]");
stopWatch.start();
for (RegisterMouseCursorType registerMouseCursorType : registeredMouseCursor) {
registerMouseCursorType.translateSpecialValues(nifty, null);
registerMouseCursorType.materialize(nifty, log);
}
- log.info("registerMouseCursor [" + stopWatch.stop() + "]");
+ log.fine("registerMouseCursor [" + stopWatch.stop() + "]");
stopWatch.start();
for (PopupType popup : popups) {
popup.translateSpecialValues(nifty, null);
nifty.registerPopup(popup);
}
- log.info("registerPopup [" + stopWatch.stop() + "]");
+ log.fine("registerPopup [" + stopWatch.stop() + "]");
stopWatch.start();
for (ScreenType screen : screens) {
screen.translateSpecialValues(nifty, null);
screen.create(nifty, this, timeProvider);
}
- log.info("create Screens [" + stopWatch.stop() + "]");
+ log.fine("create Screens [" + stopWatch.stop() + "]");
}
public void loadStyles(final NiftyLoader niftyLoader, final Nifty nifty) throws Exception {
View
2  nifty-core/src/main/java/de/lessvoid/nifty/loaderv2/types/RegisterMouseCursorType.java
@@ -14,7 +14,7 @@ public String output(final int offset) {
public void materialize(final Nifty nifty, final Logger log) {
try {
nifty.getNiftyMouse().registerMouseCursor(getId(), getFilename(), getHotspotX(), getHotspotY());
- log.info("Registering mouseCursor with id [" + getId() + "]");
+ log.fine("Registering mouseCursor with id [" + getId() + "]");
} catch (IOException e) {
log.warning("Error registering mouse cursor: " + e.getMessage());
}
View
8 nifty-core/src/main/java/de/lessvoid/nifty/loaderv2/types/ScreenType.java
@@ -49,7 +49,7 @@ public void create(
if (inputMappingClass != null) {
NiftyInputMapping inputMapping = ClassHelper.getInstance(inputMappingClass, NiftyInputMapping.class);
if (!(screenController instanceof KeyInputHandler)) {
- log.info("class [" + controller + "] tries to use inputMapping [" + inputMappingClass + "] but does not implement [" + KeyInputHandler.class.getName() + "]");
+ log.warning("class [" + controller + "] tries to use inputMapping [" + inputMappingClass + "] but does not implement [" + KeyInputHandler.class.getName() + "]");
} else {
screen.addKeyboardInputHandler(inputMapping, KeyInputHandler.class.cast(screenController));
}
@@ -58,7 +58,7 @@ public void create(
if (inputMappingPreClass != null) {
NiftyInputMapping inputMapping = ClassHelper.getInstance(inputMappingPreClass, NiftyInputMapping.class);
if (!(screenController instanceof KeyInputHandler)) {
- log.info("class [" + controller + "] tries to use inputMapping [" + inputMappingPreClass + "] but does not implement [" + KeyInputHandler.class.getName() + "]");
+ log.warning("class [" + controller + "] tries to use inputMapping [" + inputMappingPreClass + "] but does not implement [" + KeyInputHandler.class.getName() + "]");
} else {
screen.addPreKeyboardInputHandler(inputMapping, KeyInputHandler.class.cast(screenController));
}
@@ -72,7 +72,7 @@ public void create(
for (LayerType layerType : layers) {
layerType.prepare(nifty, screen, rootElement.getElementType());
}
- Logger.getLogger(NiftyLoader.class.getName()).info("internal prepare screen (" + id + ") [" + stopWatch.stop() + "]");
+ Logger.getLogger(NiftyLoader.class.getName()).fine("internal prepare screen (" + id + ") [" + stopWatch.stop() + "]");
stopWatch.start();
for (LayerType layerType : layers) {
@@ -84,7 +84,7 @@ public void create(
screen,
layerLayout));
}
- Logger.getLogger(NiftyLoader.class.getName()).info("internal create screen (" + id + ") [" + stopWatch.stop() + "]");
+ Logger.getLogger(NiftyLoader.class.getName()).fine("internal create screen (" + id + ") [" + stopWatch.stop() + "]");
screen.processAddAndRemoveLayerElements();
nifty.addScreen(id, screen);
View
4 nifty-core/src/main/java/de/lessvoid/nifty/render/image/ImageModeHelper.java
@@ -22,7 +22,7 @@ public static String getAreaProviderProperty(final Map<String, String> propertie
final String imageModeProperty = properties.get("imageMode");
String property = getAreaProviderProperty(imageModeProperty);
if (property != null) {
- log.info("imageMode property converted to imageArea property : " + imageModeProperty + " -> " + property);
+ log.fine("imageMode property converted to imageArea property : " + imageModeProperty + " -> " + property);
return property;
}
@@ -58,7 +58,7 @@ public static String getRenderStrategyProperty(final Map<String, String> propert
final String imageModeProperty = properties.get("imageMode");
String property = getRenderStrategyProperty(imageModeProperty);
if (property != null) {
- log.info("imageMode property converted to renderStrategy property : " + imageModeProperty + " -> "
+ log.fine("imageMode property converted to renderStrategy property : " + imageModeProperty + " -> "
+ property);
return property;
}
View
5 nifty-core/src/main/java/de/lessvoid/nifty/screen/Screen.java
@@ -72,7 +72,7 @@ public Screen(
screenId = newId;
screenController = newScreenController;
if (screenController == null) {
- log.info("Missing ScreenController for screen [" + newId + "] using DefaultScreenController() instead but this might not be what you want.");
+ log.warning("Missing ScreenController for screen [" + newId + "] using DefaultScreenController() instead but this might not be what you want.");
screenController = new DefaultScreenController();
}
timeProvider = newTimeProvider;
@@ -653,7 +653,7 @@ public StartScreenEndNotify(final EndNotify additionalEndNotify) {
}
public void perform() {
- log.info("onStartScreen has ended");
+ log.fine("onStartScreen has ended");
if (additionalEndNotify != null) {
additionalEndNotify.perform();
@@ -675,7 +675,6 @@ public EndScreenEndNotify(final EndNotify additionalEndNotify) {
}
public void perform() {
- Logger.getAnonymousLogger().info("onEndScreen has ended");
onEndScreenHasEnded();
if (additionalEndNotify != null) {
additionalEndNotify.perform();
View
4 nifty-core/src/main/java/de/lessvoid/xml/tools/MethodInvoker.java
@@ -39,10 +39,6 @@ public MethodInvoker(final String methodParam, final Object ... targetParam) {
this.target[idx] = o;
idx--;
}
-// log.info("target objects for [" + methodWithName + "]");
-// for (Object o : target) {
-// log.info(o.toString());
-// }
}
}
View
10 nifty-examples/src/main/java/de/lessvoid/nifty/examples/LwjglInitHelper.java
@@ -153,7 +153,7 @@ public int compare(final DisplayMode o1, final DisplayMode o2) {
System.exit(-1);
}
- log.info(
+ log.fine(
"Width: " + Display.getDisplayMode().getWidth()
+ ", Height: " + Display.getDisplayMode().getHeight()
+ ", Bits per pixel: " + Display.getDisplayMode().getBitsPerPixel()
@@ -161,10 +161,10 @@ public int compare(final DisplayMode o1, final DisplayMode o2) {
+ ", Title: " + Display.getTitle());
// just output some infos about the system we're on
- log.info("plattform: " + LWJGLUtil.getPlatformName());
- log.info("opengl version: " + GL11.glGetString(GL11.GL_VERSION));
- log.info("opengl vendor: " + GL11.glGetString(GL11.GL_VENDOR));
- log.info("opengl renderer: " + GL11.glGetString(GL11.GL_RENDERER));
+ log.fine("plattform: " + LWJGLUtil.getPlatformName());
+ log.fine("opengl version: " + GL11.glGetString(GL11.GL_VERSION));
+ log.fine("opengl vendor: " + GL11.glGetString(GL11.GL_VENDOR));
+ log.fine("opengl renderer: " + GL11.glGetString(GL11.GL_RENDERER));
String extensions = GL11.glGetString(GL11.GL_EXTENSIONS);
if (extensions != null) {
String[] ext = extensions.split(" ");
View
10 nifty-examples/src/main/java/de/lessvoid/nifty/examples/defaultcontrols/LwjglInitHelper.java
@@ -155,7 +155,7 @@ public int compare(final DisplayMode o1, final DisplayMode o2) {
System.exit(-1);
}
- log.info(
+ log.fine(
"Width: " + Display.getDisplayMode().getWidth()
+ ", Height: " + Display.getDisplayMode().getHeight()
+ ", Bits per pixel: " + Display.getDisplayMode().getBitsPerPixel()
@@ -163,10 +163,10 @@ public int compare(final DisplayMode o1, final DisplayMode o2) {
+ ", Title: " + Display.getTitle());
// just output some infos about the system we're on
- log.info("plattform: " + LWJGLUtil.getPlatformName());
- log.info("opengl version: " + GL11.glGetString(GL11.GL_VERSION));
- log.info("opengl vendor: " + GL11.glGetString(GL11.GL_VENDOR));
- log.info("opengl renderer: " + GL11.glGetString(GL11.GL_RENDERER));
+ log.fine("plattform: " + LWJGLUtil.getPlatformName());
+ log.fine("opengl version: " + GL11.glGetString(GL11.GL_VERSION));
+ log.fine("opengl vendor: " + GL11.glGetString(GL11.GL_VENDOR));
+ log.fine("opengl renderer: " + GL11.glGetString(GL11.GL_RENDERER));
String extensions = GL11.glGetString(GL11.GL_EXTENSIONS);
if (extensions != null) {
String[] ext = extensions.split(" ");
View
2  nifty-examples/src/main/resources/logging.properties
@@ -4,7 +4,7 @@ java.util.logging.ConsoleHandler.level = ALL
java.util.logging.ConsoleHandler.formatter = de.lessvoid.nifty.examples.LoggerShortFormat
# you can change this to ALL to see all logging
-de.lessvoid.level = WARNING
+#de.lessvoid.level = INFO
# some common used loggers to debug
#de.lessvoid.nifty.Nifty.level = FINE
View
10 nifty-html/src/test/java/example/LwjglInitHelper.java
@@ -148,7 +148,7 @@ public int compare(final DisplayMode o1, final DisplayMode o2) {
System.exit(-1);
}
- log.info(
+ log.fine(
"Width: " + Display.getDisplayMode().getWidth()
+ ", Height: " + Display.getDisplayMode().getHeight()
+ ", Bits per pixel: " + Display.getDisplayMode().getBitsPerPixel()
@@ -156,10 +156,10 @@ public int compare(final DisplayMode o1, final DisplayMode o2) {
+ ", Title: " + Display.getTitle());
// just output some infos about the system we're on
- log.info("plattform: " + LWJGLUtil.getPlatformName());
- log.info("opengl version: " + GL11.glGetString(GL11.GL_VERSION));
- log.info("opengl vendor: " + GL11.glGetString(GL11.GL_VENDOR));
- log.info("opengl renderer: " + GL11.glGetString(GL11.GL_RENDERER));
+ log.fine("plattform: " + LWJGLUtil.getPlatformName());
+ log.fine("opengl version: " + GL11.glGetString(GL11.GL_VERSION));
+ log.fine("opengl vendor: " + GL11.glGetString(GL11.GL_VENDOR));
+ log.fine("opengl renderer: " + GL11.glGetString(GL11.GL_RENDERER));
String extensions = GL11.glGetString(GL11.GL_EXTENSIONS);
if (extensions != null) {
String[] ext = extensions.split(" ");
View
2  ...nderer-java2d/src/main/java/de/lessvoid/nifty/java2d/renderer/FontProviderJava2dImpl.java
@@ -32,7 +32,7 @@ public Font getFont(String name) {
}
private Font getDefaultFont(String name) {
- logger.info("font " + name
+ logger.fine("font " + name
+ " not found, using default font instead");
if (defaultFont != null)
return defaultFont;
View
2  ...renderer-jogl2/src/main/java/de/lessvoid/nifty/renderer/jogl/render/JoglRenderDevice.java
@@ -109,7 +109,7 @@ private Point getViewport() {
final GL gl = GLContext.getCurrentGL();
gl.glGetIntegerv(GL.GL_VIEWPORT, viewportBuffer);
Point dimensions = new Point(viewportBuffer.get(2),viewportBuffer.get(3));
- log.info("Viewport: " + dimensions.x + ", " + dimensions.y);
+ log.fine("Viewport: " + dimensions.x + ", " + dimensions.y);
return dimensions;
}
View
6 ...renderer-lwjgl/src/main/java/de/lessvoid/nifty/renderer/lwjgl/input/LwjglInputSystem.java
@@ -153,9 +153,9 @@ private void logMouseCapabilities() {
if ((caps & Cursor.CURSOR_ANIMATION) != 0) {
add(out, "CURSOR_ANIMATION");
}
- log.info("native cursor support (" + caps + ") -> [" + out.toString() + "]");
- log.info("native cursor min size: " + Cursor.getMinCursorSize());
- log.info("native cursor max size: " + Cursor.getMaxCursorSize());
+ log.fine("native cursor support (" + caps + ") -> [" + out.toString() + "]");
+ log.fine("native cursor min size: " + Cursor.getMinCursorSize());
+ log.fine("native cursor max size: " + Cursor.getMaxCursorSize());
}
private static void add(StringBuffer out, String text) {
View
4 ...nderer-lwjgl/src/main/java/de/lessvoid/nifty/renderer/lwjgl/render/LwjglRenderDevice.java
@@ -112,8 +112,8 @@ private void getViewport() {
GL11.glGetInteger(GL11.GL_VIEWPORT, viewportBuffer);
viewportWidth = viewportBuffer.get(2);
viewportHeight = viewportBuffer.get(3);
- if (log.isLoggable(Level.INFO)) {
- log.info("Viewport: " + viewportWidth + ", " + viewportHeight);
+ if (log.isLoggable(Level.FINE)) {
+ log.fine("Viewport: " + viewportWidth + ", " + viewportHeight);
}
}
View
8 nifty-soundsystem-openal/src/main/java/de/lessvoid/nifty/sound/openal/slick/SoundStore.java
@@ -288,7 +288,7 @@ public void init() {
if (inited) {
return;
}
- log.info("Initialising sounds..");
+ log.fine("Initialising sounds..");
inited = true;
AccessController.doPrivileged(new PrivilegedAction<Object>() {
@@ -298,7 +298,7 @@ public Object run() {
soundWorks = true;
sounds = true;
music = true;
- log.info("- Sound works");
+ log.fine("- Sound works");
} catch (Exception e) {
log.warning("Sound initialisation failure." + e.getMessage());
soundWorks = false;
@@ -330,7 +330,7 @@ public Object run() {
break;
}
}
- log.info("- "+sourceCount+" OpenAL source available");
+ log.fine("- "+sourceCount+" OpenAL source available");
if (AL10.alGetError() != AL10.AL_NO_ERROR) {
sounds = false;
@@ -351,7 +351,7 @@ public Object run() {
AL10.alListener(AL10.AL_VELOCITY, listenerVel);
AL10.alListener(AL10.AL_ORIENTATION, listenerOri);
- log.info("- Sounds source generated");
+ log.fine("- Sounds source generated");
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.