Hi Lennart, Okay, i will accomodate that also. This seems to be existing from 4.0 itself! I don't want to disturb the for loop for scanning format expression.
Will send a separate patch. Thanks, Mathi. ----- [email protected] wrote: > Hi, > > There seems to be a remaining problem. I tested using saflogger with > log rec size set to 128 (as is) and tried to write using a log record > > 128 byte. > I expected the log record to be truncated and end with a quote since > the format is ... "@Cb" but the result was: > > Message (125 a): > aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbb > > Result in file: > 1 13:02:58 05/21/2014 IN saflogger.666@SC-2 > "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa^@ > > Thanks > Lennart > > > > -----Original Message----- > > From: [email protected] [mailto:[email protected]] > > Sent: den 19 maj 2014 21:52 > > To: [email protected] > > Cc: [email protected] > > Subject: [devel] [PATCH 1 of 1] log: handle ending quote for > messages in > > variable log records [#882] > > > > osaf/services/saf/logsv/lgs/lgs_fmt.c | 8 +++++--- > > 1 files changed, 5 insertions(+), 3 deletions(-) > > > > > > Currently, When varible log records are enabled for applications, > the log > > message is missing the ending quote. i.e. as below -a test will > create this > > message: " > > -a test hello > > will create this message : "hello > > The same behaviour can be seen for system streams also. > > The problem is that when the logoutputstring is constructed, the > ending > > quotes are indeed getting added to the output string, but this is > getting > > overwritten by the existing code when introducing the n character > tothe > > logoutputstring. > > The patch inserts the n to the outputstring after the ending quote > and also > > increments the number of bytes to be printed by +1. > > > > diff --git a/osaf/services/saf/logsv/lgs/lgs_fmt.c > > b/osaf/services/saf/logsv/lgs/lgs_fmt.c > > --- a/osaf/services/saf/logsv/lgs/lgs_fmt.c > > +++ b/osaf/services/saf/logsv/lgs/lgs_fmt.c > > @@ -1247,9 +1247,11 @@ int lgs_format_log_record(SaLogRecordT * > > memset(&dest[i], ' ', fixedLogRecordSize - i); > > dest[fixedLogRecordSize - 1] = '\n'; > > i = fixedLogRecordSize; > > - } else { > > - dest[i - 1] = '\n'; > > - } > > + } else if ((fixedLogRecordSize == 0) && (i < dest_size)) { > > + dest[i] = '\n'; > > + ++i; > > + } else if ((fixedLogRecordSize == 0) && (i >= dest_size)) > > + dest[i -1] = '\n'; > > > > if (truncationLetterPos != -1) { /* Insert truncation info letter > */ > > dest[truncationLetterPos] = truncationCharacter; > > > > > ------------------------------------------------------------------------------ > > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For > FREE > > Instantly run your Selenium tests across 300+ browser/OS combos. > > Get unparalleled scalability from the best Selenium testing platform > available > > Simple to use. Nothing to install. Get started now for free." > > http://p.sf.net/sfu/SauceLabs > > _______________________________________________ > > Opensaf-devel mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/opensaf-devel ------------------------------------------------------------------------------ "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available Simple to use. Nothing to install. Get started now for free." http://p.sf.net/sfu/SauceLabs _______________________________________________ Opensaf-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensaf-devel
