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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore deprecated legacy color codes in console with config #7767

Closed
wants to merge 1 commit into from
Closed

Restore deprecated legacy color codes in console with config #7767

wants to merge 1 commit into from

Conversation

jamespglines
Copy link

@jamespglines jamespglines commented Apr 25, 2022

I know the reason for remove this. It cause issue and confuse for some messages in console and legacy color is deprecated and legacy. Many plugin use this. It is hard to remove at random time with no warning (ik color are deprecated. there is no direct warning about log).

In kyori I hear about "ansi component serializer". I think maybe this should wait until ansi serializer exists.. By restore with config this provide the better deprecation period and notice. small brown out.

I default to true. I do this because if it is not, many plugin will auto set to true. This is not good idea. I put deprecated in the config name to be clear for users who read.

Thank you for consideration. This is my first PR. I hope I read the contrib guidelines correctly 馃槄

This provide temp fix for #7590, #7560, #7662. To kangaro: this is not made because of you. do not put me on memecademy. let ur ego suffer.

@jamespglines jamespglines requested a review from a team as a code owner April 25, 2022 19:14
@zml2008
Copy link
Contributor

zml2008 commented Apr 25, 2022

There's already a way to log colored text to console -- with the ConsoleCommandSender.

An ANSI serializer is purely an implementation detail -- the real solution for full-featured Component logging is via a Component-supporting SLF4J wrapper, see KyoriPowered/adventure#731. This is a relatively simple feature to implement, so I see no reason to implement workarounds rather than the correct solution

@jpenilla jpenilla closed this Apr 25, 2022
@jamespglines
Copy link
Author

Yes. you can do this. but change is made so quickly and there is NOT good alternative of logging component to console yet. this is what i mean by ansi serializer. sorry for bad sentences.

This even break paper dev own plugin EssentialsX!

@jamespglines
Copy link
Author

Why is this closed? If this workaround is not to be considered please say. this is ok. I want to know if my code is bad or if workaround never will exist.

@jpenilla
Copy link
Member

This workaround will not be considered, however if it was to be considered, then the issue would be with the poor implementation.

@electronicboy
Copy link
Member

This workaround mangles much more than it looks like it should need to and just looks to create its own set of issues in the process

I'm somewhat iffy around adding extra legacy handling for something we've advised against for years, I'm not hard against this, but, most instances of colour on the console are either generally abuse of the logger which can create issues, or stuff like chat, in which people should generally be using the console sender as vanilla does rather than using the logger

@jamespglines
Copy link
Author

This is understood. Thank you for your time.

@jamespglines jamespglines deleted the restore-legacy-colors-with-logger branch April 25, 2022 19:26
@zml2008
Copy link
Contributor

zml2008 commented Apr 26, 2022

Here's a more long-term solution to this issue: KyoriPowered/adventure#757

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

4 participants