X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=common-src%2Fdebug.c;h=a6de4154c5efcf350f3bd7a5947649e7c8e7e06c;hb=refs%2Ftags%2Fupstream%2F2.6.0p1;hp=7adbc00b241b2346c73914e6fb70d2193f4afca0;hpb=94a044f90357edefa6f4ae9f0b1d5885b0e34aee;p=debian%2Famanda diff --git a/common-src/debug.c b/common-src/debug.c index 7adbc00..a6de415 100644 --- a/common-src/debug.c +++ b/common-src/debug.c @@ -155,7 +155,7 @@ debug_logging_handler(const gchar *log_domain G_GNUC_UNUSED, } if (erroutput_type & ERR_INTERACTIVE) { - g_fprintf(stderr, "%s: %s: %s\n", get_pname(), msg_timestamp(), message); + g_fprintf(stderr, "%s: %s\n", get_pname(), message); fflush(stderr); } @@ -230,7 +230,7 @@ debug_setup_1(char *config, char *subdir) dbgdir = vstralloc(AMANDA_DBGDIR, "/", subdir, "/", NULL); else dbgdir = stralloc2(AMANDA_DBGDIR, "/"); - if(mkpdir(dbgdir, 02700, get_client_uid(), get_client_gid()) == -1) { + if(mkpdir(dbgdir, 0700, get_client_uid(), get_client_gid()) == -1) { error(_("create debug directory \"%s\": %s"), dbgdir, strerror(errno)); /*NOTREACHED*/ @@ -648,7 +648,10 @@ printf_arglist_function(void debug_printf, const char *, format) db_file = stderr; } if(db_file != NULL) { - g_fprintf(db_file, "%s: %s: ", msg_timestamp(), get_pname()); + if (db_file != stderr) + g_fprintf(db_file, "%s: %s: ", msg_timestamp(), get_pname()); + else + g_fprintf(db_file, "%s: ", get_pname()); arglist_start(argp, format); g_vfprintf(db_file, format, argp); arglist_end(argp);