From 1b8a42d47239a3a0703b36766bccbf09ad1f2902 Mon Sep 17 00:00:00 2001 From: froggleston Date: Tue, 29 Apr 2025 14:55:36 +0100 Subject: [PATCH 1/3] Improve logging docs in 101 and advanced setup --- docs/advanced-setup.md | 16 +++++++++------- docs/strategy-101.md | 9 +++++++-- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/docs/advanced-setup.md b/docs/advanced-setup.md index ec25cb616..f20e91cb0 100644 --- a/docs/advanced-setup.md +++ b/docs/advanced-setup.md @@ -189,13 +189,15 @@ as the watchdog. ## Advanced Logging Freqtrade uses the default logging module provided by python. -Python allows for extensive [logging configuration](https://docs.python.org/3/library/logging.config.html#logging.config.dictConfig) in this regards - way more than what can be covered here. +Python allows for extensive [logging configuration](https://docs.python.org/3/library/logging.config.html#logging.config.dictConfig) in this regard - way more than what can be covered here. -Default logging (Colored terminal output) is setup by default if no `log_config` is provided. +Default logging format (coloured terminal output) is set up by default if no `log_config` is provided in your freqtrade configuration. Using `--logfile logfile.log` will enable the RotatingFileHandler. -If you're not content with the log format - or with the default settings provided for the RotatingFileHandler, you can customize logging to your liking. -The default configuration looks roughly like the below - with the file handler being provided - but not enabled. +If you're not content with the log format, or with the default settings provided for the RotatingFileHandler, you can customize logging to your liking by adding the `log_config` configuration to your freqtrade configuration file(s). + +The default configuration looks roughly like the below, with the file handler being provided but not enabled as the `filename` is commented out. +Uncomment this line and supply a valid path/filename to enable it. ``` json hl_lines="5-7 13-16 27" { @@ -237,12 +239,12 @@ The default configuration looks roughly like the below - with the file handler b Highlighted lines in the above code-block define the Rich handler and belong together. The formatter "standard" and "file" will belong to the FileHandler. -Each handler must use one of the defined formatters (by name) - and it's class must be available and a valid logging class. -To actually use a handler - it must be in the "handlers" section inside the "root" segment. +Each handler must use one of the defined formatters (by name), its class must be available, and must be a valid logging class. +To actually use a handler, it must be in the "handlers" section inside the "root" segment. If this section is left out, freqtrade will provide no output (in the non-configured handler, anyway). !!! Tip "Explicit log configuration" - We recommend to extract the logging configuration from your main configuration, and provide it to your bot via [multiple configuration files](configuration.md#multiple-configuration-files) functionality. This will avoid unnecessary code duplication. + We recommend to extract the logging configuration from your main freqtrade configuration file, and provide it to your bot via [multiple configuration files](configuration.md#multiple-configuration-files) functionality. This will avoid unnecessary code duplication. --- diff --git a/docs/strategy-101.md b/docs/strategy-101.md index 9226537e1..5f2c3d49d 100644 --- a/docs/strategy-101.md +++ b/docs/strategy-101.md @@ -165,18 +165,23 @@ If there is any significant difference, verify that your entry and exit signals ## Controlling or monitoring a running bot -Once your bot is running in dry or live mode, Freqtrade has five mechanisms to control or monitor a running bot: +Once your bot is running in dry or live mode, Freqtrade has six mechanisms to control or monitor a running bot: - **[FreqUI](freq-ui.md)**: The easiest to get started with, FreqUI is a web interface to see and control current activity of your bot. - **[Telegram](telegram-usage.md)**: On mobile devices, Telegram integration is available to get alerts about your bot activity and to control certain aspects. - **[FTUI](https://github.com/freqtrade/ftui)**: FTUI is a terminal (command line) interface to Freqtrade, and allows monitoring of a running bot only. -- **[REST API](rest-api.md)**: The REST API allows programmers to develop their own tools to interact with a Freqtrade bot. +- **[freqtrade-client](rest-api.md#consuming-the-api)**: A python implementation of the REST API, making it easy to make requests and consume bot responses from your python apps or the command line. +- **[REST API endpoints](rest-api.md#available-endpoints)**: The REST API allows programmers to develop their own tools to interact with a Freqtrade bot. - **[Webhooks](webhook-config.md)**: Freqtrade can send information to other services, e.g. discord, by webhooks. ### Logs Freqtrade generates extensive debugging logs to help you understand what's happening. Please familiarise yourself with the information and error messages you might see in your bot logs. +Logging by default occurs on standard out (the command line). If you want to write out to a file instead, many freqtrade commands, including the `trade` command, accepts the `--logfile` option to write to a file. + +Check the [FAQ](https://www.freqtrade.io/en/stable/faq/#how-do-i-search-the-bot-logs-for-something) for examples. + ## Final Thoughts Algo trading is difficult, and most public strategies are not good performers due to the time and effort to make a strategy work profitably in multiple scenarios. From 78943bf88db2526f6d7f1c06c2a3887b545740f9 Mon Sep 17 00:00:00 2001 From: froggleston Date: Tue, 29 Apr 2025 14:57:54 +0100 Subject: [PATCH 2/3] Add link to FAQ --- docs/strategy-101.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/strategy-101.md b/docs/strategy-101.md index 5f2c3d49d..72e64f3de 100644 --- a/docs/strategy-101.md +++ b/docs/strategy-101.md @@ -178,7 +178,7 @@ Once your bot is running in dry or live mode, Freqtrade has six mechanisms to co Freqtrade generates extensive debugging logs to help you understand what's happening. Please familiarise yourself with the information and error messages you might see in your bot logs. -Logging by default occurs on standard out (the command line). If you want to write out to a file instead, many freqtrade commands, including the `trade` command, accepts the `--logfile` option to write to a file. +Logging by default occurs on standard out (the command line). If you want to write out to a file instead, many freqtrade commands, including the `trade` command, accept the `--logfile` option to write to a file. Check the [FAQ](https://www.freqtrade.io/en/stable/faq/#how-do-i-search-the-bot-logs-for-something) for examples. From d90666d2e8b38a2a96070f0abe91c2b5514bd5f9 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 29 Apr 2025 20:22:47 +0200 Subject: [PATCH 3/3] docs: minor link refactor --- docs/strategy-101.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/strategy-101.md b/docs/strategy-101.md index 72e64f3de..a5e100b8d 100644 --- a/docs/strategy-101.md +++ b/docs/strategy-101.md @@ -180,7 +180,7 @@ Freqtrade generates extensive debugging logs to help you understand what's happe Logging by default occurs on standard out (the command line). If you want to write out to a file instead, many freqtrade commands, including the `trade` command, accept the `--logfile` option to write to a file. -Check the [FAQ](https://www.freqtrade.io/en/stable/faq/#how-do-i-search-the-bot-logs-for-something) for examples. +Check the [FAQ](faq.md#how-do-i-search-the-bot-logs-for-something) for examples. ## Final Thoughts