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

color solarization not reset #88

Open
EdLipson5117 opened this issue Jun 17, 2021 · 3 comments
Open

color solarization not reset #88

EdLipson5117 opened this issue Jun 17, 2021 · 3 comments

Comments

@EdLipson5117
Copy link

I'm using logging in my programs. When testing in vscode's powershell terminal, the solarization is not reset between ic() output and logging output.

Playing around after searching for answers, I found that if I added a print of the reset escape sequence to stderr in colorizedStderrPrint, the solarization was reset. It makes it a lot easier to spot the debugging output among the logging output this way.

def colorizedStderrPrint(s):
colored = colorize(s)
with supportTerminalColorsInWindows():
stderrPrint(colored)
print("\033[0m", file=sys.stderr)

I'm new to git and issues, so I'm not sure what is the proper way to suggest a 'fix' or if it needs a fix at all.

@alexmojaki
Copy link
Collaborator

I think you're running into #35

@EdLipson5117
Copy link
Author

I thought so too, but that one is closed so I assumed it is different.
I fixed it for my purposes.
I was looking at how to solve so as to not impact others, leaving icecream as 'working as distributed'

  • added a configuration option
  • move the reset into IceCreamDebugger.call, after the outputFunction call, checking the config setting

The output is effective after the deinit in the supportTerminalColorsInWindows function, but I did not see a neat way to put it there.

@alexmojaki
Copy link
Collaborator

That issue isn't closed...

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

No branches or pull requests

2 participants