mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-02-20 01:40:08 -05:00
error: make prio/interface output a bit shorter in default log handler
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
d5f30b72bd
commit
953ce1fd94
1 changed files with 5 additions and 8 deletions
13
src/error.c
13
src/error.c
|
|
@ -307,7 +307,7 @@ int snd_lib_log_filter(int prio, int interface, const char *configstr)
|
||||||
*/
|
*/
|
||||||
static void snd_lib_vlog_default(int prio, int interface, const char *file, int line, const char *function, int errcode, const char *fmt, va_list arg)
|
static void snd_lib_vlog_default(int prio, int interface, const char *file, int line, const char *function, int errcode, const char *fmt, va_list arg)
|
||||||
{
|
{
|
||||||
const char *text;
|
const char *text1, *text2;
|
||||||
|
|
||||||
if (local_log) {
|
if (local_log) {
|
||||||
local_log(prio, interface, file, line, function, errcode, fmt, arg);
|
local_log(prio, interface, file, line, function, errcode, fmt, arg);
|
||||||
|
|
@ -323,13 +323,10 @@ static void snd_lib_vlog_default(int prio, int interface, const char *file, int
|
||||||
|
|
||||||
fprintf(stderr, "ALSA lib %s:%i:(%s) ", file, line, function);
|
fprintf(stderr, "ALSA lib %s:%i:(%s) ", file, line, function);
|
||||||
|
|
||||||
text = snd_lib_log_priority(prio);
|
text1 = snd_lib_log_priority(prio);
|
||||||
if (text)
|
text2 = snd_lib_log_interface(interface);
|
||||||
fprintf(stderr, "[%s] ", text);
|
if (text1 || text2)
|
||||||
|
fprintf(stderr, "[%s.%s] ", text1 ? text1 : "", text2 ? text2 : "");
|
||||||
text = snd_lib_log_interface(interface);
|
|
||||||
if (text)
|
|
||||||
fprintf(stderr, "[%s] ", text);
|
|
||||||
|
|
||||||
vfprintf(stderr, fmt, arg);
|
vfprintf(stderr, fmt, arg);
|
||||||
if (errcode)
|
if (errcode)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue