about summary refs log tree commit diff stats
path: root/src/command/cmd_ac.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/command/cmd_ac.c')
-rw-r--r--src/command/cmd_ac.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/command/cmd_ac.c b/src/command/cmd_ac.c
index b945528a..e3661cac 100644
--- a/src/command/cmd_ac.c
+++ b/src/command/cmd_ac.c
@@ -151,6 +151,7 @@ static Autocomplete notify_trigger_ac;
 static Autocomplete prefs_ac;
 static Autocomplete sub_ac;
 static Autocomplete log_ac;
+static Autocomplete log_level_ac;
 static Autocomplete autoaway_ac;
 static Autocomplete autoaway_mode_ac;
 static Autocomplete autoaway_presence_ac;
@@ -393,6 +394,12 @@ cmd_ac_init(void)
     autocomplete_add(log_ac, "where");
     autocomplete_add(log_ac, "level");
 
+    log_level_ac = autocomplete_new();
+    autocomplete_add(log_level_ac, "WARN");
+    autocomplete_add(log_level_ac, "INFO");
+    autocomplete_add(log_level_ac, "DEBUG");
+    autocomplete_add(log_level_ac, "ERROR");
+
     autoaway_ac = autocomplete_new();
     autocomplete_add(autoaway_ac, "mode");
     autocomplete_add(autoaway_ac, "time");
@@ -1354,6 +1361,7 @@ cmd_ac_reset(ProfWin* window)
     autocomplete_reset(who_roster_ac);
     autocomplete_reset(prefs_ac);
     autocomplete_reset(log_ac);
+    autocomplete_reset(log_level_ac);
     autocomplete_reset(commands_ac);
     autocomplete_reset(autoaway_ac);
     autocomplete_reset(autoaway_mode_ac);
@@ -1534,6 +1542,7 @@ cmd_ac_uninit(void)
     autocomplete_free(sub_ac);
     autocomplete_free(wintitle_ac);
     autocomplete_free(log_ac);
+    autocomplete_free(log_level_ac);
     autocomplete_free(prefs_ac);
     autocomplete_free(autoaway_ac);
     autocomplete_free(autoaway_mode_ac);
@@ -2442,6 +2451,10 @@ _log_autocomplete(ProfWin* window, const char* const input, gboolean previous)
     if (result) {
         return result;
     }
+    result = autocomplete_param_with_ac(input, "/log level", log_level_ac, TRUE, previous);
+    if (result) {
+        return result;
+    }
     result = autocomplete_param_with_ac(input, "/log", log_ac, TRUE, previous);
     if (result) {
         return result;
='#n169'>169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220