Re: @Log annotation

2018-07-19 Thread Matt Sicker
>>>>>>>>>> Definitely fair points, I think I would try to go as simple as > >>>>> possible > >>>>>>>>>>> in a first pass…right? > >>>>>>>>>>> > >>>>>>>>>>> @Log > >

Re: @Log annotation

2018-07-19 Thread Rob Tompkins
points, I think I would try to go as simple as >>>>> possible >>>>>>>>>>> in a first pass…right? >>>>>>>>>>> >>>>>>>>>>> @Log >>>>>>>>>>> @Log(level=X) >>>>>>>>>>> &g

Re: @Log annotation

2018-07-19 Thread Ralph Goers
annotation. >>>> The >>>>>>>>> name @Log is as broad as you can think of making the name. So if we >>>>>>> want to >>>>>>>>> put more in there later, then we need to make sure that's the best >>>

Re: @Log annotation

2018-07-19 Thread Rob Tompkins
>>> Do you think >>>>>>>> >>>>>>>> @Log() >>>>>>>> >>>>>>>> could be the default for (for example) >>>>>>>> >>>>>>>> @Log(level=Level.TRACE, entry=true, entryParameters=ALL, exit=true, >>>>>>>> exitValue=true) >>>>>>>> >>>>>>>> Where entryParameters (if on a method) would let me list which params >>>>>> for >>>>>>>> that methods to log) >>>>>>>> >>>>>>>> How do I avoid logging a password argument for example? Sounds like >>> we >>>>>> can >>>>>>>> do away with entryParameters if we have a @LogHide to annotate a >>>>>>>> parameter. >>>>>>>> >>>>>>>> I could see that as step one but we need to think about all that we >>>>>> would >>>>>>>> want to do to make sure @Log is the right name. What's a name that >>> says >>>>>> log >>>>>>>> all entries and exits? @LogEntryExit? >>>>>>>> >>>>>>>> Overall I would think that this kind of annotated class would change >>>>>> that >>>>>>>> class' byte codes after compilation so that there are no runtime >>>>>>>> requirements even for annotations. I certainly would not want to >>> leave >>>>>>>> behind clues like @LogHide to would be attackers >>>>>>>> >>>>>>>> Thoughts? >>>>>> >>>>>> I think that @Log is the wrong name because it’s quite vague. Maybe >>>>>> @LogMethodCalls, or as you suggest @LogEntryExit. >>>>>> >>>>>> I like the signature you suggested @Gary. >>>>>> >>>>>> @Matt - As for mechanics, I would think we would want to do compile >>> time >>>>>> byte code weaving. (Is there any appetite for using aspectJ? Feels >>> like a >>>>>> large ask to add a dependency to log4j2 though.) >>>>>> >>>>> >>>>> I've not lloked at AspectJ for a long time, not sure it requires a >>> runtime; >>>>> I think we want a compile time only dep, Apache Commson Weaver or Apache >>>>> Commons BCEL come to mind. >>>>> >>>>> Gary >>>>> >>>>> >>>>>> >>>>>>>> >>>>>>>> Gary >>>>>>>> >>>>>>>> >>>>>>>>> -Rob >>>>>>>>> >>>>>>>>>> >>>>>>>>>> Gary >>>>>>>>>> >>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> Gary >>>>>>>>>>>> >>>>>>>>>>>> On Thu, Jul 19, 2018, 07:15 Rob Tompkins >> <mailto:chtom...@gmail.com>> >>>>>> wrote: >>>>>>>>>>>> >>>>>>>>>>>>> Hey folks, >>>>>>>>>>>>> >>>>>>>>>>>>> I’m curious if anyone has thought about adding a class level >>> @Log >>>>>>>>>>>>> annotation such that upon debug or trace configuration, method >>>>>> entry >>>>>>>>> and >>>>>>>>>>>>> exit gets automatically logged? >>>>>>>>>>>>> >>>>>>>>>>>>> -Rob >>>> >>> >>> > >

Re: @Log annotation

2018-07-19 Thread Ralph Goers
k >>>>>>> >>>>>>> @Log() >>>>>>> >>>>>>> could be the default for (for example) >>>>>>> >>>>>>> @Log(level=Level.TRACE, entry=true, entryParameters=ALL, exit=true, >>>>>>> exitValue=true) >>>>&

Re: @Log annotation

2018-07-19 Thread Gary Gregory
thod) would let me list which params > >>> for > >>>>> that methods to log) > >>>>> > >>>>> How do I avoid logging a password argument for example? Sounds like > we > >>> can > >>>>> do away

Re: @Log annotation

2018-07-19 Thread Rob Tompkins
s if we have a @LogHide to annotate a >>>>> parameter. >>>>> >>>>> I could see that as step one but we need to think about all that we >>> would >>>>> want to do to make sure @Log is the right name. What's a name that says >>> log >>>>> all entries and exits? @LogEntryExit? >>>>> >>>>> Overall I would think that this kind of annotated class would change >>> that >>>>> class' byte codes after compilation so that there are no runtime >>>>> requirements even for annotations. I certainly would not want to leave >>>>> behind clues like @LogHide to would be attackers >>>>> >>>>> Thoughts? >>> >>> I think that @Log is the wrong name because it’s quite vague. Maybe >>> @LogMethodCalls, or as you suggest @LogEntryExit. >>> >>> I like the signature you suggested @Gary. >>> >>> @Matt - As for mechanics, I would think we would want to do compile time >>> byte code weaving. (Is there any appetite for using aspectJ? Feels like a >>> large ask to add a dependency to log4j2 though.) >>> >> >> I've not lloked at AspectJ for a long time, not sure it requires a runtime; >> I think we want a compile time only dep, Apache Commson Weaver or Apache >> Commons BCEL come to mind. >> >> Gary >> >> >>> >>>>> >>>>> Gary >>>>> >>>>> >>>>>> -Rob >>>>>> >>>>>>> >>>>>>> Gary >>>>>>> >>>>>>> >>>>>>>> >>>>>>>>> >>>>>>>>> Gary >>>>>>>>> >>>>>>>>> On Thu, Jul 19, 2018, 07:15 Rob Tompkins >>>>>>>> <mailto:chtom...@gmail.com>> >>> wrote: >>>>>>>>> >>>>>>>>>> Hey folks, >>>>>>>>>> >>>>>>>>>> I’m curious if anyone has thought about adding a class level @Log >>>>>>>>>> annotation such that upon debug or trace configuration, method >>> entry >>>>>> and >>>>>>>>>> exit gets automatically logged? >>>>>>>>>> >>>>>>>>>> -Rob >

Re: @Log annotation

2018-07-19 Thread Ralph Goers
>>>> all entries and exits? @LogEntryExit? >>>> >>>> Overall I would think that this kind of annotated class would change >> that >>>> class' byte codes after compilation so that there are no runtime >>>> requirements even for annotations. I certainly would not want to leave >>>> behind clues like @LogHide to would be attackers >>>> >>>> Thoughts? >> >> I think that @Log is the wrong name because it’s quite vague. Maybe >> @LogMethodCalls, or as you suggest @LogEntryExit. >> >> I like the signature you suggested @Gary. >> >> @Matt - As for mechanics, I would think we would want to do compile time >> byte code weaving. (Is there any appetite for using aspectJ? Feels like a >> large ask to add a dependency to log4j2 though.) >> > > I've not lloked at AspectJ for a long time, not sure it requires a runtime; > I think we want a compile time only dep, Apache Commson Weaver or Apache > Commons BCEL come to mind. > > Gary > > >> >>>> >>>> Gary >>>> >>>> >>>>> -Rob >>>>> >>>>>> >>>>>> Gary >>>>>> >>>>>> >>>>>>> >>>>>>>> >>>>>>>> Gary >>>>>>>> >>>>>>>> On Thu, Jul 19, 2018, 07:15 Rob Tompkins >>>>>>> <mailto:chtom...@gmail.com>> >> wrote: >>>>>>>> >>>>>>>>> Hey folks, >>>>>>>>> >>>>>>>>> I’m curious if anyone has thought about adding a class level @Log >>>>>>>>> annotation such that upon debug or trace configuration, method >> entry >>>>> and >>>>>>>>> exit gets automatically logged? >>>>>>>>> >>>>>>>>> -Rob

Re: @Log annotation

2018-07-19 Thread Gary Gregory
's a name that says > log > >> all entries and exits? @LogEntryExit? > >> > >> Overall I would think that this kind of annotated class would change > that > >> class' byte codes after compilation so that there are no runtime > >> requi

Re: @Log annotation

2018-07-19 Thread Rob Tompkins
d class would change that >> class' byte codes after compilation so that there are no runtime >> requirements even for annotations. I certainly would not want to leave >> behind clues like @LogHide to would be attackers >> >> Thoughts? I think that @Log is the wrong name because it’s quite vague. Maybe @LogMethodCalls, or as you suggest @LogEntryExit. I like the signature you suggested @Gary. @Matt - As for mechanics, I would think we would want to do compile time byte code weaving. (Is there any appetite for using aspectJ? Feels like a large ask to add a dependency to log4j2 though.) >> >> Gary >> >> >>> -Rob >>> >>>> >>>> Gary >>>> >>>> >>>>> >>>>>> >>>>>> Gary >>>>>> >>>>>> On Thu, Jul 19, 2018, 07:15 Rob Tompkins wrote: >>>>>> >>>>>>> Hey folks, >>>>>>> >>>>>>> I’m curious if anyone has thought about adding a class level @Log >>>>>>> annotation such that upon debug or trace configuration, method entry >>> and >>>>>>> exit gets automatically logged? >>>>>>> >>>>>>> -Rob >>>>> >>>>> >>> >>>

Re: @Log annotation

2018-07-19 Thread Gary Gregory
as step one but we need to think about all that we would > want to do to make sure @Log is the right name. What's a name that says log > all entries and exits? @LogEntryExit? > > Overall I would think that this kind of annotated class would change that > class' byte codes after com

Re: @Log annotation

2018-07-19 Thread Gary Gregory
ight name. What's a name that says log all entries and exits? @LogEntryExit? Overall I would think that this kind of annotated class would change that class' byte codes after compilation so that there are no runtime requirements even for annotations. I certainly would not want to le

Re: @Log annotation

2018-07-19 Thread Matt Sicker
ry() or > @LogExit(). > > - What about @Log(file="${user.home}\foo.log") > > - and on and on ;-) > > Definitely fair points, I think I would try to go as simple as possible in > a first pass…right? > > @Log > @Log(level=X) > > -Rob > > &

Re: @Log annotation

2018-07-19 Thread Rob Tompkins
y @LogEntry() or @LogExit(). > - What about @Log(file="${user.home}\foo.log") > - and on and on ;-) Definitely fair points, I think I would try to go as simple as possible in a first pass…right? @Log @Log(level=X) -Rob > > Gary > > >> >>> >>

Re: @Log annotation

2018-07-19 Thread Gary Gregory
Thu, Jul 19, 2018, 07:15 Rob Tompkins wrote: > > > >> Hey folks, > >> > >> I’m curious if anyone has thought about adding a class level @Log > >> annotation such that upon debug or trace configuration, method entry and > >> exit gets automatically logged? > >> > >> -Rob > >

Re: @Log annotation

2018-07-19 Thread Rob Tompkins
On Thu, Jul 19, 2018, 07:15 Rob Tompkins wrote: > >> Hey folks, >> >> I’m curious if anyone has thought about adding a class level @Log >> annotation such that upon debug or trace configuration, method entry and >> exit gets automatically logged? >> >> -Rob

Re: @Log annotation

2018-07-19 Thread Gary Gregory
Annotation-based logging comes up once in a while here but we have not implemented it. Project Lombok does that IIRC. Gary On Thu, Jul 19, 2018, 07:15 Rob Tompkins wrote: > Hey folks, > > I’m curious if anyone has thought about adding a class level @Log > annotation such that u

@Log annotation

2018-07-19 Thread Rob Tompkins
Hey folks, I’m curious if anyone has thought about adding a class level @Log annotation such that upon debug or trace configuration, method entry and exit gets automatically logged? -Rob