[Nifty] Changing log level so that de.lessvoid.nifty.effects.EffectProcessor startEffect don't appea

Hello,



Now I’m using the imageOverlay effect on all my controls. It works great but…



My logfile becomes unusable.

I get 5000 messages like :


Jan 12, 2011 5:55:03 PM de.lessvoid.nifty.effects.EffectProcessor startEffect
INFO: starting effect [(ImageOverlay)] canceled because customKey [mapSelection_show] does not match key set at the effect

Just for one screen.

I would like to keep some of the INFO nifty messages, but I don't need those ones.
Is it really usefull to keep thoses logs at the INFO Level ?

Just in case, the problem comes from the way I start my effects, here is the code I use :
[java]
public void reloadEffect()
{
//
// PanelElt
//
panelElt.getEffectManager().resetAll();

String panelEffectKey = effectName;
if( panelEffectKey.equals("") )
panelEffectKey = "empty";
panelElt.startEffect( EffectEventId.onCustom, null, panelEffectKey );

//
// ImageElt
//
imageElt.getEffectManager().resetAll();

if( ! effectName.equals("") )
{
String imageEffectKey = effectName + "_";
if( checked )
imageEffectKey += "show";
else
imageEffectKey += "hide";

imageElt.startEffect( EffectEventId.onCustom, null, imageEffectKey );
}
}
[/java]

Logger.getLogger(“de.lessvoid.nifty”).setLevel(Level.SEVERE);

Haha, I begin to understand what I’m doing wrong…



With castor XML generator, I use Log4J for the logs … and I don’t know why but I assumed it was the same for jme3 and nifty. :smiley:

You gave me the lead by using Level.SEVERE that isn’t inside Log4J



I’m not good with those logging methods.

It seems I still have some issue. Just adding the line doesn’t seem to be enough.

But since it’s 5AM, I will think about it tomorrow!



Thanks for the answer!



PS : Should the line be added after adding the NiftyDisplay or can I add it at first line of my program ?



Edit :

I sovled my problem - I just needed to add this line inside my Callable object that create the nifty part.