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

feat: clean up proxy logging with n/N in each lookup #1839

Merged
merged 4 commits into from Jan 31, 2021
Merged

Conversation

Fmstrat
Copy link
Contributor

@Fmstrat Fmstrat commented Jan 30, 2021

Description

This is intended to clean up the output so that there aren't a bunch of extraneous lines when using proxies.

Moves the info proxy calls to debug. I.E:

[10:32:52 PM] info :: ℹ [microcenter] Next proxy index: 2 / Count: 3

to:

[10:32:52 PM] debug :: ℹ [microcenter] Next proxy index: 2 / Count: 3

And then when proxies are being used, adds a proxy count before the store name.

Not using proxies:

[10:34:34 PM] info :: ✖ [microcenter] [evga (3080)] xc3 ultra :: OUT OF STOCK
[10:34:38 PM] warn :: ✖ [evga] [evga (3060ti)] xc gaming :: STATUS CODE ERROR 403

Using proxies:

[10:34:34 PM] info :: ✖ [1/3] [microcenter] [evga (3080)] xc3 ultra :: OUT OF STOCK
[10:34:38 PM] warn :: ✖ [1/3] [evga] [evga (3060ti)] xc gaming :: STATUS CODE ERROR 403

Testing

Use a proxy in configurations or in files like global.proxies,

@Fmstrat Fmstrat requested a review from jef as a code owner January 30, 2021 03:48
@Fmstrat
Copy link
Contributor Author

Fmstrat commented Jan 30, 2021

I also noticed that the system was starting on proxy index 1 instead of 0 (which was throwing off my count by 1). I reset it to start on actual index 0.

@Fmstrat
Copy link
Contributor Author

Fmstrat commented Jan 30, 2021

Wow, those were some serious lint constraints on the back-quoted strings! Missed that requirement.

Copy link
Owner

@jef jef left a comment

Choose a reason for hiding this comment

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

Ah, cool. Yeah this makes a lot more sense. Especially with the built in if statements. A little more useful for those who use proxies.

Great idea.

Thanks!

@jef jef merged commit 8df4339 into jef:main Jan 31, 2021
erwinc1 pushed a commit to erwinc1/streetmerchant that referenced this pull request Mar 31, 2021
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

Successfully merging this pull request may close these issues.

None yet

2 participants