GUAC-911: Reduce available log levels to ERROR, WARNING, INFO, and DEBUG.
This commit is contained in:
parent
431fd2de6f
commit
f71067b024
@ -46,24 +46,6 @@ void vguacd_log(guac_client_log_level level, const char* format,
|
||||
/* Convert log level to syslog priority */
|
||||
switch (level) {
|
||||
|
||||
/* Emergency log level */
|
||||
case GUAC_LOG_EMERGENCY:
|
||||
priority = LOG_EMERG;
|
||||
priority_name = "EMERGENCY";
|
||||
break;
|
||||
|
||||
/* Alert log level */
|
||||
case GUAC_LOG_ALERT:
|
||||
priority = LOG_ALERT;
|
||||
priority_name = "ALERT";
|
||||
break;
|
||||
|
||||
/* Critical log level */
|
||||
case GUAC_LOG_CRITICAL:
|
||||
priority = LOG_CRIT;
|
||||
priority_name = "CRITICAL";
|
||||
break;
|
||||
|
||||
/* Error log level */
|
||||
case GUAC_LOG_ERROR:
|
||||
priority = LOG_ERR;
|
||||
@ -76,12 +58,6 @@ void vguacd_log(guac_client_log_level level, const char* format,
|
||||
priority_name = "WARNING";
|
||||
break;
|
||||
|
||||
/* Notice log level */
|
||||
case GUAC_LOG_NOTICE:
|
||||
priority = LOG_NOTICE;
|
||||
priority_name = "NOTICE";
|
||||
break;
|
||||
|
||||
/* Informational log level */
|
||||
case GUAC_LOG_INFO:
|
||||
priority = LOG_INFO;
|
||||
|
@ -320,7 +320,7 @@ int __guac_handle_end(guac_client* client, guac_instruction* instruction) {
|
||||
}
|
||||
|
||||
int __guac_handle_disconnect(guac_client* client, guac_instruction* instruction) {
|
||||
guac_client_log(client, GUAC_LOG_NOTICE,
|
||||
guac_client_log(client, GUAC_LOG_INFO,
|
||||
"Disconnect requested. Stopping client...");
|
||||
guac_client_stop(client);
|
||||
return 0;
|
||||
|
@ -59,50 +59,29 @@ typedef enum guac_client_state {
|
||||
|
||||
/**
|
||||
* All supported log levels used by the logging subsystem of each Guacamole
|
||||
* client. These log levels correspond to the log levels defined by RFC 5424.
|
||||
* client. These log levels correspond to a subset of the log levels defined by
|
||||
* RFC 5424.
|
||||
*/
|
||||
typedef enum guac_client_log_level {
|
||||
|
||||
/**
|
||||
* Emergencies which render the system unusable.
|
||||
*/
|
||||
GUAC_LOG_EMERGENCY = 0,
|
||||
|
||||
/**
|
||||
* The system may be usable, but the current state is dangerous enough that
|
||||
* action must be taken immediately.
|
||||
*/
|
||||
GUAC_LOG_ALERT = 1,
|
||||
|
||||
/**
|
||||
* Critically-important messages.
|
||||
*/
|
||||
GUAC_LOG_CRITICAL = 2,
|
||||
|
||||
/**
|
||||
* General errors: important, but not necessarily critically so.
|
||||
* Fatal errors.
|
||||
*/
|
||||
GUAC_LOG_ERROR = 3,
|
||||
|
||||
/**
|
||||
* Non-fatal conditions that are likely unintentional.
|
||||
* Non-fatal conditions that indicate problems.
|
||||
*/
|
||||
GUAC_LOG_WARNING = 4,
|
||||
|
||||
/**
|
||||
* Significant but normal conditions.
|
||||
*/
|
||||
GUAC_LOG_NOTICE = 5,
|
||||
|
||||
/**
|
||||
* Normal conditions that may be interesting but in most cases should be
|
||||
* ignored.
|
||||
* Informational messages of general interest to users or administrators.
|
||||
*/
|
||||
GUAC_LOG_INFO = 6,
|
||||
|
||||
/**
|
||||
* Informational messages that are too frequent or too detailed for a more
|
||||
* severe log level, but can be useful for debugging.
|
||||
* Informational messages which can be useful for debugging, but are
|
||||
* otherwise not useful to users or administrators.
|
||||
*/
|
||||
GUAC_LOG_DEBUG = 7
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user