el_enable_colors

NAME

el_enable_colors - enable pretty colors, depending on level log was printed with

SYNOPSIS

#include <embedlog.h>

int el_enable_colors(int enable);

int el_oenable_colors(struct el *el, int enable);

DESCRIPTION

If this is set to 1, output will be enriched with ANSI colors depending on the message severity. This option needs terminal supporting colors. You can store messages with colors to file, and then read them with colors on color-enabled terminal. If this is set to 0, no colors will be added. If you read file with colors in editor like vim, you will see control characters all over file.

EXAMPLES

el_enable_colors(1);
el_enable_colors(0);

RETURN VALUE

0 on succes, or -1 and set errno on failure.

ERRORS

ERRORS
EINVAL

Input argument is different than 1 or 0