mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 04:33:05 +00:00
move launch log
This commit is contained in:
@@ -203,7 +203,7 @@ _cb(struct skynet_context * ctx, void * ud, int type, int session, uint32_t sour
|
|||||||
goto _break;
|
goto _break;
|
||||||
}
|
}
|
||||||
// big-endian
|
// big-endian
|
||||||
uint16_t len ;
|
int len ;
|
||||||
if (g->header_size == 2) {
|
if (g->header_size == 2) {
|
||||||
len = plen[0] << 8 | plen[1];
|
len = plen[0] << 8 | plen[1];
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -92,6 +92,7 @@ skynet_context_new(const char * name, const char *param) {
|
|||||||
ctx->init = 1;
|
ctx->init = 1;
|
||||||
}
|
}
|
||||||
skynet_mq_force_push(queue);
|
skynet_mq_force_push(queue);
|
||||||
|
printf("[:%x] launch %s %s\n",ret->handle, name, param ? param : "");
|
||||||
return ret;
|
return ret;
|
||||||
} else {
|
} else {
|
||||||
skynet_context_release(ctx);
|
skynet_context_release(ctx);
|
||||||
@@ -414,7 +415,6 @@ skynet_command(struct skynet_context * context, const char * cmd , const char *
|
|||||||
return NULL;
|
return NULL;
|
||||||
} else {
|
} else {
|
||||||
_id_to_hex(context->result, inst->handle);
|
_id_to_hex(context->result, inst->handle);
|
||||||
printf("[:%x] launch %s\n",inst->handle, param);
|
|
||||||
return context->result;
|
return context->result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,10 +79,14 @@ skynet_start(struct skynet_config * config) {
|
|||||||
struct skynet_context *ctx;
|
struct skynet_context *ctx;
|
||||||
ctx = skynet_context_new("logger", config->logger);
|
ctx = skynet_context_new("logger", config->logger);
|
||||||
if (ctx == NULL) {
|
if (ctx == NULL) {
|
||||||
return;
|
fprintf(stderr,"launch logger error");
|
||||||
|
exit(1);
|
||||||
}
|
}
|
||||||
ctx = skynet_context_new("snlua", "launcher");
|
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);
|
ctx = skynet_context_new("snlua", config->start);
|
||||||
|
|
||||||
_start(config->thread);
|
_start(config->thread);
|
||||||
|
|||||||
Reference in New Issue
Block a user