-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > This is just great, but I think we should go a bit further. If we want > to add a new error message, we have to add a new number at the end of > the list. As all the numbers start from 1 and are incremented, it > becomes rapidly difficult to group errors by their numbers (ie, all the > errors between 450 and 460 are related to operation X).
For the apacheds this is true, but for the shared I started a new block of numbers for each submodule (01xxx, 02xxx, ...). Maybe a refactoring of the apacheds is needed. > > What about defining a number which would inform immediately about the > kind of message we are dealing with ? We can for instance use hex > numbers, where the two higher bits will be used to indicate the log level : > DEBUG = 00XXXXXXXXX... > INFO = 01XXXXXXXXX... > WARN = 10XXXXXXXXX... > ERROR = 11XXXXXXXXX... ? ATM only errors should be i18n-tyified. This means only ERROR/FATAL may happen. All the other things are not yet translated. Furthermore a log messages indicates clearly of which level it is. Do I miss something? > > The idea is that if the number is <0, then it's an error or a warning. > > IN the same vein, we can also split the errors by family. As the number > will be an integer, it remains 30 bits to store informations. Assuming > that shared messages are indicated by the bit number 29, then we have a > way to split again : > 101xxxxxx = a warning in the shared module > 1111xxxxx = an error in the shared module, asn1 subproject... > > etc. > > wdyt ? > -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkugz/4ACgkQ2lZVCB08qHFU1wCfXS8Z4S9M5mvNjvBHzrtiQCEQ xkcAnioPrxyxep0Ih2pSc+XKoZ3tg1Lh =qoVr -----END PGP SIGNATURE-----
