colourise doesn't seem to function.

Arran Cudbard-Bell a.cudbardb at freeradius.org
Wed Jul 16 19:51:16 CEST 2014


On 16 Jul 2014, at 09:01, Franks Andy (RLZ) IT Systems Engineer <Andy.Franks at sath.nhs.uk> wrote:

> Thanks Alan,
>> and you'd only get the coloured stuff when in full debug
> mode...which wouldnt be done on a production server unless you're also
> willing to patch?
>  Ok, I'll try the update. It's funny because I'm sure I saw it working
> at one point early on, must have been an upgrade that broke it again. We
> do run -X (full debug) mode occasionally on production servers to find
> faults, given that NAS's tend to fail over to another radius if one
> fails. 
> Thanks
> Andy
> 

Call isatty() if your output device appears not to be a tty when it won't 
colourise the text.

Check with:

#include <stdio.h>
#include <unistd.h>

int main(int argc, char **argv)
{
	if (!isatty(fileno(stdout))) {
		printf("I'm not a TTY :(\n");
		return 1;
	}

	printf("I'm a TTY :)\n");
	return 0;
}

Arran Cudbard-Bell <a.cudbardb at freeradius.org>
FreeRADIUS development team

FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 881 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20140716/d6088d55/attachment.pgp>


More information about the Freeradius-Users mailing list