<div dir="ltr">Hi<div><br></div><div>I want to modify the /usr/lib/squid3/log_db_daemon script, but I'm not know very knowledge about PERL, so if i want to modify to get on the mysql table, not epoch_time, and date_time in human readable i guess first change the scheme...</div><div><br></div><div>line 157: " time_since_epoch DECIMAL(15,3)," </div><div>to : " time_since_epoch DATEFIELD"</div><div><br></div><div>after that add the new field for mac will be: mac CHAR(17)</div><div>i want to add MAC in the log so this is the part i need help</div><div><br></div><div>1st need to explain to squid have to log mac address, with >eui BUT by default hasn't and on the script can't see where is setup..... so .. where can i customize that..?</div><div><br></div><div>is ok this line on the script to add mac regexp ?? i use this regexp on the python script and works but on PERL i hope so on too. need a review</div><div><br></div><div><div>sub parse($) {</div><div> my ($line) = @_;</div><div> my (@t) = $line =~ /^L(\d+\.\d+) *(\d+?) (?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?) (.*?) (.*?)\/(\d+?) (\d+?) (.*?) (.*?) (.*?) (.*?)\/(.*?) (.*)$/;</div><div>}</div><div><br></div><div>i think if i change the datetime field the regexp must be change too.. </div><div>how can i end my little modify?</div><div><br></div><div>thanxs in advance.</div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><font color="#888888">perl -le 's ffSfs.s fSf\x54\x6F\x6E\x79 \x50\x65\x6e\x61f.print'<br><br><font color="#888888">Secure email with PGP 0x8B021001 available at <a href="https://pgp.mit.edu/pks/lookup?search=0x8B021001&op=index&fingerprint=on&exact=on" target="_blank">https://pgp.mit.edu</a><br></font></font><font color="#888888">
<font color="#888888">Fingerprint: 74E6 2974 B090 366D CE71 7BB2 6476 FA09 8B02 1001</font></font></div></div></div></div></div>
</div></div>