I'm not sure how much you know about C/C++, so I'll err on the side of explaining too much.
In C and C++, strings are often built "on the fly" using % as an placeholder for a variable value. The character(s) following the % identifies the type of variable. Other modifiers which further define the variable value may also be included. Here are some examples:
%s is the placeholder for a string variable
%i is the placeholder for an integer
and the additional modifier you saw in your previous example:
%.80s describes a placeholder for a string variable which
is limited to a maximum of 80 characters long.
So, in your syslog example, the string is built by substituting values (in sequential order) from the variables which follow it, and *then* it is passed as a completed string parameter to the syslog() function.
Sometimes programmers can make the parameter substitution more clear by how they align the elements. Notice the second parameter (the first is "LOG_INFO"

, which is the string to be formatted or built (and which is enclosed in quotation marks. The elements that follow the "format string" are the variables to be used or substituted in the string:
syslog (LOG_INFO,
"%s, while reading line user=%.80s host=%.80s",
e,
user ? user : "???",
tcp_clienthost ()
);
You may also find the line:
user ? user : "???"
to be rather mysterious. It is shorthand notation for a comparison. The statement to the left of the question mark is treated as a test (a different test could be: "age == 30"

. If the test is true, then what is to the left of the colon

) is used. If the test is false, then what is to the right of the colon is used. The test above simply says, "if the user value exists (is not NULL)". To make this more simple to understand, the test could be written this way in longhand:
if (user != NULL)
{
// the user variable is not empty; so the user is known.
// use the value of the variable
user for the user name.
}
else
{
// value is empty, so the user is unknown.
// use the string, "
???" for the user name.
}
Hope this helps. ;-)