Browse code

main.c: logging: DBG -> LM_DBG

Ovidiu Sas authored on 13/01/2015 16:39:42
Showing 1 changed files
... ...
@@ -676,9 +676,9 @@ void handle_sigs(void)
676 676
 		case SIGTERM:
677 677
 			/* we end the program in all these cases */
678 678
 			if (sig_flag==SIGINT)
679
-				DBG("INT received, program terminates\n");
679
+				LM_DBG("INT received, program terminates\n");
680 680
 			else
681
-				DBG("SIGTERM received, program terminates\n");
681
+				LM_DBG("SIGTERM received, program terminates\n");
682 682
 			LM_NOTICE("Thank you for flying " NAME "!!!\n");
683 683
 			/* shutdown/kill all the children */
684 684
 			shutdown_children(SIGTERM, 1);
... ...
@@ -743,12 +743,12 @@ void handle_sigs(void)
743 743
 #endif
744 744
 			/* exit */
745 745
 			shutdown_children(SIGTERM, 1);
746
-			DBG("terminating due to SIGCHLD\n");
746
+			LM_DBG("terminating due to SIGCHLD\n");
747 747
 			exit(0);
748 748
 			break;
749 749
 
750 750
 		case SIGHUP: /* ignoring it*/
751
-					DBG("SIGHUP received, ignoring it\n");
751
+					LM_DBG("SIGHUP received, ignoring it\n");
752 752
 					break;
753 753
 		default:
754 754
 			LM_CRIT("unhandled signal %d\n", sig_flag);
... ...
@@ -824,7 +824,7 @@ void sig_usr(int signo)
824 824
 			case SIGCHLD:
825 825
 #ifndef 			STOP_JIRIS_CHANGES
826 826
 #ifdef SIG_DEBUG /* signal unsafe stuff follows */
827
-					DBG("SIGCHLD received: "
827
+					LM_DBG("SIGCHLD received: "
828 828
 						"we do not worry about grand-children\n");
829 829
 #endif
830 830
 #else
... ...
@@ -1253,7 +1253,7 @@ int main_loop(void)
1253 1253
 			if (default_core_cfg.udp4_raw < 0) {
1254 1254
 				/* auto-detect => use it */
1255 1255
 				default_core_cfg.udp4_raw = 1; /* enabled */
1256
-				DBG("raw socket possible => turning it on\n");
1256
+				LM_DBG("raw socket possible => turning it on\n");
1257 1257
 			}
1258 1258
 			if (default_core_cfg.udp4_raw_ttl < 0) {
1259 1259
 				/* auto-detect */
... ...
@@ -1426,7 +1426,7 @@ int main_loop(void)
1426 1426
 				if (default_core_cfg.udp4_raw < 0) {
1427 1427
 					/* auto-detect => use it */
1428 1428
 					default_core_cfg.udp4_raw = 1; /* enabled */
1429
-					DBG("raw socket possible => turning it on\n");
1429
+					LM_DBG("raw socket possible => turning it on\n");
1430 1430
 				}
1431 1431
 				if (default_core_cfg.udp4_raw_ttl < 0) {
1432 1432
 					/* auto-detect */
... ...
@@ -1687,7 +1687,7 @@ int main_loop(void)
1687 1687
 			fprintf(stderr, "% 3d   % 5d - %s\n", r, pt[r].pid, pt[r].desc);
1688 1688
 		}
1689 1689
 #endif
1690
-		DBG("Expect maximum %d  open fds\n", get_max_open_fds());
1690
+		LM_DBG("Expect maximum %d  open fds\n", get_max_open_fds());
1691 1691
 		/* in daemonize mode send the exit code back to the parent process */
1692 1692
 		if (!dont_daemonize) {
1693 1693
 			if (daemon_status_send(0) < 0) {
... ...
@@ -2029,17 +2029,17 @@ try_again:
2029 2029
 			if (errno==EINTR) goto try_again; /* interrupted by signal */
2030 2030
 			LM_WARN("could not read from /dev/urandom (%d)\n", errno);
2031 2031
 		}
2032
-		DBG("read %u from /dev/urandom\n", seed);
2032
+		LM_DBG("read %u from /dev/urandom\n", seed);
2033 2033
 			close(rfd);
2034 2034
 	}else{
2035 2035
 		LM_WARN("could not open /dev/urandom (%d)\n", errno);
2036 2036
 	}
2037 2037
 	seed+=getpid()+time(0);
2038
-	DBG("seeding PRNG with %u\n", seed);
2038
+	LM_DBG("seeding PRNG with %u\n", seed);
2039 2039
 	srand(seed);
2040 2040
 	fastrand_seed(rand());
2041 2041
 	srandom(rand()+time(0));
2042
-	DBG("test random numbers %u %lu %u\n", rand(), random(), fastrand());
2042
+	LM_DBG("test random numbers %u %lu %u\n", rand(), random(), fastrand());
2043 2043
 
2044 2044
 	/*register builtin  modules*/
2045 2045
 	register_builtin_modules();
... ...
@@ -2477,7 +2477,7 @@ try_again:
2477 2477
 	 * function being called before this point may rely on the
2478 2478
 	 * number of processes !
2479 2479
 	 */
2480
-	DBG("Expect (at least) %d SER processes in your process list\n",
2480
+	LM_DBG("Expect (at least) %d kamailio processes in your process list\n",
2481 2481
 			get_max_procs());
2482 2482
 
2483 2483
 #if defined USE_DNS_CACHE && defined USE_DNS_CACHE_STATS