Re: Separate logging for JPMS module/layer

2018-10-08 Thread David Lloyd
On Mon, Oct 8, 2018 at 9:38 AM Luke Hutchison wrote: > On Mon, Oct 8, 2018 at 7:27 AM David Lloyd wrote: >> I think a single clear >> behavior plus a documentation note would result in a better user >> experience than falling back through multiple potentially differing >> behaviors based on run t

Re: Separate logging for JPMS module/layer

2018-10-08 Thread Alan Bateman
On 08/10/2018 15:37, Luke Hutchison wrote: : I looked for documentation on how to grant runtime permissions for a specific module via the commandline or in a policy file, but I couldn't figure out how to do this. The closest I found was "grant codeBase " -- is this the right mechanism, used with

Re: Separate logging for JPMS module/layer

2018-10-08 Thread Luke Hutchison
Thanks David for the detailed response! On Mon, Oct 8, 2018 at 7:27 AM David Lloyd wrote: > I think it's pretty reasonable to > document that user programs that wish to have context-sensitive > loggers should grant the "getStackWalkerWithClassReference" > RuntimePermission to the logging JAR/mod

Re: Separate logging for JPMS module/layer

2018-10-08 Thread David Lloyd
On Fri, Oct 5, 2018 at 3:46 PM Luke Hutchison wrote: > > In my own code, I used StackWalker::forEach rather than StalkWalker::walk, > since the stream API has such high overhead. Even lambdas have a high > startup overhead for some reason (I think it was 20ms of incurred latency > when you first u

Re: Separate logging for JPMS module/layer

2018-10-05 Thread Ralph Goers
OK. The author pushed it to a branch - https://git1-us-west.apache.org/repos/asf?p=logging-log4j2.git;a=commit;h=64bfd314 . Ralph > On Oct 5, 2018, at 1:45 PM, Luke Hutchison wrote: > > On Fri, Oct 5, 2018 at

Re: Separate logging for JPMS module/layer

2018-10-05 Thread Luke Hutchison
On Fri, Oct 5, 2018 at 1:58 PM Ralph Goers wrote: > I didn’t write this particular test. I will have to find it. > I'm curious to see the test as well, especially to see what the "defaultJava8" test is. Is that a method for getting the stack frames using Exception::getStackTrace or something? O

Re: Separate logging for JPMS module/layer

2018-10-05 Thread Ralph Goers
> On Oct 5, 2018, at 10:54 AM, David Lloyd wrote: > > On Fri, Oct 5, 2018 at 10:12 AM Ralph Goers wrote: >>> On Oct 5, 2018, at 1:10 AM, Luke Hutchison wrote: >>> >>> On Thu, Oct 4, 2018, 10:27 PM Ralph Goers >> > wrote: >>> Yes, we have found in some situations us

Re: Separate logging for JPMS module/layer

2018-10-05 Thread Ralph Goers
>>>>> trace as well. >>>>> >>>>> Ralph >>>>> >>>>>> On Oct 4, 2018, at 10:26 AM, fo...@univ-mlv.fr >>>>>> <mailto:fo...@univ-mlv.fr> wrote: >>>>>> >>>>>> I was thinki

Re: Separate logging for JPMS module/layer

2018-10-05 Thread Mandy Chung
On 10/5/18 8:11 AM, Ralph Goers wrote: Benchmark Mode Cnt Score Error Units StackTraceBenchmark.defaultJava8 thrpt 3 113965.921 ± 119706.986 ops/s StackTraceBenchmark.securityManager thrpt 3 788004.237 ± 82578.567 ops/s StackTraceBenchmark.stackWalker thrpt 3 182902.031 ± 39018.395 ops/s

Re: Separate logging for JPMS module/layer

2018-10-05 Thread Mandy Chung
t;Ralph Goers" À: "Alex Sviridov" Cc: "Remi Forax", "jigsaw-dev" Envoyé: Mercredi 3 Octobre 2018 05:08:27 Objet: Re: Separate logging for JPMS module/layer Log4j handles this by capturing the fully qualified class name of the logging adapter. Obviously, this doesn

Re: Separate logging for JPMS module/layer

2018-10-05 Thread David Lloyd
On Fri, Oct 5, 2018 at 10:12 AM Ralph Goers wrote: > > On Oct 5, 2018, at 1:10 AM, Luke Hutchison wrote: > > > > On Thu, Oct 4, 2018, 10:27 PM Ralph Goers > > wrote: > > Yes, we have found in some situations using the SecurityManager is faster > > than StackWalker. > >

Re: Separate logging for JPMS module/layer

2018-10-05 Thread Ralph Goers
> On Oct 5, 2018, at 1:10 AM, Luke Hutchison wrote: > > On Thu, Oct 4, 2018, 10:27 PM Ralph Goers > wrote: > Yes, we have found in some situations using the SecurityManager is faster > than StackWalker. > > This is interesting -- how much slower is StackWalker in t

Re: Separate logging for JPMS module/layer

2018-10-05 Thread Luke Hutchison
On Thu, Oct 4, 2018, 10:27 PM Ralph Goers wrote: > Yes, we have found in some situations using the SecurityManager is faster > than StackWalker. > This is interesting -- how much slower is StackWalker in these situations, and under what condition is there a speed difference? Have you seen Secur

Re: Separate logging for JPMS module/layer

2018-10-04 Thread Ralph Goers
t; ----- Mail original ----- >>>>> De: "Ralph Goers" >>>>> <mailto:ralph.go...@dslextreme.com> >>>>> À: "Alex Sviridov" <mailto:ooo_satu...@mail.ru> >>>>> Cc: "Remi Forax" <mailto:fo...@univ-

Re: Separate logging for JPMS module/layer

2018-10-04 Thread Ralph Goers
; > >> - Mail original - > >>> De: "Ralph Goers" >>> <mailto:ralph.go...@dslextreme.com>> > >>> À: "Alex Sviridov" mailto:ooo_satu...@mail.ru>> > >>> Cc: "Remi Forax" mailto:fo...@univ-mlv.fr>

Re: Separate logging for JPMS module/layer

2018-10-04 Thread Ralph Goers
;>>> <mailto:ralph.go...@dslextreme.com> >>>> À: "Alex Sviridov" <mailto:ooo_satu...@mail.ru> >>>> Cc: "Remi Forax" <mailto:fo...@univ-mlv.fr>, >>>> "jigsaw-dev" >>>> <mailto:jigsaw-

Re: Separate logging for JPMS module/layer

2018-10-04 Thread Mandy Chung
quot;Remi Forax" mailto:fo...@univ-mlv.fr>>, "jigsaw-dev" mailto:jigsaw-dev@openjdk.java.net>> >>> Envoyé: Mercredi 3 Octobre 2018 05:08:27 >>> Objet: Re: Separate logging for JPMS module/layer >>> Log4j handles this by capturing

Re: Separate logging for JPMS module/layer

2018-10-04 Thread Luke Hutchison
; >> > >> cheers, > >> Rémi > >> > >> - Mail original - > >>> De: "Ralph Goers" > >>> À: "Alex Sviridov" > >>> Cc: "Remi Forax" , "jigsaw-dev" < > jigsaw-dev@openjdk.ja

Re: Separate logging for JPMS module/layer

2018-10-04 Thread Mandy Chung
. cheers, Rémi - Mail original - De: "Ralph Goers" À: "Alex Sviridov" Cc: "Remi Forax" , "jigsaw-dev" Envoyé: Mercredi 3 Octobre 2018 05:08:27 Objet: Re: Separate logging for JPMS module/layer Log4j handles this by capturing the fully qua

Re: Separate logging for JPMS module/layer

2018-10-04 Thread Ralph Goers
t; , "jigsaw-dev" >> >> Envoyé: Mercredi 3 Octobre 2018 05:08:27 >> Objet: Re: Separate logging for JPMS module/layer > >> Log4j handles this by capturing the fully qualified class name of the logging >> adapter. Obviously, this doesn’t work if the adapt

Re: Separate logging for JPMS module/layer

2018-10-04 Thread forax
> Envoyé: Mercredi 3 Octobre 2018 05:08:27 > Objet: Re: Separate logging for JPMS module/layer > Log4j handles this by capturing the fully qualified class name of the logging > adapter. Obviously, this doesn’t work if the adapter doesn’t pass Log4j the > FQCN, but it does work for t

Re: Separate logging for JPMS module/layer

2018-10-03 Thread Ralph Goers
I will take a look and see what tests we have. Ralph > On Oct 3, 2018, at 10:38 AM, Alan Bateman wrote: > > On 03/10/2018 17:26, Ralph Goers wrote: >> Log4j handles this by capturing the fully qualified class name of the >> logging adapter. Obviously, this doesn’t work if the adapter doesn’t p

Re: Separate logging for JPMS module/layer

2018-10-03 Thread Alan Bateman
On 03/10/2018 17:26, Ralph Goers wrote: Log4j handles this by capturing the fully qualified class name of the logging adapter. Obviously, this doesn’t work if the adapter doesn’t pass Log4j the FQCN, but it does work for the adapters we support. That said, it is very slow to capture this and

Re: Separate logging for JPMS module/layer

2018-10-03 Thread Ralph Goers
Log4j handles this by capturing the fully qualified class name of the logging adapter. Obviously, this doesn’t work if the adapter doesn’t pass Log4j the FQCN, but it does work for the adapters we support. That said, it is very slow to capture this and is probably the biggest pain point. Log4j

Re: Separate logging for JPMS module/layer

2018-10-02 Thread Remi Forax
You can use the StackWalker https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/StackWalker.html regards, Rémi - Mail original - > De: "Alex Sviridov" > À: "jigsaw-dev" > Envoyé: Mardi 2 Octobre 2018 23:54:48 > Objet: Separate logging for JPMS module/layer > Hi all,