Skip to content

Commit 76211a4

Browse files
committed
moved some logging from debug to info
1 parent 129a161 commit 76211a4

File tree

5 files changed

+47
-51
lines changed

5 files changed

+47
-51
lines changed

ngx_rtmp_cmd_module.c

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ ngx_rtmp_cmd_connect(ngx_rtmp_session_t *s, ngx_rtmp_connect_t *v)
200200

201201
cscf = ngx_rtmp_get_module_srv_conf(s, ngx_rtmp_core_module);
202202

203-
ngx_log_debug8(NGX_LOG_DEBUG_RTMP, s->connection->log, 0,
203+
ngx_log_error(NGX_LOG_INFO, s->connection->log, 0,
204204
"connect: app='%s' flashver='%s' swf_url='%s' "
205205
"tc_url='%s' page_url='%s' acodecs=%uD vcodecs=%uD "
206206
"object_encoding=%ui",
@@ -327,7 +327,7 @@ ngx_rtmp_cmd_create_stream(ngx_rtmp_session_t *s, ngx_rtmp_create_stream_t *v)
327327
h.csid = NGX_RTMP_CMD_CSID_AMF_INI;
328328
h.type = NGX_RTMP_MSG_AMF_CMD;
329329

330-
ngx_log_debug0(NGX_LOG_DEBUG_RTMP, s->connection->log, 0,
330+
ngx_log_error(NGX_LOG_INFO, s->connection->log, 0,
331331
"createStream");
332332

333333
/* send result with standard stream */
@@ -415,6 +415,9 @@ ngx_rtmp_cmd_delete_stream(ngx_rtmp_session_t *s, ngx_rtmp_delete_stream_t *v)
415415
{
416416
ngx_rtmp_close_stream_t cv;
417417

418+
ngx_log_error(NGX_LOG_INFO, s->connection->log, 0,
419+
"deleteStream");
420+
418421
/* chain close_stream */
419422
cv.stream = 0;
420423
return ngx_rtmp_close_stream
@@ -523,7 +526,7 @@ ngx_rtmp_cmd_publish(ngx_rtmp_session_t *s, ngx_rtmp_publish_t *v)
523526
out_inf, sizeof(out_inf) },
524527
};
525528

526-
ngx_log_debug4(NGX_LOG_DEBUG_RTMP, s->connection->log, 0,
529+
ngx_log_error(NGX_LOG_INFO, s->connection->log, 0,
527530
"publish: name='%s' args='%s' type=%s silent=%d",
528531
v->name, v->args, v->type, v->silent);
529532

@@ -621,7 +624,7 @@ ngx_rtmp_cmd_fcpublish(ngx_rtmp_session_t *s, ngx_rtmp_fcpublish_t *v)
621624
out_inf, sizeof(out_inf) },
622625
};
623626

624-
ngx_log_debug1(NGX_LOG_DEBUG_RTMP, s->connection->log, 0,
627+
ngx_log_error(NGX_LOG_INFO, s->connection->log, 0,
625628
"fcpublish: name='%s'", v->name);
626629

627630
/* send onFCPublish reply */
@@ -801,8 +804,8 @@ ngx_rtmp_cmd_play(ngx_rtmp_session_t *s, ngx_rtmp_play_t *v)
801804
out4_inf, sizeof(out4_inf) },
802805
};
803806

804-
ngx_log_debug6(NGX_LOG_DEBUG_RTMP, s->connection->log, 0,
805-
"cmd: play name='%s' args='%s' start=%i duration=%i "
807+
ngx_log_error(NGX_LOG_INFO, s->connection->log, 0,
808+
"play name='%s' args='%s' start=%i duration=%i "
806809
"reset=%i silent=%i",
807810
v->name, v->args, (ngx_int_t) v->start,
808811
(ngx_int_t) v->duration, (ngx_int_t) v->reset,
@@ -934,7 +937,7 @@ ngx_rtmp_cmd_fcsubscribe(ngx_rtmp_session_t *s, ngx_rtmp_fcsubscribe_t *v)
934937
sizeof(out_inf) },
935938
};
936939

937-
ngx_log_debug1(NGX_LOG_DEBUG_RTMP, s->connection->log, 0,
940+
ngx_log_error(NGX_LOG_INFO, s->connection->log, 0,
938941
"fcsubscribe: name='%s'", v->name);
939942

940943
/* send onFCSubscribe reply */
@@ -1038,6 +1041,10 @@ ngx_rtmp_cmd_pause(ngx_rtmp_session_t *s, ngx_rtmp_pause_t *v)
10381041
out_inf, sizeof(out_inf) },
10391042
};
10401043

1044+
ngx_log_error(NGX_LOG_INFO, s->connection->log, 0,
1045+
"pause: state='%i' position=%i",
1046+
v->pause, (ngx_int_t) v->position);
1047+
10411048
/* send onStatus reply */
10421049
ngx_memzero(&h, sizeof(h));
10431050
h.type = NGX_RTMP_MSG_AMF_CMD;
@@ -1068,6 +1075,9 @@ static ngx_int_t
10681075
ngx_rtmp_cmd_disconnect(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h,
10691076
ngx_chain_t *in)
10701077
{
1078+
ngx_log_error(NGX_LOG_INFO, s->connection->log, 0,
1079+
"disconnect");
1080+
10711081
return ngx_rtmp_delete_stream
10721082
? ngx_rtmp_delete_stream(s, NULL)
10731083
: NGX_OK;
@@ -1152,6 +1162,9 @@ ngx_rtmp_cmd_seek(ngx_rtmp_session_t *s, ngx_rtmp_seek_t *v)
11521162
out_inf, sizeof(out_inf) },
11531163
};
11541164

1165+
ngx_log_error(NGX_LOG_INFO, s->connection->log, 0,
1166+
"seek: offset=%i", (ngx_int_t) v->offset);
1167+
11551168
/* send onStatus reply */
11561169
ngx_memzero(&h, sizeof(h));
11571170
h.type = NGX_RTMP_MSG_AMF_CMD;

ngx_rtmp_enotify_module.c

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ typedef struct {
6262
u_char name[NGX_RTMP_MAX_NAME];
6363
u_char args[NGX_RTMP_MAX_ARGS];
6464
ngx_str_t path;
65-
ngx_str_t filename;
6665
ngx_str_t recorder;
6766
} ngx_rtmp_enotify_ctx_t;
6867

@@ -184,10 +183,6 @@ static ngx_rtmp_eval_t ngx_rtmp_enotify_eval[] = {
184183
ngx_rtmp_enotify_eval_str,
185184
offsetof(ngx_rtmp_enotify_ctx_t, path) },
186185

187-
{ ngx_string("filename"),
188-
ngx_rtmp_enotify_eval_str,
189-
offsetof(ngx_rtmp_enotify_ctx_t, filename) },
190-
191186
{ ngx_string("recorder"),
192187
ngx_rtmp_enotify_eval_str,
193188
offsetof(ngx_rtmp_enotify_ctx_t, recorder) },
@@ -344,8 +339,8 @@ ngx_rtmp_enotify_publish(ngx_rtmp_session_t *s, ngx_rtmp_publish_t *v)
344339
goto next;
345340
}
346341

347-
ngx_log_debug1(NGX_LOG_DEBUG_RTMP, s->connection->log, 0,
348-
"enotify: publish '%V'", &ec->cmd);
342+
ngx_log_error(NGX_LOG_INFO, s->connection->log, 0,
343+
"enotify: publish '%V'", &ec->cmd);
349344

350345
ngx_rtmp_enotify_exec(s, ec);
351346

@@ -378,8 +373,8 @@ ngx_rtmp_enotify_play(ngx_rtmp_session_t *s, ngx_rtmp_play_t *v)
378373
goto next;
379374
}
380375

381-
ngx_log_debug1(NGX_LOG_DEBUG_RTMP, s->connection->log, 0,
382-
"enotify: play '%V'", &ec->cmd);
376+
ngx_log_error(NGX_LOG_INFO, s->connection->log, 0,
377+
"enotify: play '%V'", &ec->cmd);
383378

384379
ngx_rtmp_enotify_exec(s, ec);
385380

@@ -411,17 +406,14 @@ ngx_rtmp_enotify_delete_stream(ngx_rtmp_session_t *s, ngx_rtmp_delete_stream_t
411406
if (enacf == NULL) {
412407
goto next;
413408
}
414-
ngx_log_debug1(NGX_LOG_DEBUG_RTMP, s->connection->log, 0,
415-
"enotify: delete_stream %ui",
416-
ctx->flags);
417409

418410
if (enacf->event[NGX_RTMP_ENOTIFY_PUBLISH_DONE] &&
419411
(ctx->flags & NGX_RTMP_ENOTIFY_PUBLISHING))
420412
{
421413
ec = enacf->event[NGX_RTMP_ENOTIFY_PUBLISH_DONE];
422414

423-
ngx_log_debug1(NGX_LOG_DEBUG_RTMP, s->connection->log, 0,
424-
"enotify: publish_done '%V'", &ec->cmd);
415+
ngx_log_error(NGX_LOG_INFO, s->connection->log, 0,
416+
"enotify: publish_done '%V'", &ec->cmd);
425417

426418
ngx_rtmp_enotify_exec(s, ec);
427419
}
@@ -431,8 +423,8 @@ ngx_rtmp_enotify_delete_stream(ngx_rtmp_session_t *s, ngx_rtmp_delete_stream_t
431423
{
432424
ec = enacf->event[NGX_RTMP_ENOTIFY_PLAY_DONE];
433425

434-
ngx_log_debug1(NGX_LOG_DEBUG_RTMP, s->connection->log, 0,
435-
"enotify: play_done '%V'", &ec->cmd);
426+
ngx_log_error(NGX_LOG_INFO, s->connection->log, 0,
427+
"enotify: play_done '%V'", &ec->cmd);
436428

437429
ngx_rtmp_enotify_exec(s, ec);
438430
}
@@ -450,7 +442,6 @@ ngx_rtmp_enotify_record_done(ngx_rtmp_session_t *s, ngx_rtmp_record_done_t *v)
450442
ngx_rtmp_enotify_app_conf_t *enacf;
451443
ngx_rtmp_enotify_conf_t *ec;
452444
ngx_rtmp_enotify_ctx_t *ctx;
453-
ngx_int_t n;
454445

455446
if (s->auto_pushed) {
456447
goto next;
@@ -463,9 +454,9 @@ ngx_rtmp_enotify_record_done(ngx_rtmp_session_t *s, ngx_rtmp_record_done_t *v)
463454

464455
ec = enacf->event[NGX_RTMP_ENOTIFY_RECORD_DONE];
465456

466-
ngx_log_debug3(NGX_LOG_DEBUG_RTMP, s->connection->log, 0,
467-
"enotify: record_done %V recorder=%V path='%V'",
468-
&ec->cmd, &v->recorder, &v->path);
457+
ngx_log_error(NGX_LOG_INFO, s->connection->log, 0,
458+
"enotify: record_done %V recorder=%V path='%V'",
459+
&ec->cmd, &v->recorder, &v->path);
469460

470461
ctx = ngx_rtmp_get_module_ctx(s, ngx_rtmp_enotify_module);
471462
if (ctx == NULL) {
@@ -474,14 +465,6 @@ ngx_rtmp_enotify_record_done(ngx_rtmp_session_t *s, ngx_rtmp_record_done_t *v)
474465

475466
ctx->recorder = v->recorder;
476467
ctx->path = v->path;
477-
ctx->filename = v->path;
478-
479-
for (n = ctx->filename.len;
480-
n > 0 && !ngx_path_separator(ctx->filename.data[n - 1]);
481-
--n);
482-
483-
ctx->filename.data += n;
484-
ctx->filename.len -= n;
485468

486469
ngx_rtmp_enotify_exec(s, ec);
487470

ngx_rtmp_notify_module.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -615,9 +615,9 @@ ngx_rtmp_notify_publish(ngx_rtmp_session_t *s, ngx_rtmp_publish_t *v)
615615
goto next;
616616
}
617617

618-
ngx_log_debug1(NGX_LOG_DEBUG_RTMP, s->connection->log, 0,
619-
"notify: publish '%V'",
620-
&nacf->url[NGX_RTMP_NOTIFY_PUBLISH]);
618+
ngx_log_error(NGX_LOG_INFO, s->connection->log, 0,
619+
"notify: publish '%V'",
620+
&nacf->url[NGX_RTMP_NOTIFY_PUBLISH]);
621621

622622
ngx_memzero(&ci, sizeof(ci));
623623

@@ -656,9 +656,9 @@ ngx_rtmp_notify_play(ngx_rtmp_session_t *s, ngx_rtmp_play_t *v)
656656
goto next;
657657
}
658658

659-
ngx_log_debug1(NGX_LOG_DEBUG_RTMP, s->connection->log, 0,
660-
"notify: play '%V'",
661-
&nacf->url[NGX_RTMP_NOTIFY_PLAY]);
659+
ngx_log_error(NGX_LOG_INFO, s->connection->log, 0,
660+
"notify: play '%V'",
661+
&nacf->url[NGX_RTMP_NOTIFY_PLAY]);
662662

663663
ngx_memzero(&ci, sizeof(ci));
664664

@@ -738,10 +738,10 @@ ngx_rtmp_notify_record_done(ngx_rtmp_session_t *s, ngx_rtmp_record_done_t *v)
738738
goto next;
739739
}
740740

741-
ngx_log_debug3(NGX_LOG_DEBUG_RTMP, s->connection->log, 0,
742-
"notify: record_done recorder=%V path='%V' url='%V'",
743-
&v->recorder, &v->path,
744-
&nacf->url[NGX_RTMP_NOTIFY_RECORD_DONE]);
741+
ngx_log_error(NGX_LOG_INFO, s->connection->log, 0,
742+
"notify: record_done recorder=%V path='%V' url='%V'",
743+
&v->recorder, &v->path,
744+
&nacf->url[NGX_RTMP_NOTIFY_RECORD_DONE]);
745745

746746
ngx_memzero(&ci, sizeof(ci));
747747

@@ -762,8 +762,8 @@ ngx_rtmp_notify_done(ngx_rtmp_session_t *s, char *cbname, ngx_url_t *url)
762762
ngx_rtmp_netcall_init_t ci;
763763
ngx_rtmp_notify_done_t ds;
764764

765-
ngx_log_debug2(NGX_LOG_DEBUG_RTMP, s->connection->log, 0,
766-
"notify: %s '%V'", cbname, &url->url);
765+
ngx_log_error(NGX_LOG_INFO, s->connection->log, 0,
766+
"notify: %s '%V'", cbname, &url->url);
767767

768768
ds.cbname = (u_char *) cbname;
769769
ds.url = url;

ngx_rtmp_play_module.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,8 +440,8 @@ ngx_rtmp_play_play(ngx_rtmp_session_t *s, ngx_rtmp_play_t *v)
440440
goto next;
441441
}
442442

443-
ngx_log_debug1(NGX_LOG_DEBUG_RTMP, s->connection->log, 0,
444-
"play: fmt found: '%V'", &ctx->fmt->name);
443+
ngx_log_error(NGX_LOG_INFO, s->connection->log, 0,
444+
"play: %V", &ctx->fmt->name);
445445

446446
sfx = &ctx->fmt->sfx;
447447

ngx_rtmp_relay_module.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ ngx_int_t
503503
ngx_rtmp_relay_pull(ngx_rtmp_session_t *s, ngx_str_t *name,
504504
ngx_rtmp_relay_target_t *target)
505505
{
506-
ngx_log_debug4(NGX_LOG_DEBUG_RTMP, s->connection->log, 0,
506+
ngx_log_error(NGX_LOG_INFO, s->connection->log, 0,
507507
"relay: create pull name='%V' app='%V' playpath='%V' url='%V'",
508508
name, &target->app, &target->play_path, &target->url.url);
509509

@@ -517,7 +517,7 @@ ngx_int_t
517517
ngx_rtmp_relay_push(ngx_rtmp_session_t *s, ngx_str_t *name,
518518
ngx_rtmp_relay_target_t *target)
519519
{
520-
ngx_log_debug4(NGX_LOG_DEBUG_RTMP, s->connection->log, 0,
520+
ngx_log_error(NGX_LOG_INFO, s->connection->log, 0,
521521
"relay: create push name='%V' app='%V' playpath='%V' url='%V'",
522522
name, &target->app, &target->play_path, &target->url.url);
523523

0 commit comments

Comments
 (0)