<html><body><div style="font-family: Andale Mono; font-size: 10pt; color: #000000"><div style="font-family: Andale Mono; font-size: 10pt; color: #000000"><br data-mce-bogus="1"></div><div style="font-family: Andale Mono; font-size: 10pt; color: #000000">Here is an example of how I have done it:</div><div style="font-family: Andale Mono; font-size: 10pt; color: #000000"><br data-mce-bogus="1"></div><div style="font-family: Andale Mono; font-size: 10pt; color: #000000"><p style="margin: 0px; font-size: 11px; font-family: Menlo;" data-mce-style="margin: 0px; font-size: 11px; font-family: Menlo;">if exists agent.circuit-id {</p><p style="margin: 0px; font-size: 11px; font-family: Menlo;" data-mce-style="margin: 0px; font-size: 11px; font-family: Menlo;">        log ( error,</p><p style="margin: 0px; font-size: 11px; font-family: Menlo;" data-mce-style="margin: 0px; font-size: 11px; font-family: Menlo;">                concat( "agent.circuit-id,", binary-to-ascii (10, 8, ".", leased-address),",",</p><p style="margin: 0px; font-size: 11px; font-family: Menlo;" data-mce-style="margin: 0px; font-size: 11px; font-family: Menlo;">                        "circuit-id,",option agent.circuit-id,",",</p><p style="margin: 0px; font-size: 11px; font-family: Menlo;" data-mce-style="margin: 0px; font-size: 11px; font-family: Menlo;">                        "time,",binary-to-ascii(10,32,"",encode-int (lease-time,32)),",",</p><p style="margin: 0px; font-size: 11px; font-family: Menlo;" data-mce-style="margin: 0px; font-size: 11px; font-family: Menlo;">                        "hardware,",binary-to-ascii(16,8,":",substring(hardware,1,7))</p><p style="margin: 0px; font-size: 11px; font-family: Menlo;" data-mce-style="margin: 0px; font-size: 11px; font-family: Menlo;">                )</p><p style="margin: 0px; font-size: 11px; font-family: Menlo;" data-mce-style="margin: 0px; font-size: 11px; font-family: Menlo;">        );</p><p style="margin: 0px; font-size: 11px; font-family: Menlo;" data-mce-style="margin: 0px; font-size: 11px; font-family: Menlo;">}</p><div><br></div></div><div style="font-family: Andale Mono; font-size: 10pt; color: #000000">If that doesn't work then the circuit-id may not be there (if no line appears at all in the logs), or if it only logs a partial line then the circuit-id is likely binary instead of ASCII.  I'm not sure how to log if it is binary - some use of binary-to-ascii will be necessary.<br><br><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"Sean McMurray" <sean@mvtel.com><br><b>To: </b>dhcp-users@lists.isc.org<br><b>Sent: </b>Tuesday, March 17, 2015 5:51:16 PM<br><b>Subject: </b>Logging circuit-id<br></blockquote></div><div data-marker="__QUOTED_TEXT__"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;">I would like my dhcpd logs to include circuit-id.<br>I have tried to use log() directives in my conf file, but nothing I have <br>tried works.<br><br>Here is an example of a configuration I have included in a subnet:<br><br>   log(info, concat(<br>     " Mac: ",binary-to-ascii(16, 8, ":", substring(hardware,1, 6))<br>     ," IP: ",binary-to-ascii (10, 8, ".", leased-address)<br>     ,"Circuit: ",option agent.circuit-id<br>   ));<br><br><br>Standard logging is working fine to record DHCPDISCOVER, DHCPOFFER, etc. <br>I just can't get custom entries to show up in the log.<br><br>_______________________________________________<br>dhcp-users mailing list<br>dhcp-users@lists.isc.org<br>https://lists.isc.org/mailman/listinfo/dhcp-users</blockquote></div></div><br></div></body></html>