Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add logs #195

Open
Xenepix opened this issue Nov 7, 2023 · 1 comment
Open

Add logs #195

Xenepix opened this issue Nov 7, 2023 · 1 comment

Comments

@Xenepix
Copy link
Member

Xenepix commented Nov 7, 2023

  • setup logs on settings
  • add logs on:
    • orders
    • operations (credits, debits, transactions)
@Xenepix
Copy link
Member Author

Xenepix commented Nov 9, 2023

LOGGING = {
    "version": 1,
    "formatters": {
        "standard": {"format": "%(asctime)s | [%(levelname)s] | %(name)s | %(module)s.%(funcName)s: %(lineno)d | %(message)s"},
    },
    "handlers": {
        "console": {"level": "DEBUG", "class": "logging.StreamHandler", "formatter": "verbose"},
        "watchdog_file": {
            "level": "INFO",
            "class": "logging.handlers.RotatingFileHandler",
            "filename": os.path.join(LOG_DIR, "watchdog.log"),
            "maxBytes": 1024 * 1024 * 5,  # 5 MB
            "backupCount": 5,
            "formatter": "standard",
        },
    },
    "loggers": {
        "watchdog": {
            "handlers": ["watchdog_file"],
            "level": "INFO",
            "propagate": True,
        },
    },
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant