I've found the solution :
Code:
StaticApplicationContext ctx = new StaticApplicationContext();
ctx.getDefaultListableBeanFactory().registerSingleton("log", this);
Just for info, my tool uses commons-logging and is Spring based for IoC. I'm writting an ANT task to run it (in fact, a maven plugin)
commons-logging doesn't redirect logs to ANT console, so I've made my ant task implement Log interface and put it into spring context. I've added to my beans a 'setLog(Log)' method, so I can replace the logger commons-logging has set.
Using this, my beans get the "Ant console redirect" Log and I get my debugs on console.