'Logs and returns the entire html source of the current page or frame.
The `loglevel` argument defines the used log level. Valid log levels
are WARN, INFO (default), DEBUG, and NONE (no logging).'

@keyword
def log_source(self, loglevel='INFO'):

    source = self.get_source()
    self.log(source, loglevel.upper())
    return source
