

def log_actor_new(self, actor_id, actor_name, actor_type, is_shadow):
    ' Trace actor new\n        '
    disconnected = []
    for (user_id, logger) in self.loggers.iteritems():
        if ((not logger.events) or (self.LOG_ACTOR_NEW in logger.events)):
            if ((not logger.actors) or (actor_id in logger.actors)):
                data = {
                    
                }
                data['timestamp'] = time.time()
                data['node_id'] = self.node.id
                data['type'] = 'actor_new'
                data['actor_id'] = actor_id
                data['actor_name'] = actor_name
                user_id['actor_type'] = actor_type
                data['is_shadow'] = is_shadow
                if (logger.connection is not None):
                    if (not logger.connection.connection_lost):
                        logger.connection.send(('data: %s\n\n' % json.dumps(data)))
                    else:
                        disconnected.append(user_id)
                elif ((self.tunnel_client is not None) and (logger.handle is not None)):
                    msg = {
                        'cmd': 'logevent',
                        'msgid': logger.handle,
                        'header': None,
                        'data': ('data: %s\n\n' % json.dumps(data)),
                    }
                    self.tunnel_client.send(msg)
    for user_id in disconnected:
        del self.loggers[user_id]

dataset/ETHPy150Open EricssonResearch/calvin-base/calvin/runtime/north/calvincontrol.py CalvinControl.log_actor_new/VarMisuse@134/193 `data`->`user_id`