From: Duilio J. P. <dp...@fc...> - 2004-10-02 03:31:40
|
I have implemented visual_log_set_verboseness() on libvisual core. We can set these: typedef enum { VISUAL_LOG_VERBOSENESS_NONE, /**< Show only VISUAL_LOG_INFO and VISUAL_LOG_ERROR messages. */ VISUAL_LOG_VERBOSENESS_LOW, /**< Show only VISUAL_LOG_INFO, VISUAL_LOG_ERROR and VISUAL_LOG_CRITICAL messages. */ VISUAL_LOG_VERBOSENESS_MEDIUM, /**< Show all log messages except VISUAL_LOG_DEBUG ones. */ VISUAL_LOG_VERBOSENESS_HIGH /**< Show all log messages. */ } VisLogVerboseness; The default level is VISUAL_LOG_VERBOSENESS_MEDIUM. (Dennis, do you think it shoul be LOW?). To avoid showing info or error messages, or to redirected them or to process them on some special way, use: visual_log_set_info_handler (visual_log_message_handler_func_t handler); where handler must have signature: void my_info_handler (const char *message, const char *funcname) { /* funcname is the name of the function which invokes visual_log() and can be NULL on non-GNU systems */ ... } Similar handlers can be set for warning/critical/error messages. Bye, Duilio. |