diff options
author | Luke Bratch <luke@bratch.co.uk> | 2019-06-01 19:11:00 +0100 |
---|---|---|
committer | Luke Bratch <luke@bratch.co.uk> | 2019-06-01 19:11:00 +0100 |
commit | c3f421e4046faf8b5f39cd1ad36bc4869405fcc9 (patch) | |
tree | 5d2c8575076a82b6ebe518c91fb14a339e92fe7c /config.c | |
parent | 0c153207be8a31fc66b7f6e9d0b849357017e34a (diff) |
Put debug logs in subdirectory and have max number to keep be configurable. Also fix possible crash in debugprint() if debug directory doesn't exist yet.
Diffstat (limited to 'config.c')
-rw-r--r-- | config.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -233,7 +233,10 @@ int createconfigfile(char *filename) { "\n" "# Debug verbosity (\"0\" for critical only, \"1\" for some extra info, \"2\" for full debug mode)\n" "# (All output goes to <basedir>/debug.txt)\n" - "debug = \"2\"\n"; + "debug = \"2\"\n" + "\n" + "# Number of debug logs to keep\n" + "debugkeep = \"5\"\n"; // Write complete string to file if ((fprintf(fp, "%s", string)) < 0) { |