With almost every software there are errors and those must be given levels. Grave errors may simply stop your program while simple notices can be resolved with a click. I've always proceeded by giving them a certain numeric degree of importance. But is there a general rule between programmers on how to chose these degrees?  Should a higher degree of importance be represented by a larger number (e.g. 500) or a smaller one (e.g. 5)? Is there a reason why? Should error levels be widely spaced (100, 200, 300, ...) or closer to each other (100, 101, 102)? And again, are there any advantages to this technique?
How should errors be given levels?
error handling;high level
Don't add unnecessary levels to your error codes.  You could spend ages pointlessly discussing whether a given error should be a level 83 or just a level 82.  All the end-user cares about is whether the system is working properly or if it's broken.So I would use something like INFO (not an error), WARNING (the system is working fine, but might not be doing what you expected), ERROR (something went wrong, but the system recovered) and FATAL (the system is broken, and isn't working any more).  You could perhaps split ERROR into MAJOR and MINOR, depending on how the error has affected the output.Whether error codes increase or decrease with severity is entirely arbitrary.  Just make sure it's well documented.