Re: [master] logging: refactor printLogHeader

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If you're going to do this

> +const char *log_level_to_str[LOGLEVEL_MAX + 1] = {
> +    [DEBUGLVL] = "DEBUG",
> +    [INFO] = "INFO",
> +    [WARNING] = "WARN",
> +    [ERROR] = "ERR",
> +    [CRITICAL] = "CRIT"
> +};

Please fix this:

>  #define WARNING  30
>  #define ERROR    40
>  #define CRITICAL 50
> +#define LOGLEVEL_MAX CRITICAL

To be a real enum or at least not have gaps of 10 in it. That array doesn't
need 50 elements.

-- 
        Peter

Gravity is a habit that is hard to shake off.
		-- Pratchett

01234567890123456789012345678901234567890123456789012345678901234567890123456789

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux