rtCamp / Frappe-Manager

A CLI tool based on Docker Compose to easily manage Frappe based projects.
MIT License
128 stars 26 forks source link

Logging and Site directory migration #63

Closed Xieyt closed 11 months ago

Xieyt commented 11 months ago

This PR:

  1. Introduces change in cli directory structure i.e structure of /home/<user>/frappe directory. (#59) This new directories are introduced in cli directory to compensate different changes.

    • Logs are stored in /home/<user>/frappe/logs.
    • Sites are stored in /home/<user>/frappe/sites, previously sites were stored in /home/<user>/frappe.
  2. Introduces logging system as a module.

    • logs:
      • command invoked by user when running fm.
      • executed docker commands, command output and return code.
      • exception happend during runtime.
    • rotates logs when the log size hits 10 MB, creates files like fm.log.1 when rotate limit is reached.
    • the logs are stored in file fm.log.
  3. Improves caret not lost after unexpected exit of the cli. Introduce exit cleanup function.

  4. Optimize checking of site existence.

  5. 64