[WARN] Being a directory cache (default) with less than DIRCACHE_MIN_MB_BANDWIDTH MB of memory is not recommended and may consume most of the available resources, consider disabling this functionality by setting the DirCache option to 0
So we should print the macro value the same way we do every other value, using "%d" in the string, and passing it as an argument.
Trac: Summary: DIRCACHE_MIN_MB_BANDWIDTH does not stringify on FreeBSD, we should use %d instead to DIRCACHE_MIN_MEM_MB does not stringify on FreeBSD, we should use %d instead Description: A FreeBSD relay operator reports the message:
[WARN] Being a directory cache (default) with less than DIRCACHE_MIN_MB_BANDWIDTH MB of memory is not recommended and may consume most of the available resources, consider disabling this functionality by setting the DirCache option to 0
So we should print the macro value the same way we do every other value, using "%d" in the string, and passing it as an argument.
[WARN] Being a directory cache (default) with less than DIRCACHE_MIN_MB_BANDWIDTH MB of memory is not recommended and may consume most of the available resources, consider disabling this functionality by setting the DirCache option to 0
So we should print the macro value the same way we do every other value, using "%d" in the string, and passing it as an argument.
There's a problem with this patch -- it removes the blank spaces before the quotation marks at the end of some of the lines. Without those blank spaces, there will not be appropriate spacing between words in the log message.
For example, this code
tor_asprintf(msg, "Being a directory cache (default) with less than" "%d MB of memory is not recommended and may consume" "most of the available resources, consider disabling " "this functionality by setting the DirCache option " "to 0.", DIRCACHE_MIN_MEM_MB);
will produce a log message beginning with:
Being a directory cache (default) with less than300 MB of memory is not recommended and may consumemost of the available resources...
Note the "than300" and "consumemost" problem.
Also, while we're changing this, let's replace the comma before "consider" with a period: those are two separate sentences.
Trac: Status: merge_ready to needs_revision Milestone: Tor: unspecified to Tor: 0.3.4.x-final
There's a problem with this patch -- it removes the blank spaces before the quotation marks at the end of some of the lines. Without those blank spaces, there will not be appropriate spacing between words in the log message.
For example, this code
{{{
tor_asprintf(msg, "Being a directory cache (default) with less than"
"%d MB of memory is not recommended and may consume"
"most of the available resources, consider disabling "
"this functionality by setting the DirCache option "
"to 0.", DIRCACHE_MIN_MEM_MB);
}}}
will produce a log message beginning with:
Being a directory cache (default) with less than300 MB of memory is not recommended and may consumemost of the available resources...
Note the "than300" and "consumemost" problem.
Also, while we're changing this, let's replace the comma before "consider" with a period: those are two separate sentences.