On 09/30/2016 10:37 AM, Amos Jeffries wrote: > Please make sure that your code debugs() dumps the full pfctl line(s) > received at level DBG_DATA, and (only) on errors the relevant bit at a > higher level like 2 or 3 - the other functions debug output can give
This approach is outdated because Raw() takes care of DBG_DATA. The best general approach today is to use an appropriate non-DATA level for debugs() while using Raw() for printing data inside those debugs(): debugs(11, DBG_IMPORTANT, "always printed" << Raw(may be printed...)); By default, small strings are always printed while large strings are only printed if DBG_DATA debugging level is enabled. The behavior can be tuned by calling .minLevel() on the Raw object. For example, given "large" input, debugs(89, 5, "successfully parsed" << Raw("pfctl input", ...)); will produce something like ... successfully parsed pfctl input with ALL,5 but something like ... successfully parsed pfctl input[150]=large-input-here with ALL,9. HTH, Alex. _______________________________________________ squid-dev mailing list squid-dev@lists.squid-cache.org http://lists.squid-cache.org/listinfo/squid-dev