Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Consider kedro run -v verbose mode #3591

Closed
1 task
noklam opened this issue Feb 3, 2024 · 3 comments
Closed
1 task

Consider kedro run -v verbose mode #3591

noklam opened this issue Feb 3, 2024 · 3 comments
Assignees
Labels
Issue: Feature Request New feature or improvement to existing feature

Comments

@noklam
Copy link
Contributor

noklam commented Feb 3, 2024

Description

The current logging configuration is too granular. We should use root logger only. The exception would be info_logger or error_logger because they are mean to capture that specific log level.

The most common case is that I want to see all the logs during debugging. In production case (packaged project), how do I even change it to see the log if I want to? Editing the configuration file doesn't seem to be a good idea.

Inspired by pytest -v pytest -vv
Proposal:

  1. kedro run -v verbose mode - The Project logging level will be set to DEBUG because this should be the most common case, I want to see the log message that I wrote in the project
  2. kedro run -vv more verbose mode - Everything should be shown now, including any plugin logging or kedro logs

Context

It's hard to get logging right, in most case I either expect seeing just the default level or I want to see everything during debugging. a -v flag comes in handy and is a common convention among many CLI tools. i.e. pytest.

Possible Implementation

Add new argument in the CLI, and override the level of logging in LOGGING.

Possible Alternatives

Edited 2024-03-07
I have splited this ticket to two tickets

@noklam noklam added the Issue: Feature Request New feature or improvement to existing feature label Feb 3, 2024
@noklam noklam self-assigned this Feb 3, 2024
@noklam
Copy link
Contributor Author

noklam commented Feb 22, 2024

Putting a note here to remind myself to do a demo when we groom this.

@astrojuanlu
Copy link
Member

I've said it in #3446 (comment), but for the record, +1 to this. From https://12factor.net/logs:

A twelve-factor app never concerns itself with routing or storage of its output stream. It should not attempt to write to or manage logfiles. Instead, each running process writes its event stream, unbuffered, to stdout.

@noklam noklam added this to the Something about logging milestone Feb 26, 2024
@noklam noklam changed the title Consider changing the default setting of logging.yml Consider changing the default setting of logging.yml and have kedro run -v verbose mode Feb 26, 2024
@noklam noklam added the Stage: Technical Design 🎨 Ticket needs to undergo technical design before implementation label Feb 26, 2024
@noklam noklam mentioned this issue Feb 27, 2024
7 tasks
@astrojuanlu
Copy link
Member

Another point in favour of having kedro -vv: sometimes you just want to know what kedro is doing without having to configure the whole stdlib logging. This is how most other tools work.

Here is an example of a user that's puzzled because kedro just hangs https://linen-slack.kedro.org/t/16630828/i-m-encountering-issues-when-running-the-load-ext-kedro-ipyt#3758284a-34fb-435c-b054-dd3713cd78c9

@noklam noklam changed the title Consider changing the default setting of logging.yml and have kedro run -v verbose mode Consider kedro run -v verbose mode Mar 7, 2024
@noklam noklam removed the Stage: Technical Design 🎨 Ticket needs to undergo technical design before implementation label Apr 4, 2024
@kedro-org kedro-org locked and limited conversation to collaborators Apr 4, 2024
@noklam noklam converted this issue into discussion #3781 Apr 4, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Issue: Feature Request New feature or improvement to existing feature
Projects
Archived in project
Development

No branches or pull requests

2 participants