title: How to set root log level for application in micronaut
body: <p>I am working on a cli application that can take in some options: <code>--info</code>, <code>--debug</code>, <code>--trace</code>. I would like to use the arguments to set the logging level for the entire application. Is there an easy way to do this? This is what I have tried so far:</p>
  
  <pre><code>    LogLevel level;
      if(info) {
        level = LogLevel.INFO;
      } else if (debug) {
        level = LogLevel.DEBUG;
      } else if (trace) {
        level = LogLevel.TRACE;
      } else {
        level = LogLevel.WARN;
      }
      loggingSystem.setLogLevel(Logger.ROOT_LOGGER_NAME, level);
  </code></pre>
  
  <p><code>loggingSystem</code> is injected into the class.</p>
  
  <pre><code>  @Inject
    private LoggingSystem loggingSystem;
  </code></pre>