I can write this kind of code with apache commons cli:
HelpFormatter formatter = new HelpFormatter();
formatter.printHelp("myapp", options, true);
This will print all the command line options and their description.
I want to print this using a logger, like log4j, but I don't know how, there's only the printHelp function in the HelpFormatter class.
I don't want to over-engineer anything, is there a standard way of doing this?