Added /log shared setting

Issue #170
This commit is contained in:
James Booth
2014-04-13 21:56:35 +01:00
parent a4a23fdf68
commit c3418a2909
8 changed files with 52 additions and 8 deletions

View File

@@ -644,8 +644,9 @@ static struct cmd_t command_defs[] =
{ "/log [property] [value]",
"-----------------------",
"Property may be one of:",
"rotate : 'on' or 'off', determines whether the log will be rotated, defaults to 'on'",
"maxsize : When log file size exceeds this value and rotate is enabled, it will be automatically be rotated, defaults to 1048580 (1MB)",
"rotate : Rotate log, accepts 'on' or 'off', defaults to 'on'.",
"maxsize : With rotate enabled, specifies the max log size, defaults to 1048580 (1MB).",
"shared : Share logs between all instances, accepts 'on' or 'off', defaults to 'on'.",
NULL } } },
{ "/reconnect",
@@ -953,6 +954,7 @@ cmd_init(void)
log_ac = autocomplete_new();
autocomplete_add(log_ac, "maxsize");
autocomplete_add(log_ac, "rotate");
autocomplete_add(log_ac, "shared");
autoaway_ac = autocomplete_new();
autocomplete_add(autoaway_ac, "mode");
@@ -1687,6 +1689,11 @@ _log_autocomplete(char *input, int *size)
if (result != NULL) {
return result;
}
result = autocomplete_param_with_func(input, size, "/log shared",
prefs_autocomplete_boolean_choice);
if (result != NULL) {
return result;
}
result = autocomplete_param_with_ac(input, size, "/log", log_ac);
if (result != NULL) {
return result;