logging到MySQL没有空行/跳过的logging?
我想弄清楚如何使MySQL的Squid代理日志。 我知道ACL顺序是非常重要的,但是我不确定我是否确切地理解ACL是什么或者做什么,这很难解释,但是希望在阅读时能看到我要去的地方! 我已经创build了一些线程来使squid与squid.conf中的助手交互,如下所示: external_acl_type mysql_log %LOGIN %SRC %PROTO %URI php /etc/squid3/custom/mysql_lg.php acl ex_log external mysql_log http_access allow ex_log 外部ACL助手(mysql_lg.php)是一个PHP脚本,如下所示: error_reporting(0); if (! defined(STDIN)) { define("STDIN", fopen("php://stdin", "r")); } $res = mysql_connect('localhost', 'squid', 'testsquidpw'); $dbres = mysql_select_db('squid', $res); while (!feof(STDIN)) { $line = trim(fgets(STDIN)); $fields = explode(' ', $line); $user = rawurldecode($fields[0]); $cli_ip = rawurldecode($fields[1]); $protocol […]