Did I find the right examples for you? yes no

All Samples(9500)  |  Call(9443)  |  Derive(0)  |  Import(57)
Log a new message.

The message should be a native string, i.e. bytes on Python 2 and
Unicode on Python 3. For compatibility with both use the native string
syntax, for example::

>>> log.msg('Hello, world.')

You MUST avoid passing in Unicode on Python 2, and the form::
(more...)

src/u/d/udplog-0.1.1/doc/examples/twisted_logging.py   udplog(Download)
def main():
    log.msg("Starting!")
    log.msg("This is a simple message")
    log.msg(format="This is a message with %(what)s", what='variables')
 

src/t/x/txJSON-RPC-GaretJax-0.3.2/examples/ssl/client.py   txJSON-RPC-GaretJax(Download)
def verifyCallback(connection, x509, errnum, errdepth, ok):
    log.msg(connection.__str__())
    if not ok:
        log.msg('invalid server cert: %s' % x509.get_subject(), logLevel=logging.ERROR)
        return False
    else:
        log.msg('good server cert: %s' % x509.get_subject(), logLevel=logging.INFO)

src/v/c/vcdm-HEAD/src/vcdm/blob.py   vcdm(Download)
        from vcdm.container import _append_child
        _append_child(parent_container, uid, name)
        log.msg(type='accounting', avatar=avatar if not on_behalf else on_behalf,
                    amount=int(content[1]), acc_type='blob_creation')
        return (CREATED, uid)
                        'backend_name': blob_backend.backend_name},
                        uid)
        log.msg(type='accounting', avatar=avatar if not on_behalf else on_behalf,
                amount=int(content[1]), acc_type='blob_update')
 
    unique_request = re.match('/cdmi_objectid/\w+$', fullpath)
    if unique_request is not None:
        log.msg('Looking up a blob  by a unique key.')
        requested_uid = unique_request.group(0).split('/')[2]
        uid, vals = vcdm.env['ds'].find_by_uid(requested_uid, object_type='blob',
                                            fields=expected_fields)
 
    log.msg("Reading path %s, uid: %s" % (fullpath, uid))
    if uid is None:
        return (NOT_FOUND, None)
    else:
        # authorize call
        acls = vals['metadata'].get('cdmi_acl')
        if not authorize(avatar, fullpath, "read_blob", acls):
            log.msg("Authorization failed for %s on %s (%s)" % (avatar, fullpath, acls))

src/z/d/zdd-HEAD/samples/twisted/server.py   zdd(Download)
    def on_SIGUSR1(self):
        log.msg("SIGUSR1 received, gracefully stopping.", logLevel=logging.CRITICAL)
        d = defer.maybeDeferred(self.stopService())
        d.addCallback(self.on_stopped_listening)
 
    def on_stopped_listening(self, result):
        log.msg("Waiting for outstanding connections.", logLevel=logging.CRITICAL)
    def on_all_connections_finished(self, result):
        log.msg("All outstanding connections have been closed. Shutting down.", logLevel=logging.CRITICAL)
        reactor.stop()
 
    def save_portfile(self):
    def stopFactory(self):
        server.Site.stopFactory(self)
        log.msg("stopFactory called", logLevel=logging.CRITICAL)
 
 

src/r/e/restmq-HEAD/examples/mapreduce/reduce_keyfreq.py   restmq(Download)
                    val=json.loads(v['value'])
                    jobs.append(v['key'])
                    log.msg("file: %s count: %s" % (val['filename'], val['count']))
                    self.count=self.count+val['count']
                    twf = val['wordfreqlist']
                            self.wordfreq[b]=twf[b]
 
            log.msg("Total: %d" % self.count)
            log.msg("Word Frequence: ", str(self.wordfreq))
            print "---------------- Job %s -----------------" % jobs

src/h/o/hortonworks-sandbox-HEAD/desktop/core/ext-py/Twisted/doc/core/examples/mouse.py   hortonworks-sandbox(Download)
    def down_left(self):
        log.msg("LEFT")
 
    def up_left(self):
        log.msg("left")
 
    def down_middle(self):
        log.msg("MIDDLE")
    def up_middle(self):
        log.msg("middle")
 
    def down_right(self):
        log.msg("RIGHT")

src/o/h/oh-mainline-HEAD/vendor/packages/twisted/doc/core/examples/mouse.py   oh-mainline(Download)
    def down_left(self):
        log.msg("LEFT")
 
    def up_left(self):
        log.msg("left")
 
    def down_middle(self):
        log.msg("MIDDLE")
    def up_middle(self):
        log.msg("middle")
 
    def down_right(self):
        log.msg("RIGHT")

src/t/w/Twisted-13.2.0/doc/core/examples/mouse.py   Twisted(Download)
    def down_left(self):
        log.msg("LEFT")
 
    def up_left(self):
        log.msg("left")
 
    def down_middle(self):
        log.msg("MIDDLE")
    def up_middle(self):
        log.msg("middle")
 
    def down_right(self):
        log.msg("RIGHT")

src/t/w/twisted-network-programming-essentials-examples-HEAD/Chapter7-Logging/ex3-log_rotation.py   twisted-network-programming-essentials-examples(Download)
log.startLogging(f)
 
log.msg("First message")
 
# rotate manually
f.rotate()
 
for i in range(5):
    log.msg("Test message", i)
    log.msg("Test message", i)
 
log.msg("Last message")
 

src/v/c/vcdm-HEAD/src/vcdm/container.py   vcdm(Download)
            return (UNAUTHORIZED, None)
        vals['uid'] = uid
        log.msg(type='accounting', avatar=avatar if not on_behalf else on_behalf,
                amount=1, acc_type='container_read')
        return (OK, vals)
def create_or_update(avatar, name, container_path, fullpath, metadata=None,
                     on_behalf=None):
    """Create or update a container."""
    log.msg("Container create/update: %s" % fullpath)
 
        if fullpath != '/':
            _append_child(parent_container, uid, name + "/")
        log.msg(type='accounting', avatar=avatar if not on_behalf else on_behalf,
                amount=1, acc_type='container_create')
        return (CREATED, vals)
                        'mtime': str(time.time())},
                        uid)
        log.msg(type='accounting', avatar=avatar if not on_behalf else on_behalf,
                amount=1, acc_type='container_update')
        return (NO_CONTENT, vals)
 
 
def delete(avatar, fullpath, on_behalf=None):
    """ Delete a container."""
    log.msg("Deleting a container %s" % fullpath)

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next