diff options
author | James Booth <boothj5@gmail.com> | 2012-08-19 03:43:18 +0100 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2012-08-19 03:43:18 +0100 |
commit | e698738745367820e2e4bef8031c91a2a21e700a (patch) | |
tree | e4fca509a11070403d5baffe47b9543d53afb3b3 /src/command.c | |
parent | 74a88ad566989ef91641d0e8b95120bc6a66accd (diff) | |
download | profani-tty-e698738745367820e2e4bef8031c91a2a21e700a.tar.gz |
Customisable logging levels
Diffstat (limited to 'src/command.c')
-rw-r--r-- | src/command.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/command.c b/src/command.c index 66c00805..3fffef02 100644 --- a/src/command.c +++ b/src/command.c @@ -35,6 +35,7 @@ #include "preferences.h" #include "prof_autocomplete.h" #include "tinyurl.h" +#include "log.h" /* command structure * cmd - The actual string of the command @@ -329,6 +330,8 @@ static PAutocomplete commands_ac; gboolean process_input(char *inp) { + log_msg(PROF_LEVEL_DEBUG, PROF, "Input recieved: %s", inp); + gboolean result = FALSE; g_strstrip(inp); @@ -495,12 +498,18 @@ _cmd_connect(const char * const inp, struct cmd_help_t help) inp_block(); inp_get_password(passwd); inp_non_block(); + + log_msg(PROF_LEVEL_DEBUG, PROF, "Connecting as %s", lower); conn_status = jabber_connect(lower, passwd); - if (conn_status == JABBER_CONNECTING) + if (conn_status == JABBER_CONNECTING) { cons_show("Connecting..."); - if (conn_status == JABBER_DISCONNECTED) + log_msg(PROF_LEVEL_DEBUG, PROF, "Connecting..."); + } + if (conn_status == JABBER_DISCONNECTED) { cons_bad_show("Connection to server failed."); + log_msg(PROF_LEVEL_DEBUG, PROF, "Connection using %s failed", lower); + } result = TRUE; } |