::

          Usage:
              loglevel
              loglevel critical
              loglevel error
              loglevel warning
              loglevel info
              loglevel debug

              Shows current log level or changes it.

              loglevel - shows current log level
              critical - shows log message in critical level
              error    - shows log message in error level including critical
              warning  - shows log message in warning level including error
              info     - shows log message in info level including warning
              debug    - shows log message in debug level including info

def do_loglevel(self, args, arguments):
        """
        ::

          Usage:
              loglevel
              loglevel critical
              loglevel error
              loglevel warning
              loglevel info
              loglevel debug

              Shows current log level or changes it.

              loglevel - shows current log level
              critical - shows log message in critical level
              error    - shows log message in error level including critical
              warning  - shows log message in warning level including error
              info     - shows log message in info level including warning
              debug    - shows log message in debug level including info

        """
        if arguments['debug']:
            self.loglevel = "DEBUG"
        elif arguments['error']:
            self.loglevel = "ERROR"
        elif arguments['warning']:
            self.loglevel = "WARNING"
        elif arguments['info']:
            self.loglevel = "INFO"
        elif arguments['critical']:
            self.loglevel = "CRITICAL"
        else:
            Console.ok("Log level: {0}".format(self.loglevel))
            return
        Console.ok ("Log level: {0} is set".format(self.loglevel))

        filename = path_expand("~/.cloudmesh/cmd3.yaml")
        config = ConfigDict(filename=filename)
        config["cmd3"]["properties"]["loglevel"] = self.loglevel
        config.write(filename=filename, output="yaml", attribute_indent="    ")