You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-07 00:35:37 +02:00
Add strCatZ().
strCat() did not follow our convention of appending Z to functions that accept zero-terminated strings rather than String objects. Add strCatZ() to accept zero-terminated strings and update strCat() to accept String objects. Use LF_STR where appropriate but don't use other String constants because they do not improve readability.
This commit is contained in:
@ -73,7 +73,7 @@ cmdBegin(bool logOption)
|
||||
if (strchr(strPtr(commandParam), ' ') != NULL)
|
||||
commandParam = strNewFmt("\"%s\"", strPtr(commandParam));
|
||||
|
||||
strCat(info, strPtr(commandParam));
|
||||
strCat(info, commandParam);
|
||||
}
|
||||
|
||||
strCatFmt(info, "]");
|
||||
@ -203,13 +203,13 @@ cmdEnd(int code, const String *errorMessage)
|
||||
|
||||
if (errorMessage == NULL)
|
||||
{
|
||||
strCat(info, "completed successfully");
|
||||
strCatZ(info, "completed successfully");
|
||||
|
||||
if (cfgOptionValid(cfgOptLogTimestamp) && cfgOptionBool(cfgOptLogTimestamp))
|
||||
strCatFmt(info, " (%" PRIu64 "ms)", timeMSec() - timeBegin);
|
||||
}
|
||||
else
|
||||
strCat(info, strPtr(errorMessage));
|
||||
strCat(info, errorMessage);
|
||||
|
||||
LOG(cfgLogLevelDefault(), 0, strPtr(info));
|
||||
}
|
||||
|
Reference in New Issue
Block a user