Browse code

core: print runtime dir in log message

- do logging to syslog, along with stderror for runtime dir related
errors

Daniel-Constantin Mierla authored on 16/11/2015 10:43:53
Showing 1 changed files
... ...
@@ -2358,12 +2358,14 @@ try_again:
2358 2358
 	/* create runtime dir if doesn't exist */
2359 2359
 	if (stat(runtime_dir, &st) == -1) {
2360 2360
 		if(mkdir(runtime_dir, 0700) == -1) {
2361
-			fprintf(stderr,  "failed to create runtime dir\n");
2361
+			LM_ERR("failed to create runtime dir %s\n", runtime_dir);
2362
+			fprintf(stderr,  "failed to create runtime dir %s\n", runtime_dir);
2362 2363
 			goto error;
2363 2364
 		}
2364 2365
 		if(sock_uid!=-1 || sock_gid!=-1) {
2365 2366
 			if(chown(runtime_dir, sock_uid, sock_gid) == -1) {
2366
-				fprintf(stderr,  "failed to change owner of runtime dir\n");
2367
+				LM_ERR("failed to change owner of runtime dir %s\n", runtime_dir);
2368
+				fprintf(stderr,  "failed to change owner of runtime dir %s\n", runtime_dir);
2367 2369
 				goto error;
2368 2370
 			}
2369 2371
 		}