From: SourceForge.net <no...@so...> - 2013-02-22 11:38:55
|
Support Requests item #3605454, was opened at 2013-02-20 10:29 Message generated for change (Comment added) made by fabiankeil You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=211118&aid=3605454&group_id=11118 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: other Group: 3.0.19 >Status: Pending Priority: 5 Private: No Submitted By: Teresa e Junior (teresaejunior) Assigned to: Fabian Keil (fabiankeil) Summary: Recompile so log lines won't be truncated Initial Comment: Hello, I'm trying to recompile Privoxy 3.0.19 on Debian to get rid of the log line size limit, and the only number I have found in the source is on pcrs.h: #define PCRS_BUFFER_SIZE 4000 I don't really know if this is the number to be changed, because I don't understand C, but I tried increasing it, and compilation fails with: "warning: integer constant is too large for its type" Please, what could I do to get the entire lines on the log with debug 16? I know it looks a bit insane, but I really need it. ---------------------------------------------------------------------- >Comment By: Fabian Keil (fabiankeil) Date: 2013-02-22 03:38 Message: 999999999 bytes are nearly 1 GB which seems excessive to me. Probably you tried to access Privoxy while it was still busy consuming the memory. I suggest you use a more reasonable limit, for example a few MB. You might want to double check that the logfile directive is used (by default it isn't): http://www.privoxy.org/user-manual/config.html#LOGFILE ---------------------------------------------------------------------- Comment By: Teresa e Junior (teresaejunior) Date: 2013-02-21 12:12 Message: Hi, Fabian! Thanks for your reply! I could change those two lines to no more than 999999999, and had to unlimit the stack size to get Privoxy to start, otherwise it would segfault, but I can't get to connect to any website. Firefox says: "The proxy server is refusing connections", and I set debug 16, 1024, and 8192, but the log is always empty. Thanks for your attention! ---------------------------------------------------------------------- Comment By: Fabian Keil (fabiankeil) Date: 2013-02-21 05:58 Message: Privoxy is not designed for this and thus there is not single #define to change. I've been using a local patch to address this for a while now, though, and intent to commit it after the next stable release. The log truncation currently depends on BUFFER_SIZE but you can't simply increase BUFFER_SIZE as it has other side effects you probably don't want. What you can do is modify errlog.c to use something else instead. The lines to change are: char tempbuf[BUFFER_SIZE]; and size_t log_buffer_size = BUFFER_SIZE; at the beginning of log_error(). Note that it's a static buffer and the memory is "used" even when it isn't "needed". Depending on your system configuration you may have to increase the "stack size" limit for the Privoxy user. Also note that the worst case scenario is (probably) Privoxy trying to log the whole filtered response at the same time. Logging a single unprinted byte requires four bytes due to escaping and a response could completely consist of unprintable characters. If you care about this you'll have to significantly decrease the buffer limit (http://config.privoxy.org/user-manual/config.html#BUFFER-LIMIT) or increase the buffer in log_error() quite a bit. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=211118&aid=3605454&group_id=11118 |