1. These forums are still being retired! Please use GitHub discussions or Discord. You cannot create new threads or new accounts now. If you need to contact some user of the forums, you should do it sooner, rather than later. This notice was last updated on May 30th, 2021.

1.21 (obsolete) Prune Log 1.0.4.21

Prunes (deletes) TShock text log files based upon criteria given.

  1. GrandPa-G
    API Version:
    21
    TShock Version:
    4.3.9
    Source URL:
    https://github.com/Grandpa-G/PruneLog
    PruneLog
    Prune log will delete text log files based upon criteria given in a config file or by command line options. The plugin is invoked by the command prunelog or pl. The options accepted are:
    • -prune starts prune operation
    • -reload/-r reloads options from prunelog.json config file
    • -verbose/-v show each file pruned
    • -!verbose/-!v don't show each file pruned
    • -keep n keeps n number of log files from most recent
    • -days n prunes any log files created before n days from today
    • -bydays prune criteria set by value of days (keepForDays option in config file)
    • -bycount prune criteria set by value of keep (keepOnlyLogs option in config file)
    • -preview/p performs prune action without actually deleting any files
    • -!preview/!p negates preview, thus files will be deleted
    • -list/l show current prune criteria
    • -help this information
    The critiera is either based upon a value for the number of days in the past (-days n) or by the number of log files (-keep n) counting from the most recent. In both cases, the current log file is skipped. The method by which the criteria is applied is either by number of days OR number of files, but not both. The option -bydays sets the criteria to work only on file creation dates and -bycount sets the criteria to work only on number of files. The number of files option sorts the file names by creation date to find the order.

    The options may be set in the config file name prunelog.json held in the TShock folder. The options are:
    Code:
    "keepOnlyLogs": 999999,
    "keepForDays": 3,
    "archiveLogs": false,
    "pruneByDate": true