move launch log

This commit is contained in:
云风
2012-09-06 22:35:28 +08:00
parent 7b6cd315e1
commit 48f8a011a9
3 changed files with 8 additions and 4 deletions

View File

@@ -92,6 +92,7 @@ skynet_context_new(const char * name, const char *param) {
ctx->init = 1;
}
skynet_mq_force_push(queue);
printf("[:%x] launch %s %s\n",ret->handle, name, param ? param : "");
return ret;
} else {
skynet_context_release(ctx);
@@ -414,7 +415,6 @@ skynet_command(struct skynet_context * context, const char * cmd , const char *
return NULL;
} else {
_id_to_hex(context->result, inst->handle);
printf("[:%x] launch %s\n",inst->handle, param);
return context->result;
}
}

View File

@@ -79,10 +79,14 @@ skynet_start(struct skynet_config * config) {
struct skynet_context *ctx;
ctx = skynet_context_new("logger", config->logger);
if (ctx == NULL) {
return;
fprintf(stderr,"launch logger error");
exit(1);
}
ctx = skynet_context_new("snlua", "launcher");
assert(ctx);
if (ctx == NULL) {
fprintf(stderr,"launch launcher error");
exit(1);
}
ctx = skynet_context_new("snlua", config->start);
_start(config->thread);