def emit(self, record):
        """Actually log the specified logging record.

        Overrides the default emit behavior of ``StreamHandler``.

        See https://docs.python.org/2/library/logging.html#handler-objects

        :type record: :class:`logging.LogRecord`
        :param record: The record to be logged.
        """
        message = super(AppEngineHandler, self).format(record)
        gae_labels = self.get_gae_labels()
        trace_id = (
            "projects/%s/traces/%s" % (self.project_id, gae_labels[_TRACE_ID_LABEL])
            if _TRACE_ID_LABEL in gae_labels
            else None
        )
        self.transport.send(
            record, message, resource=self.resource, labels=gae_labels, trace=trace_id
        )
def emit ( self , record ) : message = super ( AppEngineHandler , self ) . format ( record ) gae_labels = self . get_gae_labels ( ) trace_id = ( "projects/%s/traces/%s" % ( self . project_id , gae_labels [ _TRACE_ID_LABEL ] ) if _TRACE_ID_LABEL in gae_labels else None ) self . transport . send ( record , message , resource = self . resource , labels = gae_labels , trace = trace_id )
Actually log the specified logging record.

        Overrides the default emit behavior of ``StreamHandler``.

        See https://docs.python.org/2/library/logging.html#handler-objects

        :type record: :class:`logging.LogRecord`
        :param record: The record to be logged.