Turn logging on.
188536
def logging_on(level=logging.WARNING):
    
    global _is_logging_on

    if not _is_logging_on:
        console = logging.StreamHandler()
        console.setFormatter(logging.Formatter("[%(levelname)s: %(asctime)s :"
                                               " %(name)s] %(message)s",
                                               '%Y-%m-%d %H:%M:%S'))
        console.setLevel(level)
        logging.getLogger('').addHandler(console)
        _is_logging_on = True

    log = logging.getLogger('')
    log.setLevel(level)
    for h in log.handlers:
        h.setLevel(level)
1215239
def start(self):
        
        self._assert_not_running()
        if self._configs.clear_log:
            self.clear_adb_log()
        self._start()
140884
def start(self):
        ''''''
        self._configs = self._client.config_get('slow-*')
        self._client.config_set('slowlog-max-len', 100000)
        self._client.config_set('slowlog-log-slower-than', 0)
        self._client.execute_command('slowlog', 'reset')
1062498
def start(main_gui_class, **kwargs):
    """"""
    debug = kwargs.pop('debug', False)
    standalone = kwargs.pop('standalone', False)

    logging.basicConfig(level=logging.DEBUG if debug else logging.INFO,
                        format='%(name)-16s %(levelname)-8s %(message)s')
    logging.getLogger('remi').setLevel(
            level=logging.DEBUG if debug else logging.INFO)

    if standalone:
        s = StandaloneServer(main_gui_class, start=True, **kwargs)
    else:
        s = Server(main_gui_class, start=True, **kwargs)
1302771
def start(self):
        """"""
        yield from self._do_connect()
        _LOGGER.info('connected to snapserver on %s:%s', self._host, self._port)
        status = yield from self.status()
        self.synchronize(status)
        self._on_server_connect()
39510
def start(self):
        ''''''
        self.update_device_info()
        self.get_device_status(0) # start addons.
        self.hook()
        self.thread = threading.Thread(target=self._run)
        self.thread.start()
        self.running = True
555481
def turn_on(host, did, token=None):
    """"""
    urllib3.disable_warnings()
    if token:
        scheme = "https"
    if not token:
        scheme = "http"
        token = "1234567890"
    url = (
            scheme + '://' + host + '/gwr/gop.php?cmd=DeviceSendCommand&data=<gip><version>1</version><token>' + token + '</token><did>' + did + '</did><value>1</value></gip>&fmt=xml')
    response = requests.get(url, verify=False)
    if response.status_code == '200':
        return True
    else:
        return False
175330
def start(self):
        """"""

        if self.log_filename:
            print('Output will be logged to `%s`.' % self.log_filename)

        start_time = time.strftime(self.timestamp_fmt)
        print('Started %s' % start_time)

        if self.log_filename:
            orig_stdout = sys.stdout
            orig_stderr = sys.stderr

            sys.stdout = self.log_file
            sys.stderr = self.log_file

            print('Started %s' % start_time)

        doit_main = DoitMain(self)
        doit_main.run(['run'])

        stop_time = time.strftime(self.timestamp_fmt)

        if self.log_filename:
            print('Stopped %s' % stop_time)
            print()

            sys.stdout = orig_stdout
            sys.stderr = orig_stderr
            self.log_file.close()

        print('Stopped %s' % stop_time)
661618
public function enableDebugLog()
    {
        if ($this->log !== null) {
            // Debug log byl již zapnut dříve.
            return;
        }

        $this->log = [];
        $logger = function (SkautisQuery $query) {
            $this->log[] = $query;
        };
        $this->wsdlManager->addWebServiceListener(WebService::EVENT_SUCCESS, $logger);
        $this->wsdlManager->addWebServiceListener(WebService::EVENT_FAILURE, $logger);
    }
734357
def enable() -> None:
        """"""
        if not isinstance(sys.stdout, DebugPrint):
            sys.stdout = DebugPrint(sys.stdout)
1366035
def enable(logger=logger,
           level=logging.INFO,
           format=DETAIL_LOG_FORMAT,
           echo=True):
    """"""
    global _handler
    if _handler is None:
        _handler = logging.StreamHandler()
        formatter = logging.Formatter(format)
        _handler.setFormatter(formatter)

    level = logging._checkLevel(level)
    levelName = logging._levelToName[level]

    logger.setLevel(level)
    _handler.setLevel(level)

    if _handler not in logger.handlers:
        logger.addHandler(_handler)

    if echo:
        logger.log(
            level, 'Logging enabled at level {name}.'.format(name=levelName))
473822
def power_on(env, identifier):
    """"""

    mgr = SoftLayer.HardwareManager(env.client)
    hw_id = helpers.resolve_id(mgr.resolve_ids, identifier, 'hardware')
    env.client['Hardware_Server'].powerOn(id=hw_id)
568305
def power_on(env, identifier):
    """"""

    vsi = SoftLayer.VSManager(env.client)
    vs_id = helpers.resolve_id(vsi.resolve_ids, identifier, 'VS')
    env.client['Virtual_Guest'].powerOn(id=vs_id)
1147862
def userlogin(self, event):
        """"""

        client_uuid = event.clientuuid

        self.log(event.user, pretty=True, lvl=verbose)

        self.log('Adding client')
        self.clients[event.clientuuid] = event.user

        for topic, alert in self.alerts.items():
            self.alert(client_uuid, alert)
112120
def _setup_logging():
    
    import logging

    logger = logging.getLogger('spotify-connect')
    handler = logging.NullHandler()
    logger.addHandler(handler)
1308132
def login(session):
    """"""
    if not session.auth.username or not session.auth.password:
        raise VooblyError('must supply username and password')
    _LOGGER.info("logging in (no valid cookie found)")
    session.cookies.clear()
    try:
        session.get(session.auth.base_url + LOGIN_PAGE)
        resp = session.post(session.auth.base_url + LOGIN_URL, data={
            'username': session.auth.username,
            'password': session.auth.password
        })
    except RequestException:
        raise VooblyError('failed to connect for login')
    if resp.status_code != 200:
        raise VooblyError('failed to login')
    _save_cookies(session.cookies, session.auth.cookie_path)
856780
public static void start(final Logger logger, final Logger auditor, final HttpServletRequest request) {
        start(logger, auditor, request, null);
    }