This library allows to control the console debug throw by the application on its normal running.
Although this variables can be set by the user using the defined environment variables, this method can be somewhat not easy to apply for normal non-experimented users.
We also have to mention that settings environment variables across unix platforms is really different from windows platform. Of course, leaving apart the consideration that windows users (not programmers) usually doesn't know anything abount environment variables or what they are.
That's why Af-Arch have 2 interfaces to tweak enviroment variables which controls console debug. The first one is done by setting the environment variables to the right value using the available shell or using the AfDal Log API.
The console log on Af-Arch is controled throught the following variables:
To enable debug log should be used AF_DEBUG=1 so future implementation can take advantage of AF_DEBUG value.
To disable debug log, AF_DEBUG var must be unset. Of course, to unset a environment variable or to set it have diferent ways to be done depending on the running platform. That's why the Afdal log module exists: to provide a consistent an unified version for log debug.
This environment variable can be activated with afdal_log_enable function.
Debug messages for normal operations are green colored, debug for critical and error message are red colored and warning messages are yellow colored.
As the previous variable, AF_DEBUG_COLOR should should be activated as AF_DEBUG_COLOR=1 in conjuntion with AF_DEBUG variable. To disable log coloring AF_DEBUG_COLOR must be not set to any value.
The last thing to take in consideration is that windows platform have not ansi terminals which means color will not work. It only works on, for example, mingw terminal, cygwin terminal or other unix emulation terminal which support ansi characters.
This environment variable can be activated using afdal_log_enable_color.
This variable can be activated using afdal_log_enable_filter function.
This variable can be activated using afdal_log_enable_class_filter.