log statement doesn't

Simon Hobson dhcp1 at thehobsons.co.uk
Tue Apr 12 06:53:11 UTC 2016


Doug Hughes <doug at will.to> wrote:

> option option125 code 125 = string;
> 
> log (debug, concat("hw: ", binary-to-ascii(16,8,":", hardware)));
> log (debug, concat("client-id: ", binary-to-ascii(16,8,":",substring(dhcp-client
> -identifier,16,1))));
> log (debug, concat("opt-125: ", substring(option125,1,7)));
> log (debug, "check option125");
> 
> The only lines that output anything are the 'hw' line at the beginning and the plain old option125 at the end. The other 2 lines output nothing, not even the plain text.. I wish there was extra levels of debugging that I could turn on to see raw options processing.

Try changing "substring(option125,1,7)" to "pick-first-value(substring(option125,1,7),"")" and see what happens (check the man page to make sure I've got that right). Ditto for client-id.
With concat, if any element is null, then the whole result is null, and so log won't log anything.



More information about the dhcp-users mailing list