You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Tim Mullé <tm...@gmail.com> on 2021/08/27 20:03:45 UTC

Does Netbeans have this IntelliJ Log feature?

Hi,

I use a feature in IntelliJ at work when running applications from the IDE that allows me to view one or more log files
In separate tabs when the program starts up.

I was wondering if Netbeans has this kind of support or is there a plugin already to support this kind of action?

If not, I was thinking of taking a shot at writing one since I do like using Netbeans and it would be a fun and useful way to expand the IDE.

I’m guessing it would be an extension of the Java project or editor to add a new configuration option in the project settings dialog?
I saw something in the New Project wizard tutorial on how to add customizers for Projects so I think that might be where it should go..still learning.


I know I can always tail the logs in the terminal, but that’s no fun :)

I’d like a new tab to open up and stream the log file(s) just like IDEA does.

You can configure it in the configuration settings in IntelliJ on a per project basis:

Here is the description how to use it: https://www.jetbrains.com/help/idea/2021.2/setting-log-options.html



Thanks,
- Tim


Re: Does Netbeans have this IntelliJ Log feature?

Posted by Geertjan Wielenga <ge...@googlemail.com.INVALID>.
For 1, yes, I believe so, but possibly it is for Ant based Java projects
only, for 3, try OutputListener.

Gj

On Sat, 28 Aug 2021 at 15:52, Tim Mullé <tm...@gmail.com> wrote:

> Thanks for the info!
>
> Yes, I will be working on that now, seems like a fun project for myself
> and others.
>
> Couple of questions:
>
> I’m following this:
> https://netbeans.apache.org/tutorials/nbm-projectextension.html
>
> 1. If I want to add a customizer to the Java Maven and Ant projects which
> project types would I put in my customizer?
> I’m assuming "org-netbeans-modules-java-j2seproject” would cover ALL Java
> project type? Ant and Maven?
>
> 2. Once I make my UI for the log settings in my customizer, where should I
> save the configuration values so that when
> I use the Run/Debug option in Netbeans I can read the values and open the
> tabs to contain the logging?
>
> 3. How do I hook into the Run/Debug action so that I can read my logging
> settings and then open one or more output
> Tabs? Sort of like when the Output window appears to show the program
> output
>
>
>
>
>
>
> On Aug 27, 2021, at 4:45 PM, Laszlo Kishalmi <la...@gmail.com>
> wrote:
>
> Well, we had a plugin for something like that ages ago, that might went
> even deeper than that for log4j as far as I remember.
>
> Writing one would be an interesting task for a beginner. Go for it!
>
> It would be good to add a new module to the ide cluster.
>
> I'd do that in the following order:
>
>    1. Create a TopComponent for the log files
>    2. Use hard coded files to test your workflows
>    3. Create a Project Customizer, and register that for an existing
>    project type.
>    4. Test
>    5. Register your project customizer to other project types
>    6. Test
>    7. Contribute a PR
>
>
> On 8/27/21 1:03 PM, Tim Mullé wrote:
>
> Hi,
>
> I use a feature in IntelliJ at work when running applications from the IDE
> that allows me to view one or more log files
> In separate tabs when the program starts up.
>
> I was wondering if Netbeans has this kind of support or is there a plugin
> already to support this kind of action?
>
> If not, I was thinking of taking a shot at writing one since I do like
> using Netbeans and it would be a fun and useful way to expand the IDE.
>
> I’m guessing it would be an extension of the Java project or editor to add
> a new configuration option in the project settings dialog?
> I saw something in the New Project wizard tutorial on how to add
> customizers for Projects so I think that might be where it should go..still
> learning.
>
>
> I know I can always tail the logs in the terminal, but that’s no fun :)
>
> I’d like a new tab to open up and stream the log file(s) just like IDEA
> does.
>
> You can configure it in the configuration settings in IntelliJ on a per
> project basis:
>
> Here is the description how to use it:
> https://www.jetbrains.com/help/idea/2021.2/setting-log-options.html
>
> <Screen Shot 2021-08-27 at 3.52.27 PM.png>
>
> Thanks,
> - Tim
>
>
>

Re: Does Netbeans have this IntelliJ Log feature?

Posted by Tim Mullé <tm...@gmail.com>.
Thanks for the info!

Yes, I will be working on that now, seems like a fun project for myself and others.

Couple of questions:

I’m following this: https://netbeans.apache.org/tutorials/nbm-projectextension.html

1. If I want to add a customizer to the Java Maven and Ant projects which project types would I put in my customizer?
I’m assuming "org-netbeans-modules-java-j2seproject” would cover ALL Java project type? Ant and Maven?

2. Once I make my UI for the log settings in my customizer, where should I save the configuration values so that when
I use the Run/Debug option in Netbeans I can read the values and open the tabs to contain the logging?

3. How do I hook into the Run/Debug action so that I can read my logging settings and then open one or more output
Tabs? Sort of like when the Output window appears to show the program output






> On Aug 27, 2021, at 4:45 PM, Laszlo Kishalmi <la...@gmail.com> wrote:
> 
> Well, we had a plugin for something like that ages ago, that might went even deeper than that for log4j as far as I remember.
> 
> Writing one would be an interesting task for a beginner. Go for it!
> 
> It would be good to add a new module to the ide cluster.
> 
> I'd do that in the following order:
> 
> Create a TopComponent for the log files
> Use hard coded files to test your workflows
> Create a Project Customizer, and register that for an existing project type.
> Test
> Register your project customizer to other project types
> Test
> Contribute a PR
> 
> 
> On 8/27/21 1:03 PM, Tim Mullé wrote:
>> Hi,
>> 
>> I use a feature in IntelliJ at work when running applications from the IDE that allows me to view one or more log files
>> In separate tabs when the program starts up.
>> 
>> I was wondering if Netbeans has this kind of support or is there a plugin already to support this kind of action?
>> 
>> If not, I was thinking of taking a shot at writing one since I do like using Netbeans and it would be a fun and useful way to expand the IDE.
>> 
>> I’m guessing it would be an extension of the Java project or editor to add a new configuration option in the project settings dialog?
>> I saw something in the New Project wizard tutorial on how to add customizers for Projects so I think that might be where it should go..still learning.
>> 
>> 
>> I know I can always tail the logs in the terminal, but that’s no fun :)
>> 
>> I’d like a new tab to open up and stream the log file(s) just like IDEA does.
>> 
>> You can configure it in the configuration settings in IntelliJ on a per project basis:
>> 
>> Here is the description how to use it: https://www.jetbrains.com/help/idea/2021.2/setting-log-options.html <https://www.jetbrains.com/help/idea/2021.2/setting-log-options.html>
>> 
>> <Screen Shot 2021-08-27 at 3.52.27 PM.png>
>> 
>> Thanks,
>> - Tim
>> 


Re: Does Netbeans have this IntelliJ Log feature?

Posted by Laszlo Kishalmi <la...@gmail.com>.
Well, we had a plugin for something like that ages ago, that might went 
even deeper than that for log4j as far as I remember.

Writing one would be an interesting task for a beginner. Go for it!

It would be good to add a new module to the ide cluster.

I'd do that in the following order:

 1. Create a TopComponent for the log files
 2. Use hard coded files to test your workflows
 3. Create a Project Customizer, and register that for an existing
    project type.
 4. Test
 5. Register your project customizer to other project types
 6. Test
 7. Contribute a PR


On 8/27/21 1:03 PM, Tim Mullé wrote:
> Hi,
>
> I use a feature in IntelliJ at work when running applications from the 
> IDE that allows me to view one or more log files
> In separate tabs when the program starts up.
>
> I was wondering if Netbeans has this kind of support or is there a 
> plugin already to support this kind of action?
>
> If not, I was thinking of taking a shot at writing one since I do like 
> using Netbeans and it would be a fun and useful way to expand the IDE.
>
> I’m guessing it would be an extension of the Java project or editor to 
> add a new configuration option in the project settings dialog?
> I saw something in the New Project wizard tutorial on how to add 
> customizers for Projects so I think that might be where it should 
> go..still learning.
>
>
> I know I can always tail the logs in the terminal, but that’s no fun :)
>
> I’d like a new tab to open up and stream the log file(s) just like 
> IDEA does.
>
> You can configure it in the configuration settings in IntelliJ on a 
> per project basis:
>
> Here is the description how to use it: 
> https://www.jetbrains.com/help/idea/2021.2/setting-log-options.html 
> <https://www.jetbrains.com/help/idea/2021.2/setting-log-options.html>
>
>
> Thanks,
> - Tim
>

Re: Does Netbeans have this IntelliJ Log feature?

Posted by "Eric J. Schwarzenbach" <er...@wrycan.com>.
FWIW: I run Tomcat from NetBeans (I guess the Tomcat integration is a 
plugin? Part of "Java Web and EE"?). When I start the Tomcat Server from 
within NetBeans, it opens several tabs within the Output window for 
logging. I mention this in case this is functionality that can be 
leveraged or adapted, or which a new log viewing feature should 
harmonize with.

Cheers,

Eric

On 8/27/21 4:03 PM, Tim Mullé wrote:
> Hi,
>
> I use a feature in IntelliJ at work when running applications from the 
> IDE that allows me to view one or more log files
> In separate tabs when the program starts up.
>
> I was wondering if Netbeans has this kind of support or is there a 
> plugin already to support this kind of action?
>
> If not, I was thinking of taking a shot at writing one since I do like 
> using Netbeans and it would be a fun and useful way to expand the IDE.
>
> I’m guessing it would be an extension of the Java project or editor to 
> add a new configuration option in the project settings dialog?
> I saw something in the New Project wizard tutorial on how to add 
> customizers for Projects so I think that might be where it should 
> go..still learning.
>
>
> I know I can always tail the logs in the terminal, but that’s no fun :)
>
> I’d like a new tab to open up and stream the log file(s) just like 
> IDEA does.
>
> You can configure it in the configuration settings in IntelliJ on a 
> per project basis:
>
> Here is the description how to use it: 
> https://www.jetbrains.com/help/idea/2021.2/setting-log-options.html
>
>
> Thanks,
> - Tim
>