From 0e9c17219d91a10369c20849aca787837a2bfb1b Mon Sep 17 00:00:00 2001 From: Antony Milne Date: Tue, 24 May 2022 15:44:11 +0100 Subject: [PATCH 01/12] Update logging.md Signed-off-by: Antony Milne --- docs/source/logging/logging.md | 59 ++++++++++++++++++++++++++-------- 1 file changed, 46 insertions(+), 13 deletions(-) diff --git a/docs/source/logging/logging.md b/docs/source/logging/logging.md index fab1d1d4cb..09d85c6401 100644 --- a/docs/source/logging/logging.md +++ b/docs/source/logging/logging.md @@ -1,14 +1,18 @@ # Logging -Kedro uses, and facilitates, the use of Python’s `logging` library by providing a default logging configuration. This can be found in `conf/base/logging.yml` in every project generated using Kedro’s CLI `kedro new` command. +Kedro uses [Python's `logging` library](https://docs.python.org/3/library/logging.html). Configuration is provided as a dictionary according to the [Python logging configuration schema](https://docs.python.org/3/library/logging.config.html#logging-config-dictschema) in two places: +1. [Default configuration built into the Kedro framework](https://github.com/kedro-org/kedro/blob/main/kedro/config/logging.yml). This cannot be altered. +2. Your project-side logging configuration. Every project generated using Kedro's CLI `kedro new` command includes a file `conf/base/logging.yml`. You can alter this configuration and provide different configurations for different run environment according to the [standard Kedro mechanisms for handling configuration](../kedro_project_setup/configuration.md). -## Configure logging +```{note} +Providing project-side logging configuration is completely optional. You can delete the `conf/base/logging.yml` file and Kedro will run using purely the framework's built in configuration. +``` -You can customise project logging in `conf//logging.yml` using [standard Kedro mechanisms for handling configuration](../kedro_project_setup/configuration.md). The configuration should comply with the guidelines from the `logging` library. Find more about it in [the documentation for `logging` module](https://docs.python.org/3/library/logging.html). +Framework-side and project-side logging configuration are loaded through subsequent calls to [`logging.config.dictConfig`](https://docs.python.org/3/library/logging.config.html#logging.config.dictConfig). This means that, when it is provided, the project-side logging configuration will typically _fully overwrite_ the default framework-side logging configuration. [Incremental configuration](https://docs.python.org/3/library/logging.config.html#incremental-configuration) is also possible if the `incremental` key is explicitly set to `True` in your project-side logging configuration, but the modifications that are possible are quite limited. ## Use logging -After reading and applying project logging configuration, `kedro` will start emitting the logs automatically. To log your own code, you are advised to do the following: +To perform logging in your own code (e.g. in a node), you are advised to do as follows: ```python import logging @@ -22,16 +26,45 @@ log.info("Send information") The name of a logger corresponds to a key in the `loggers` section in `logging.yml` (e.g. `kedro.io`). See [Python's logging documentation](https://docs.python.org/3/library/logging.html#logger-objects) for more information. ``` -## Logging for `anyconfig` +You can take advantage of rich's [console markup](https://rich.readthedocs.io/en/stable/markup.html) when enabled in your logging calls: +```python +log.error("[bold red blink]Important error message![/]", extra={"markup": True}) +``` + +## Default framework-side logging configuration + +Kedro's [default logging configuration](https://github.com/kedro-org/kedro/blob/main/kedro/config/logging.yml) defines a handler called `rich` that uses the [Rich logging handler](https://rich.readthedocs.io/en/stable/logging.html) to format messages and handle exceptions. + +By default, Python only shows logging messages at level `WARNING` and above. Kedro's logging configuration specifies that `INFO` level messages from Kedro should also be emitted. This makes it easier to track the progress of your pipeline when you perform a `kedro run`. Kedro's default logging configuration does not alter the level of any other loggers from the default `WARNING`. + +## Project-side logging configuration + +In addition to the `rich` handler defined in Kedro's framework, the [project-side `conf/base/logging.yml`](https://github.com/kedro-org/kedro/blob/main/kedro/templates/project/%7B%7B%20cookiecutter.repo_name%20%7D%7D/conf/base/logging.yml) defines three further logging handlers: +* `console`: show logs on standard output (typically your terminal screen) without any rich formatting +* `info_file_handler`: write logs of level `INFO` and above to `logs/info.log` +* `error_file_handler`: write logs of level `ERROR` and above to `logs/error.log` + +There project-side logging configuration also ensures that [logs emitted from your project](#use-logging) should be shown if they are `INFO` level or above (as opposed to the Python default of `WARNING`). + +We now give some common examples of how you might like to change your project-side configuration. + +### Disable file-based logging + +The simplest way to disable file-based logging is simply to delete your `conf/base/logging.yml` file and the `logs` directory. This will mean that Kedro uses the default framework-side logging configuration, which does not include any file-based handlers. + +Alternatively, if you would like to keep other configuration in `conf/base/logging.yml` and just disable file-based logging, then you can remove the file-based handlers from the `root` logger as follows: +```diff + root: +- handlers: [console, info_file_handler, error_file_handler] ++ handlers: [console] +``` -By default, [anyconfig](https://github.com/ssato/python-anyconfig) library that is used by `kedro` to read configuration files emits a log message with `INFO` level on every read. To reduce the amount of logs being sent for CLI calls, default project logging configuration in `conf/base/logging.yml` sets the level for `anyconfig` logger to `WARNING`. +### Use plain console logging -If you would like `INFO` level messages to propagate, you can update `anyconfig` logger level in `conf/base/logging.yml` as follows: +To use plain rather than rich logging, swap the `rich` handler for the `console` one as follows: -```yaml -loggers: - anyconfig: - level: INFO # change - handlers: [console, info_file_handler, error_file_handler] - propagate: no +```diff + root: +- handlers: [console, info_file_handler, error_file_handler] ++ handlers: [rich, info_file_handler, error_file_handler] ``` From 12af7fe3d174abde1b80c7691fe597eac8fa3cf5 Mon Sep 17 00:00:00 2001 From: Antony Milne <49395058+AntonyMilneQB@users.noreply.github.com> Date: Wed, 25 May 2022 15:04:03 +0100 Subject: [PATCH 02/12] Update docs/source/logging/logging.md Co-authored-by: Sajid Alam <90610031+SajidAlamQB@users.noreply.github.com> --- docs/source/logging/logging.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/logging/logging.md b/docs/source/logging/logging.md index 09d85c6401..a968e70883 100644 --- a/docs/source/logging/logging.md +++ b/docs/source/logging/logging.md @@ -65,6 +65,6 @@ To use plain rather than rich logging, swap the `rich` handler for the `console` ```diff root: -- handlers: [console, info_file_handler, error_file_handler] -+ handlers: [rich, info_file_handler, error_file_handler] +- handlers: [rich, info_file_handler, error_file_handler] ++ handlers: [console, info_file_handler, error_file_handler] ``` From 6d31770b4c529620276acf19b719447e314d1327 Mon Sep 17 00:00:00 2001 From: Antony Milne Date: Wed, 25 May 2022 23:27:16 +0100 Subject: [PATCH 03/12] Update databricks.md Signed-off-by: Antony Milne --- docs/source/deployment/databricks.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/source/deployment/databricks.md b/docs/source/deployment/databricks.md index e6616acaa5..f817c560cc 100644 --- a/docs/source/deployment/databricks.md +++ b/docs/source/deployment/databricks.md @@ -2,6 +2,10 @@ This tutorial uses the [PySpark Iris Kedro Starter](https://github.com/kedro-org/kedro-starters/tree/main/pyspark-iris) to illustrate how to bootstrap a Kedro project using Spark and deploy it to a [Databricks cluster on AWS](https://databricks.com/aws). +```{note} +If you are using [Databricks Repos](https://docs.databricks.com/repos/index.html) to run a Kedro project then you should [disable file-based logging](../logging/logging.md#disable-file-based-logging). This prevents Kedro's Python logging from attempting to write to the read-only file system. +``` + ## Prerequisites * New or existing [AWS account](https://aws.amazon.com/premiumsupport/knowledge-center/create-and-activate-aws-account/) with administrative privileges From f4d3a56a622be101fe157315d0eb721076033b53 Mon Sep 17 00:00:00 2001 From: Antony Milne Date: Wed, 25 May 2022 23:48:03 +0100 Subject: [PATCH 04/12] Update docs Signed-off-by: Antony Milne --- docs/source/deployment/databricks.md | 2 +- docs/source/logging/logging.md | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/source/deployment/databricks.md b/docs/source/deployment/databricks.md index f817c560cc..4c301253ae 100644 --- a/docs/source/deployment/databricks.md +++ b/docs/source/deployment/databricks.md @@ -3,7 +3,7 @@ This tutorial uses the [PySpark Iris Kedro Starter](https://github.com/kedro-org/kedro-starters/tree/main/pyspark-iris) to illustrate how to bootstrap a Kedro project using Spark and deploy it to a [Databricks cluster on AWS](https://databricks.com/aws). ```{note} -If you are using [Databricks Repos](https://docs.databricks.com/repos/index.html) to run a Kedro project then you should [disable file-based logging](../logging/logging.md#disable-file-based-logging). This prevents Kedro's Python logging from attempting to write to the read-only file system. +If you are using [Databricks Repos](https://docs.databricks.com/repos/index.html) to run a Kedro project then you should [disable file-based logging](../logging/logging.md#disable-file-based-logging). This prevents Kedro from attempting to write to the read-only file system. ``` ## Prerequisites diff --git a/docs/source/logging/logging.md b/docs/source/logging/logging.md index a968e70883..2a8b740238 100644 --- a/docs/source/logging/logging.md +++ b/docs/source/logging/logging.md @@ -2,13 +2,13 @@ Kedro uses [Python's `logging` library](https://docs.python.org/3/library/logging.html). Configuration is provided as a dictionary according to the [Python logging configuration schema](https://docs.python.org/3/library/logging.config.html#logging-config-dictschema) in two places: 1. [Default configuration built into the Kedro framework](https://github.com/kedro-org/kedro/blob/main/kedro/config/logging.yml). This cannot be altered. -2. Your project-side logging configuration. Every project generated using Kedro's CLI `kedro new` command includes a file `conf/base/logging.yml`. You can alter this configuration and provide different configurations for different run environment according to the [standard Kedro mechanisms for handling configuration](../kedro_project_setup/configuration.md). +2. Your project-side logging configuration. Every project generated using Kedro's CLI `kedro new` command includes a file `conf/base/logging.yml`. You can alter this configuration and provide different configurations for different run environment according to the [standard Kedro mechanism for handling configuration](../kedro_project_setup/configuration.md). ```{note} -Providing project-side logging configuration is completely optional. You can delete the `conf/base/logging.yml` file and Kedro will run using purely the framework's built in configuration. +Providing project-side logging configuration is entirely optional. You can delete the `conf/base/logging.yml` file and Kedro will run using the framework's built in configuration. ``` -Framework-side and project-side logging configuration are loaded through subsequent calls to [`logging.config.dictConfig`](https://docs.python.org/3/library/logging.config.html#logging.config.dictConfig). This means that, when it is provided, the project-side logging configuration will typically _fully overwrite_ the default framework-side logging configuration. [Incremental configuration](https://docs.python.org/3/library/logging.config.html#incremental-configuration) is also possible if the `incremental` key is explicitly set to `True` in your project-side logging configuration, but the modifications that are possible are quite limited. +Framework-side and project-side logging configuration are loaded through subsequent calls to [`logging.config.dictConfig`](https://docs.python.org/3/library/logging.config.html#logging.config.dictConfig). This means that, when it is provided, the project-side logging configuration typically _fully overwrites_ the framework-side logging configuration. [Incremental configuration](https://docs.python.org/3/library/logging.config.html#incremental-configuration) is also possible if the `incremental` key is explicitly set to `True` in your project-side logging configuration. In practice, however, the set of options that can be modified through incremental configuration is quite limited. ## Use logging @@ -23,7 +23,7 @@ log.info("Send information") ``` ```{note} -The name of a logger corresponds to a key in the `loggers` section in `logging.yml` (e.g. `kedro.io`). See [Python's logging documentation](https://docs.python.org/3/library/logging.html#logger-objects) for more information. +The name of a logger corresponds to a key in the `loggers` section in `logging.yml` (e.g. `kedro`). See [Python's logging documentation](https://docs.python.org/3/library/logging.html#logger-objects) for more information. ``` You can take advantage of rich's [console markup](https://rich.readthedocs.io/en/stable/markup.html) when enabled in your logging calls: @@ -35,7 +35,7 @@ log.error("[bold red blink]Important error message![/]", extra={"markup": True}) Kedro's [default logging configuration](https://github.com/kedro-org/kedro/blob/main/kedro/config/logging.yml) defines a handler called `rich` that uses the [Rich logging handler](https://rich.readthedocs.io/en/stable/logging.html) to format messages and handle exceptions. -By default, Python only shows logging messages at level `WARNING` and above. Kedro's logging configuration specifies that `INFO` level messages from Kedro should also be emitted. This makes it easier to track the progress of your pipeline when you perform a `kedro run`. Kedro's default logging configuration does not alter the level of any other loggers from the default `WARNING`. +By default, Python only shows logging messages at level `WARNING` and above. Kedro's logging configuration specifies that `INFO` level messages from Kedro should also be emitted. This makes it easier to track the progress of your pipeline when you perform a `kedro run`. ## Project-side logging configuration @@ -44,9 +44,11 @@ In addition to the `rich` handler defined in Kedro's framework, the [project-sid * `info_file_handler`: write logs of level `INFO` and above to `logs/info.log` * `error_file_handler`: write logs of level `ERROR` and above to `logs/error.log` -There project-side logging configuration also ensures that [logs emitted from your project](#use-logging) should be shown if they are `INFO` level or above (as opposed to the Python default of `WARNING`). +The logging handlers that are actually used by default are `rich`, `info_file_handler` and `error_file_handler`. -We now give some common examples of how you might like to change your project-side configuration. +The project-side logging configuration also ensures that [logs emitted from your project's logger](#use-logging) should be shown if they are `INFO` level or above (as opposed to the Python default of `WARNING`). + +We now give some common examples of how you might like to change your project's logging configuration. ### Disable file-based logging From bbfe7066cecbbe02f182a60fa9f4a33ca15a008e Mon Sep 17 00:00:00 2001 From: Antony Milne Date: Thu, 26 May 2022 00:10:35 +0100 Subject: [PATCH 05/12] Update RELEASE.md Signed-off-by: Antony Milne --- RELEASE.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RELEASE.md b/RELEASE.md index f6a7843e9e..1bf296a84f 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -16,11 +16,15 @@ ## Major features and improvements * Added `abfss` to list of cloud protocols, enabling abfss paths. +* Kedro now uses the [https://github.com/Textualize/rich](Rich) library to format terminal logs. +* The file `conf/base/logging.yml` is now optional. See [our documentation](https://kedro.readthedocs.io/en/0.18.2/logging/logging.html) for details. ## Bug fixes and other changes * Bumped `pyyaml` upper-bound to make Kedro compatible with the [pyodide](https://pyodide.org/en/stable/usage/loading-packages.html#micropip) stack. * Updated project template's Sphinx configuration to use `myst_parser` instead of `recommonmark`. * Reduced number of log lines by changing the logging level from `INFO` to `DEBUG` for low priority messages. +* Kedro's framework-side logging configuration no longer performs file-based logging. Hence superfluous `info.log`/`errors.log` files are no longer created in your project root, and running Kedro on read-only file systems such as Databricks Repos is now possible. +* The `root` logger is now set to the Python default level of `WARNING` rather than `INFO`. Kedro's logger is still set to emit `INFO` level messages. ## Upcoming deprecations for Kedro 0.19.0 * `kedro.extras.ColorHandler` will be removed in 0.19.0. From a5038cce44e9c08dd38e53ab5c1c0e47ef2e5364 Mon Sep 17 00:00:00 2001 From: Antony Milne Date: Thu, 26 May 2022 16:45:23 +0100 Subject: [PATCH 06/12] Update based on Merel's review Signed-off-by: Antony Milne --- docs/source/logging/logging.md | 46 +++++++++++++++++----------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/docs/source/logging/logging.md b/docs/source/logging/logging.md index 2a8b740238..449d870316 100644 --- a/docs/source/logging/logging.md +++ b/docs/source/logging/logging.md @@ -8,28 +8,7 @@ Kedro uses [Python's `logging` library](https://docs.python.org/3/library/loggin Providing project-side logging configuration is entirely optional. You can delete the `conf/base/logging.yml` file and Kedro will run using the framework's built in configuration. ``` -Framework-side and project-side logging configuration are loaded through subsequent calls to [`logging.config.dictConfig`](https://docs.python.org/3/library/logging.config.html#logging.config.dictConfig). This means that, when it is provided, the project-side logging configuration typically _fully overwrites_ the framework-side logging configuration. [Incremental configuration](https://docs.python.org/3/library/logging.config.html#incremental-configuration) is also possible if the `incremental` key is explicitly set to `True` in your project-side logging configuration. In practice, however, the set of options that can be modified through incremental configuration is quite limited. - -## Use logging - -To perform logging in your own code (e.g. in a node), you are advised to do as follows: - -```python -import logging - -log = logging.getLogger(__name__) -log.warning("Issue warning") -log.info("Send information") -``` - -```{note} -The name of a logger corresponds to a key in the `loggers` section in `logging.yml` (e.g. `kedro`). See [Python's logging documentation](https://docs.python.org/3/library/logging.html#logger-objects) for more information. -``` - -You can take advantage of rich's [console markup](https://rich.readthedocs.io/en/stable/markup.html) when enabled in your logging calls: -```python -log.error("[bold red blink]Important error message![/]", extra={"markup": True}) -``` +Framework-side and project-side logging configuration are loaded through subsequent calls to [`logging.config.dictConfig`](https://docs.python.org/3/library/logging.config.html#logging.config.dictConfig). This means that, when it is provided, the project-side logging configuration typically _fully overwrites_ the framework-side logging configuration. [Incremental configuration](https://docs.python.org/3/library/logging.config.html#incremental-configuration) is also possible if the `incremental` key is explicitly set to `True` in your project-side logging configuration. ## Default framework-side logging configuration @@ -52,7 +31,7 @@ We now give some common examples of how you might like to change your project's ### Disable file-based logging -The simplest way to disable file-based logging is simply to delete your `conf/base/logging.yml` file and the `logs` directory. This will mean that Kedro uses the default framework-side logging configuration, which does not include any file-based handlers. +You might sometimes need to disable file-based logging, e.g. if you are running Kedro on a read-only file system such as [Databricks Repos](https://docs.databricks.com/repos/index.html). The simplest way to do this is simply to delete your `conf/base/logging.yml` file. The `logs` directory can then also be safely removed. With no project-side logging configuration specified, Kedro uses the default framework-side logging configuration, which does not include any file-based handlers. Alternatively, if you would like to keep other configuration in `conf/base/logging.yml` and just disable file-based logging, then you can remove the file-based handlers from the `root` logger as follows: ```diff @@ -70,3 +49,24 @@ To use plain rather than rich logging, swap the `rich` handler for the `console` - handlers: [rich, info_file_handler, error_file_handler] + handlers: [console, info_file_handler, error_file_handler] ``` + +## Perform logging in your project + +To perform logging in your own code (e.g. in a node), you are advised to do as follows: + +```python +import logging + +log = logging.getLogger(__name__) +log.warning("Issue warning") +log.info("Send information") +``` + +```{note} +The name of a logger corresponds to a key in the `loggers` section in `logging.yml` (e.g. `kedro`). See [Python's logging documentation](https://docs.python.org/3/library/logging.html#logger-objects) for more information. +``` + +You can take advantage of rich's [console markup](https://rich.readthedocs.io/en/stable/markup.html) when enabled in your logging calls: +```python +log.error("[bold red blink]Important error message![/]", extra={"markup": True}) +``` \ No newline at end of file From 0fdc443fd3b43e486a7453df8ee2f5a6ac9ae2cb Mon Sep 17 00:00:00 2001 From: Antony Milne <49395058+AntonyMilneQB@users.noreply.github.com> Date: Thu, 26 May 2022 21:00:26 +0100 Subject: [PATCH 07/12] Update docs/source/logging/logging.md Co-authored-by: Merel Theisen <49397448+MerelTheisenQB@users.noreply.github.com> --- docs/source/logging/logging.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/logging/logging.md b/docs/source/logging/logging.md index 449d870316..85898a4421 100644 --- a/docs/source/logging/logging.md +++ b/docs/source/logging/logging.md @@ -31,7 +31,7 @@ We now give some common examples of how you might like to change your project's ### Disable file-based logging -You might sometimes need to disable file-based logging, e.g. if you are running Kedro on a read-only file system such as [Databricks Repos](https://docs.databricks.com/repos/index.html). The simplest way to do this is simply to delete your `conf/base/logging.yml` file. The `logs` directory can then also be safely removed. With no project-side logging configuration specified, Kedro uses the default framework-side logging configuration, which does not include any file-based handlers. +You might sometimes need to disable file-based logging, e.g. if you are running Kedro on a read-only file system such as [Databricks Repos](https://docs.databricks.com/repos/index.html). The simplest way to do this is to delete your `conf/base/logging.yml` file. The `logs` directory can then also be safely removed. With no project-side logging configuration specified, Kedro uses the default framework-side logging configuration, which does not include any file-based handlers. Alternatively, if you would like to keep other configuration in `conf/base/logging.yml` and just disable file-based logging, then you can remove the file-based handlers from the `root` logger as follows: ```diff From 3dc30bb44aa60e343dfc54d224d99d0ef41f8cea Mon Sep 17 00:00:00 2001 From: SajidAlamQB <90610031+SajidAlamQB@users.noreply.github.com> Date: Fri, 27 May 2022 17:02:32 +0100 Subject: [PATCH 08/12] lint Signed-off-by: SajidAlamQB <90610031+SajidAlamQB@users.noreply.github.com> --- docs/source/get_started/example_project.md | 2 +- docs/source/logging/logging.md | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/source/get_started/example_project.md b/docs/source/get_started/example_project.md index 8aec35608f..ba7ce2dce7 100644 --- a/docs/source/get_started/example_project.md +++ b/docs/source/get_started/example_project.md @@ -121,6 +121,6 @@ These are the node function within `src/get_started/nodes.py`: | Split data | Splits the example [Iris dataset](https://www.kaggle.com/uciml/iris) into train and test samples | `split_data` | | Make Predictions| Makes class predictions using 1-nearest neighbour classifier and train-test set | `make_predictions` | | Report accuracy | Reports the accuracy of the predictions performed by the previous node | `report_accuracy` | - + The file `src/pipeline_registry.py` creates and collates into a single pipeline, resolving node execution order from the input and output data dependencies between the nodes. diff --git a/docs/source/logging/logging.md b/docs/source/logging/logging.md index 85898a4421..5ec344e548 100644 --- a/docs/source/logging/logging.md +++ b/docs/source/logging/logging.md @@ -5,7 +5,7 @@ Kedro uses [Python's `logging` library](https://docs.python.org/3/library/loggin 2. Your project-side logging configuration. Every project generated using Kedro's CLI `kedro new` command includes a file `conf/base/logging.yml`. You can alter this configuration and provide different configurations for different run environment according to the [standard Kedro mechanism for handling configuration](../kedro_project_setup/configuration.md). ```{note} -Providing project-side logging configuration is entirely optional. You can delete the `conf/base/logging.yml` file and Kedro will run using the framework's built in configuration. +Providing project-side logging configuration is entirely optional. You can delete the `conf/base/logging.yml` file and Kedro will run using the framework's built in configuration. ``` Framework-side and project-side logging configuration are loaded through subsequent calls to [`logging.config.dictConfig`](https://docs.python.org/3/library/logging.config.html#logging.config.dictConfig). This means that, when it is provided, the project-side logging configuration typically _fully overwrites_ the framework-side logging configuration. [Incremental configuration](https://docs.python.org/3/library/logging.config.html#incremental-configuration) is also possible if the `incremental` key is explicitly set to `True` in your project-side logging configuration. @@ -25,7 +25,7 @@ In addition to the `rich` handler defined in Kedro's framework, the [project-sid The logging handlers that are actually used by default are `rich`, `info_file_handler` and `error_file_handler`. -The project-side logging configuration also ensures that [logs emitted from your project's logger](#use-logging) should be shown if they are `INFO` level or above (as opposed to the Python default of `WARNING`). +The project-side logging configuration also ensures that [logs emitted from your project's logger](#use-logging) should be shown if they are `INFO` level or above (as opposed to the Python default of `WARNING`). We now give some common examples of how you might like to change your project's logging configuration. @@ -66,7 +66,7 @@ log.info("Send information") The name of a logger corresponds to a key in the `loggers` section in `logging.yml` (e.g. `kedro`). See [Python's logging documentation](https://docs.python.org/3/library/logging.html#logger-objects) for more information. ``` -You can take advantage of rich's [console markup](https://rich.readthedocs.io/en/stable/markup.html) when enabled in your logging calls: +You can take advantage of rich's [console markup](https://rich.readthedocs.io/en/stable/markup.html) when enabled in your logging calls: ```python log.error("[bold red blink]Important error message![/]", extra={"markup": True}) -``` \ No newline at end of file +``` From b87fbbf0e7e1a3604f38cf4e84266b9409077242 Mon Sep 17 00:00:00 2001 From: SajidAlamQB <90610031+SajidAlamQB@users.noreply.github.com> Date: Fri, 27 May 2022 17:13:56 +0100 Subject: [PATCH 09/12] lint Signed-off-by: SajidAlamQB <90610031+SajidAlamQB@users.noreply.github.com> --- docs/source/tutorial/visualise_pipeline.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/tutorial/visualise_pipeline.md b/docs/source/tutorial/visualise_pipeline.md index ee12a2b0ac..f57ed20d89 100644 --- a/docs/source/tutorial/visualise_pipeline.md +++ b/docs/source/tutorial/visualise_pipeline.md @@ -113,7 +113,7 @@ You need to update `requirements.txt` in your Kedro project and add the followin You can view Plotly charts in Kedro-Viz when you use Kedro's plotly datasets. -There are two types of Plotly datasets in Kedro, the `plotly.PlotlyDataSet` and `plotly.JSONDataSet`. +There are two types of Plotly datasets in Kedro, the `plotly.PlotlyDataSet` and `plotly.JSONDataSet`. ### [`plotly.PlotlyDataSet`](https://kedro.readthedocs.io/en/stable/kedro.extras.datasets.plotly.PlotlyDataSet.html#kedro.extras.datasets.plotly.PlotlyDataSet) To use this dataset you need to configure your plot in the `catalog.yml`. This dataset only supports [Plotly Express](https://plotly.com/python/plotly-express). From 9fc589d1037537c93972788ddc15d37ddc8ba5e8 Mon Sep 17 00:00:00 2001 From: SajidAlamQB <90610031+SajidAlamQB@users.noreply.github.com> Date: Mon, 30 May 2022 12:20:17 +0100 Subject: [PATCH 10/12] replace #use-logging Signed-off-by: SajidAlamQB <90610031+SajidAlamQB@users.noreply.github.com> --- docs/source/logging/logging.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/logging/logging.md b/docs/source/logging/logging.md index 5ec344e548..708a416a84 100644 --- a/docs/source/logging/logging.md +++ b/docs/source/logging/logging.md @@ -25,7 +25,7 @@ In addition to the `rich` handler defined in Kedro's framework, the [project-sid The logging handlers that are actually used by default are `rich`, `info_file_handler` and `error_file_handler`. -The project-side logging configuration also ensures that [logs emitted from your project's logger](#use-logging) should be shown if they are `INFO` level or above (as opposed to the Python default of `WARNING`). +The project-side logging configuration also ensures that [logs emitted from your project's logger](#Perform logging in your project) should be shown if they are `INFO` level or above (as opposed to the Python default of `WARNING`). We now give some common examples of how you might like to change your project's logging configuration. From a630f020b75bfc5d493b882ee24d346bc9830d9b Mon Sep 17 00:00:00 2001 From: SajidAlamQB <90610031+SajidAlamQB@users.noreply.github.com> Date: Mon, 30 May 2022 16:19:44 +0100 Subject: [PATCH 11/12] Update logging.md Signed-off-by: SajidAlamQB <90610031+SajidAlamQB@users.noreply.github.com> --- docs/source/logging/logging.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/logging/logging.md b/docs/source/logging/logging.md index 708a416a84..f741758164 100644 --- a/docs/source/logging/logging.md +++ b/docs/source/logging/logging.md @@ -25,7 +25,7 @@ In addition to the `rich` handler defined in Kedro's framework, the [project-sid The logging handlers that are actually used by default are `rich`, `info_file_handler` and `error_file_handler`. -The project-side logging configuration also ensures that [logs emitted from your project's logger](#Perform logging in your project) should be shown if they are `INFO` level or above (as opposed to the Python default of `WARNING`). +The project-side logging configuration also ensures that [logs emitted from your project's logger](#Perform-logging-in-your-project) should be shown if they are `INFO` level or above (as opposed to the Python default of `WARNING`). We now give some common examples of how you might like to change your project's logging configuration. From 4090a35671a62abff8fc8235b0ced991e9ec676e Mon Sep 17 00:00:00 2001 From: SajidAlamQB <90610031+SajidAlamQB@users.noreply.github.com> Date: Mon, 30 May 2022 17:29:24 +0100 Subject: [PATCH 12/12] Update logging.md Signed-off-by: SajidAlamQB <90610031+SajidAlamQB@users.noreply.github.com> --- docs/source/logging/logging.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/logging/logging.md b/docs/source/logging/logging.md index f741758164..a9516b237f 100644 --- a/docs/source/logging/logging.md +++ b/docs/source/logging/logging.md @@ -25,7 +25,7 @@ In addition to the `rich` handler defined in Kedro's framework, the [project-sid The logging handlers that are actually used by default are `rich`, `info_file_handler` and `error_file_handler`. -The project-side logging configuration also ensures that [logs emitted from your project's logger](#Perform-logging-in-your-project) should be shown if they are `INFO` level or above (as opposed to the Python default of `WARNING`). +The project-side logging configuration also ensures that [logs emitted from your project's logger](#perform-logging-in-your-project) should be shown if they are `INFO` level or above (as opposed to the Python default of `WARNING`). We now give some common examples of how you might like to change your project's logging configuration.