mirror of
https://github.com/clearml/dropbear
synced 2025-02-12 07:25:30 +00:00
set up early logging name
This commit is contained in:
parent
630f6aa6b9
commit
5027bc4db1
@ -131,6 +131,12 @@ static void cli_dropbear_log(int priority,
|
|||||||
const char* format, va_list param) {
|
const char* format, va_list param) {
|
||||||
|
|
||||||
char printbuf[1024];
|
char printbuf[1024];
|
||||||
|
const char *name;
|
||||||
|
|
||||||
|
name = cli_opts.progname;
|
||||||
|
if (!name) {
|
||||||
|
name = "dbclient";
|
||||||
|
}
|
||||||
|
|
||||||
vsnprintf(printbuf, sizeof(printbuf), format, param);
|
vsnprintf(printbuf, sizeof(printbuf), format, param);
|
||||||
|
|
||||||
@ -140,7 +146,7 @@ static void cli_dropbear_log(int priority,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
fprintf(stderr, "%s: %s\n", cli_opts.progname, printbuf);
|
fprintf(stderr, "%s: %s\n", name, printbuf);
|
||||||
fflush(stderr);
|
fflush(stderr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user