clear:log

Introduction

clear:log deletes $WORKING_DIR/app.log and nothing else, so rotated copies such as app.log.1 stay. It needs an active product.

splent clear:log
The 'app.log' file has been successfully cleared.

When there is a file to clear

A generated product logs to the console. Its logging.py, written by product:create, adds a log file only when the app config sets LOG_FILE, at that path.

A product without logging.py gets the framework’s fallback, which writes errors to LOG_FILE, or to app.log in the current directory.

clear:log finds a file only when one of these points at $WORKING_DIR/app.log.


Reference

Output Meaning
The 'app.log' file has been successfully cleared. The file was deleted
The 'app.log' file does not exist. Nothing to do
Error clearing the 'app.log' file: <error> The file could not be deleted. Exit 1

Back to top

splent. Distributed by an LGPL license v3. Contact us: drorganvidez@us.es