From: Dennis S. <sy...@yo...> - 2004-09-28 23:12:35
|
On Tue, 2004-09-28 at 20:05 -0300, Duilio Javier Protti wrote: > Cool!, I want for this from a time ago, but I don't have worked > on because it was for 0.1.8 on the ROADMAP. But I think will be > good to get it right now. Well, Don't take the roadmap too litteraly, it's a direction, not a final road, remember, where we go, we make the roads ;) > I was thinking on a simple system like: > > void visual_log_set_verbose (int yes_or_no); > > to enable/disable i.e. debug messages (but maybe other internal > things too). Also would be good to let the user set this through > visual_init() passing -v flag or something like that. Well, I wouldn't do that, and especially not something as common as '-v' An application that just passes on his argv/argc could errornously change the verboseness level. I personally don't think that just 'visual_log, on and off' is anough. I was thinking about something like this: VISUAL_LOG_VERBOSENESS_HIGH (for everything) VISUAL_LOG_VERBOSENESS_MEDIUM (for warnings/criticals/errors) VISUAL_LOG_VERBOSENESS_LOW (for critical/errors) and: VISUAL_LOG_VERBOSENESS_NONE (for disabling ALL the messages) There is kinda one special case, that is VISUAL_LOG_INFO.. Not sure how we should handle this one in this case... > I believe having different debug levels (i.e. from 0 to 9) is > a bad idea on a dynamic library like libvisual, and is in general > very confusing. I agree that over doing it is confusing, but there is a clear distinction between VISUAL_LOG_DEBUG and VISUAL_LOG_ERROR, I don't think you can treat them equaly as they are whole different message classes. Please give me your comments... Greets, Dennis |