Changing the level of logs

(Samuel Thiriot) #1


I tried switching all the System.out of the plugins I develop to logs using the JavaLogger open mole convention.
But then I’m a bit lost: how can I display the logs of just my component?

I tried tuning logback.xml which seems to be the underlying system for logs redirection, but it does not seem to have any concrete impact.

I saw the option loglevel when launching openmole, but it does not enable to precise the logs I want to listen to - and there are many xawt logs which hide mine.

Do you have any idea? Tks !


Hi Sam,

sorry, but there is no way to do that easily yet… Or may be there is by wrestling with the legacy java logging system :slight_smile:

I think (since a while) that the logging system of openmole is archaic and should be modernized. We are still relying on global variables and global services and not a configurable service that is passed through the stack as argument to each function that uses it.


(Samuel Thiriot) #3

Ok ! No problem, at least I know I did not missed something :wink: Thanks for replying !


May be we can incept a properly designed logging service, test it for your component and then progressively migrate the other components of OpenMOLE once it is satisfying.

(Samuel Thiriot) #5

mmm would make sense.
I had the feeling you were relying on a pretty standard system already; in the JavaLogger trait, you’re using the standard Java Logger interface which then opens the way to easy filtering by hierarchical loggers. By the way, you already have a configuration/logback.xml configuration file which configures the appenders peculiar to openmole; so it seems like a bit of fixing should be enough to use the capabilities of these standard systems… or did I miss something?