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

vdk-core: ensure early logs are available #2846

Merged
merged 2 commits into from
Oct 30, 2023

Conversation

antoniivanov
Copy link
Collaborator

When vdk command is started logs do not really show up until click command start getting executed. All logs before that (from plugin hooks) seemed ignored.

I couldn't figure out for sure while click_log does that.

But this changes it so that early logs can be seen on console . The log level of the early logs is controlled by LOG_LEVEL_VDK option (which control the log level of VDK logs , since early logs are really vdk logs it make sense)

By default LOG_LEVEL_VDK is WARNING, so if more verbose logs are set it should be changed to INFO.

Testing Done:

export LOG_LEVEL_VDK=INFO
vdk run example

logs look like
https://gist.github.com/antoniivanov/bdd935927c1149b74944c58e96b50ee3

unset LOG_LEVEL_VDK
vdk run example

logs look like
https://gist.github.com/antoniivanov/afce585f8cd03ac4e09e9010dcdd2b9a

Tested also with vdk -v DEBUG ... to see debug logs show up correctly (with bot set and unset LOG_LEVEL_VDK)

Tested other commands vdk deploy, login, info that logs look like before (aka no unnecessary logs)

Copy link
Collaborator

@dakodakov dakodakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

When vdk command is started logs do not really show up until click
command start getting executed. All logs before that (from plugin hooks)
seemed ignored.

I couldn't figure out for sure while click_log does that.

But this changes it so that early logs can be seen on console .
The log level of the early logs is controlled by LOG_LEVEL_VDK option
(which control the log level of VDK logs , since early logs are really
vdk logs it make sense)

By default LOG_LEVEL_VDK is WARNING, so if more verbose logs are set it
should be changed to INFO.

Testing Done:
```
export LOG_LEVEL_VDK=INFO
vdk run example
```
logs look like
https://gist.github.com/antoniivanov/bdd935927c1149b74944c58e96b50ee3

```
unset LOG_LEVEL_VDK
vdk run example
```
logs look like
https://gist.github.com/antoniivanov/afce585f8cd03ac4e09e9010dcdd2b9a

Tested also with vdk -v DEBUG ... to see debug logs show up correctly
(with bot set and unset LOG_LEVEL_VDK)

Tested other commands vdk deploy, login, info that logs look like before
(aka no unnecessary logs)
@antoniivanov antoniivanov enabled auto-merge (squash) October 30, 2023 10:53
@antoniivanov antoniivanov merged commit 71138a3 into main Oct 30, 2023
7 checks passed
@antoniivanov antoniivanov deleted the person/aivanov/vdk-core-log branch October 30, 2023 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants