Operation: Get Console Audit Log.
969257
def post(method, hmc, uri, uri_parms, body, logon_required,
             wait_for_completion):
        """"""
        assert wait_for_completion is True  # synchronous operation
        console_uri = '/api/console'
        try:
            hmc.lookup_by_uri(console_uri)
        except KeyError:
            raise InvalidResourceError(method, uri)
        resp = []
        # TODO: Add the ability to return audit log entries in mock support.
        return resp
121392
def get_logger(name, level=0):
        """"""
        level = 0 if not isinstance(level, int) else level
        level = 0 if level < 0 else level
        level = 4 if level > 4 else level
        console = logging.StreamHandler()
        level = [logging.NOTSET, logging.ERROR, logging.WARN, logging.INFO,
                 logging.DEBUG][level]
        console.setLevel(level)
        formatter = logging.Formatter(LOGGING_FORMAT)
        console.setFormatter(formatter)
        logging.getLogger('').addHandler(console)
        return logging.getLogger(name)
1048824
def status_log(func, message, *args, **kwargs):
    """"""

    click.echo(message)
    log = func(*args, **kwargs)

    if log:
        out = []

        for line in log.split('\n'):
            if not line.startswith('#'):
                out.append(line)
        click.echo(black('\n'.join(out)))
816750
function logResults(output) {
  var context = requisition.conversionContext;
  return output.convert('string', context).then(function(message) {
    if (output.error) {
      console.error(message);
    }
    else {
      console.log(message);
    }
    return output;
  });
}
1354740
function ConsoleLogger() {

    this.error = function () {
        if (loggingLevel(ERROR)) {
            console.error.apply(this, arguments);
        }
    };

    this.warn = function () {
        if (loggingLevel(WARN)) {
            console.warn.apply(this, arguments);
        }
    };

    this.info = function () {
        if (loggingLevel(INFO)) {
            console.info.apply(this, arguments);
        }
    };

    this.log = function () {
        if (loggingLevel(INFO)) {
            console.log.apply(this, arguments);
        }
    };

    this.debug = function () {
        if (loggingLevel(DEBUG)) {
            console.log.apply(this, arguments);
        }
    };

    this.setLevelToInfo = function () {
        setLevel(INFO);
    };

    this.setLevelToDebug = function() {
        setLevel(DEBUG);
    };

    this.setLevelToWarning = function() {
        setLevel(WARN);
    };

    this.setLevelToError = function() {
        setLevel(ERROR);
    };
}
1087182
def set_up_logging(log_file, console_log_level):
    """"""
    logger = logging.getLogger()
    logger.setLevel(logging.DEBUG)
    fh = logging.FileHandler(str(log_file))
    fh.setLevel(logging.DEBUG)
    ch = logging.StreamHandler()
    ch.setLevel(console_log_level)
    formatter = logging.Formatter(
        "{asctime} {levelname} ({name}): {message}", style='{'
    )
    fh.setFormatter(formatter)
    ch.setFormatter(formatter)
    logger.addHandler(fh)
    logger.addHandler(ch)

    return logger
18577
function rlog()
    {
      process.stdout.clearLine();
      process.stdout.cursorTo(0);
      console.log.apply(console, arguments);
      rl.prompt();
    }
958279
function getLogEvent(level, message, rawMessage) {
            return {
                hostname: os.hostname(),
                pid: process.pid,
                gid: hasGetGid ? process.getgid() : null,
                processTitle: process.title,
                level: level,
                levelName: level.name,
                message: message,
                timeStamp: new Date(),
                name: this.fullName,
                rawMessage: rawMessage
            };
        }
1318826
def get_log_file(self, api=None):
        
        api = api or self._API
        log_file_data = self.execution_details.get('log_file')
        return File(api=api, **log_file_data) if log_file_data else None
964034
def audit_log_show(self, id, **kwargs):
        ""
        api_path = "/api/v2/audit_logs/{id}.json"
        api_path = api_path.format(id=id)
        return self.call(api_path, **kwargs)
494923
def get_logger(name, namespace='{{project.package}}',
               log_level=DEFAULT_LOG_LEVEL, log_dir=DEFAULT_LOG_DIR):
    """"""

    log_level = (os.getenv('{}_LOG_LEVEL'.format(namespace.upper())) or
                 os.getenv('LOG_LEVEL', log_level))
    log_dir = (os.getenv('{}_LOG_DIR'.format(namespace.upper())) or
               os.getenv('LOG_DIR', log_dir))

    logger = logging.getLogger('{}.{}'.format(namespace, name))
    logger.setLevel(log_level)

    formatter = logging.Formatter(
        '%(asctime)s - %(name)s - %(levelname)s - %(message)s')

    # Create a console stream handler
    console_handler = logging.StreamHandler()
    console_handler.setLevel(log_level)
    console_handler.setFormatter(formatter)
    logger.addHandler(console_handler)

    try:
        if log_dir:
            log_path = os.path.abspath(log_dir)
            log_filename = '{name}.{pid}.log'.format(
                name=namespace, pid=os.getpid())

            file_path = str(os.path.join(log_path, log_filename))

            if not os.path.exists(log_path):
                os.makedirs(log_path, mode=774)

            # Create a file handler
            file_handler = logging.FileHandler(file_path)
            file_handler.setLevel(log_level)
            file_handler.setFormatter(formatter)
            logger.addHandler(file_handler)
    except OSError as e:
        logger.error('Could not create log file {file}: {error}'.format(
            file=file_path, error=e.strerror))

    return logger
496829
def _log(self, num=None, format=None):
        '''
        
        '''

        num = '-n %s' % (num) if num else ''
        format = '--format="%s"' % (format) if format else ''
        return self.m(
            'getting git log',
            cmdd=dict(cmd='git log %s %s' % (num, format), cwd=self.local),
            verbose=False
        )
537084
private Logging getLogging() {
    if (logging == null) {
      synchronized (this) {
        if (logging == null) {
          logging = loggingOptions.getService();
        }
      }
    }
    return logging;
  }
870489
def read_audit_log(self, symbol=None, message=None):
        
        query = {}
        if symbol:
            if isinstance(symbol, six.string_types):
                query['symbol'] = {'$regex': symbol}
            else:
                query['symbol'] = {'$in': list(symbol)}

        if message is not None:
            query['message'] = message

        def _pop_id(x):
            x.pop('_id')
            return x

        return [_pop_id(x) for x in self._audit.find(query, sort=[('_id', -1)])]
457808
def get_logging_level(debug):
    """"""
    level = logging.INFO
    if debug:
        level = logging.DEBUG
    return level
651852
def register_console_logging_handler(cls, lgr, level=logging.INFO):
        """"""
        console_handler = logger.DevassistantClHandler(sys.stdout)
        if console_handler.stream.isatty():
            console_handler.setFormatter(logger.DevassistantClColorFormatter())
        else:
            console_handler.setFormatter(logger.DevassistantClFormatter())
        console_handler.setLevel(level)
        cls.cur_handler = console_handler
        lgr.addHandler(console_handler)
1247053
def do_log(self, line):
        """"""
        path = self._split_args(line, 0, 1, pad=False)
        if len(path):
            path = path[0]
        self._command_processor.log(path)