Hi
I am not sure if this was intended but if you build out of tree
and then turn file-line logging on you will get really long logs with
the absolute
file path of your cfile.
Bellow is a quick patch that turns it off.
Regards
Angus
diff --git a/exec/logsys.c b/exec/logsys.c
index faa1bd2..b3f6846 100644
--- a/exec/logsys.c
+++ b/exec/logsys.c
@@ -1283,6 +1283,7 @@ void _logsys_log_vprintf (
unsigned int len;
unsigned int level;
int subsysid;
+ char * short_file_name;
subsysid = LOGSYS_DECODE_SUBSYSID(rec_ident);
level = LOGSYS_DECODE_LEVEL(rec_ident);
@@ -1298,6 +1299,11 @@ void _logsys_log_vprintf (
logsys_print_buffer[len - 1] = '\0';
len -= 1;
}
+ short_file_name = strrchr (file_name, '/');
+ if (short_file_name == NULL)
+ short_file_name = file_name;
+ else
+ short_file_name++; /* move past the "/" */
/*
* Create a log record
@@ -1305,7 +1311,7 @@ void _logsys_log_vprintf (
_logsys_log_rec (
rec_ident,
function_name,
- file_name,
+ short_file_name,
file_line,
logsys_print_buffer, len + 1,
LOGSYS_REC_END);
@@ -1316,7 +1322,7 @@ void _logsys_log_vprintf (
* expect the worker thread to output the log data once signaled
*/
log_printf_to_logs (rec_ident,
- file_name, function_name, file_line,
+ short_file_name, function_name, file_line,
logsys_print_buffer);
} else {
/*
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais