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

Eclipse 2022-06 #82

Open
jesusaplsoft opened this issue Jun 28, 2022 · 9 comments
Open

Eclipse 2022-06 #82

jesusaplsoft opened this issue Jun 28, 2022 · 9 comments
Assignees
Labels

Comments

@jesusaplsoft
Copy link

I have installed new eclipse 2022-06 ond my Mac and Ansi console plugin does not work any more.
It worked before using eclipse 2022-03.

@mihnita
Copy link
Owner

mihnita commented Jun 29, 2022

Sorry, but can you share any other details that can help me reproduce it?

How does it manifest?
Shows the escape sequences? Crashes?
What kind of project?
C/C++ build console or run console?
Maven build time or Java runtime output?
Something else?

I have it installed and working on 2022-06 (official release) on Mac, Windows 11 and Linux (Debian and Ubuntu).
And I've tried it on 2022-06 on M3 and RC1 before the final was released, to make sure I don't have any surprises.

Thank you,
Mihai

@mihnita mihnita added the to reproduce Need to reproduce. label Jun 29, 2022
@mihnita mihnita self-assigned this Jun 29, 2022
@mihnita
Copy link
Owner

mihnita commented Jun 30, 2022

I think I know what you mean.
It is about building C/C++ apps using Makefile (to the C++ build console)?
The color are there at the first build, but not the the following ones.
If you right-click the console and "Clear" it is colored again in the next run (but only once)

@mihnita mihnita added bug P1 Priority 1. Does not crash, but core functionality does not work. and removed to reproduce Need to reproduce. labels Jun 30, 2022
@mihnita
Copy link
Owner

mihnita commented Jun 30, 2022

Might be the same as #79 ?

@jesusaplsoft
Copy link
Author

jesusaplsoft commented Jul 6, 2022

This is a Java project.

The problem arises as I run junit test.
Console shows escape sequences but not colors.
As I said, Ansi console does not appear at Preferences.
Next, I include xml log4j piece of code used to show colors:

<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout disableAnsi="false" pattern="%highlight{%d{HH:mm:ss.SSS} [%thread] %-5level %c{1.} - %msg%n}{FATAL=red blink, ERROR=red, WARN=yellow bold, INFO=green bold, DEBUG=white2, TRACE=cyan}" />
</Console>
</Appenders>

As I said before, this plugin works perfectly on Eclipse 2022-03

@mihnita
Copy link
Owner

mihnita commented Jul 7, 2022

I believe you that it does not work.
But it works for me.
And until I can reproduce it, there is no way for me to fix it.
So, please help me reproduce it?

===

Ansi console does not appear at Preferences

To me that sounds like the plugin is not even installed?

If you go to "About Eclipse", "Installation Details", is "Ansi Console" listed in the first tab ("Installed software")?
What version is the plugin?

Or, is there a difference in your Eclipse installs that you can think of?
Maybe one is Java, the other one is C++? Or something similar?
Anything that can help me?

===

I've created a small maven project that logs using log4j and with your exact configuration
(see junit_log_err\src\main\resources\log4j2.xml)

And works for me (in 2022-06), on Mac, Windows, and Linux.

You can find that project here: https://mihai-nita.net/tmp/junit_log_err.zip

Can you please import it and try it?
(File --> Import... --> Existing Maven projects)

===

If you create a small project (Java, or C/C++) and try to print "Hello \033[91mRED\033[m World!", does "RED" show in color?

@anshITQA
Copy link

anshITQA commented Oct 8, 2022

Hey Mihnita,
I am using 2022-03 and can not get it to work in console for my other programs too.
I tried using a sample program with java and tried printing "Hello \033[91mRED\033[m World!", The "RED" does show in bold red color however so am not sure why it does not work with other programs... :(
Here is my build info:
Version: 2022-03 (4.23.0)
Build id: 20220310-1457
The plugin is installed and enabled with std error setting checkbox as enabled too.
Am on a windows 11 device.

@jesusaplsoft
Copy link
Author

jesusaplsoft commented Oct 11, 2022 via email

@mihnita
Copy link
Owner

mihnita commented Oct 12, 2022

Sorry, I can't reproduce it.

I've tried it in 2022-03, 2022-06, and 2022-09 (no plugin, with the ANSI functionality that is not in Eclipse).
And I did it on Win, Mac, Linux
Plugin version 1.4.8.202208270854


This is very weird:

As I said, Ansi console does not appear at Preferences.
and:
The "RED" does show in bold red

I can't think of any way that these can't be both happen.
If it is not in preferences, then it is not installed.
But if the test app shows red, then it is installed.

Can you uninstall it and install it again?
I know it sounds dumb, but I don't have any other idea.


Here is a minimal project I've created: https://github.com/mihnita/github_features

You should be able to

git clone https://github.com/mihnita/github_features.git

Then File -- Import... -- Maven -- Existing Maven Projects, select it, "Finish", and I get color logging no matter how I run it:

  • Right click -- Run As -- Maven install
  • Right click -- Run As -- JUnit Test

It is the exact appender you provided, I only had to change white2 to white


Trying to clarify something (not that it makes much of a difference, since I tried both 2022-03 and 2022-06)
But what is it? Works in 2022-03 or not?

I have installed new eclipse 2022-06 ond my Mac and Ansi console plugin does not work any more.
It worked before using eclipse 2022-03.

and

As I said before, this plugin works perfectly on Eclipse 2022-03

but then

I am using 2022-03 and can not get it to work in console for my other programs too.
...
Here is my build info:
Version: 2022-03 (4.23.0)
Build id: 20220310-1457


Do you see the enable/disable icon in the corner of the console?
Can you click it a few times and try running in both states?


Here is my output (Windows, Eclipse Version: 2022-03 (4.23.0), Build id: 20220310-1457, but works the same on MacOS)

image

@mihnita
Copy link
Owner

mihnita commented Oct 12, 2022

Another idea for something to try:
can log some text with escapes?
For example

logger.info("Hello \033[91mRED \033[92mGREEN \033[94mBLUE\033[m output");

This is what I get with disableAnsi="false":

image

And this is what I get with disableAnsi="true":

image

As you can see, that explicit output still works.

If that is what you see, then it is something with the logging, not with the plugin.

@mihnita mihnita added to reproduce Need to reproduce. need more info and removed P1 Priority 1. Does not crash, but core functionality does not work. labels Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

3 participants