Log4J statements automatic creation (a plugin)?

Hi,
Is there a plugin (or would someone be willing to write one) that would,
upon selecting a variable and clicking a shortkey, generate a Log4J
statement logging that variable?

I'm thinking of something along the lines of how the JUnit plugin works now
(where you can click a var or a method and have the test cases generated for
you)...

Does anything like that exist? I need to add tracking of 100s of variables
within a code base of 50000+ lines... So if there would be something at
least semi-automatic to ease the process, it would save a LOT of time.

I'm thinking Log4J because it seems to be the logging framework everyone
uses... feel free to convince me otherwise, as long as it can output XML or
be somehow accessible for subsequent visualization.

Thank you!
Jill


1 comment

Hello Jill,

Check the intellij.org site, there are some live template contributions which deal with log4j logging. Alternatively you can write your own live templates (Look at soutv which prints a variable to a System.out).

Thanks,
--Venkat.

Hi,
Is there a plugin (or would someone be willing to write one) that
would,
upon selecting a variable and clicking a shortkey, generate a Log4J
statement logging that variable?
I'm thinking of something along the lines of how the JUnit plugin
works now (where you can click a var or a method and have the test
cases generated for you)...

Does anything like that exist? I need to add tracking of 100s of
variables within a code base of 50000+ lines... So if there would be
something at least semi-automatic to ease the process, it would save
a LOT of time.

I'm thinking Log4J because it seems to be the logging framework
everyone uses... feel free to convince me otherwise, as long as it
can output XML or be somehow accessible for subsequent visualization.

Thank you!
Jill


0

Please sign in to leave a comment.