rgs); Is the args array a
> >>>>> reference
> >>>>>>>> or a
> >>>>>>>>>> deep copy?
> >>>>>>>>>> - Another is the more complex and vendor dependent (and
> unproven)
> >>>>>> sta
d vendor dependent (and unproven)
>>>>>> stack
>>>>>>>>>> walker.
>>>>>>>>>>
>>>>>>>>>> Gary
>>>>>>>>>>
>>>>>>>>>>
>>>>
gt;>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>> On 6 August 2014 20:19, Gary Gregory
> >>>> wrote:
> >>>>>>>>>>
> >>>>>>>>>> And worse: vendor spe
>>>>>>>>>>
>>>>>>>>>> Gary
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>> On Wed, Aug 6, 2014 at 9:05 PM, Remko Popma <
>>> remko.po...@gmail.com
>>
> >>>>>>> Thanks for the pointer!
> > > >>>>>>>
> > > >>>>>>> Sent from my iPhone
> > > >>>>>>>
> > > >>>>>>>> On 2014/08/07, at 9:44, Gary Gregory
> > >
>
> > >>>>>>> Sent from my iPhone
> > >>>>>>>
> > >>>>>>>> On 2014/08/07, at 9:44, Gary Gregory
> > >>>>> wrote:
> > >>>>>>>>
> > >>>>>>>
>>
> http://docs.oracle.com/javase/7/docs/jdk/api/jpda/jdi/com/sun/jdi/StackFrame.html
> >>>>>>>>
> >>>>>>>> Gary
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>> On We
gt;
>>>>>>>> Gary
>>>>>>>>
>>>>>>>>
>>>>>>>>> On Wed, Aug 6, 2014 at 8:36 PM, Remko Popma <
>>>>> remko.po...@gmail.com>
>>>>>>> wrote:
>>>>>&
> > > >>
> >>> > > >> I don't follow... If you walk the stack trace you can find the
> >>> name of
> >>> > > the
> >>> > > >> original class whose main() method was called, but how would
> that
> >>&
gt; > > the
>>> > > >> original class whose main() method was called, but how would that
>>> give
>>> > > you
>>> > > >> access to the main method's parameter values?
>>> > > >>
>>> > > >
; give
>> > > you
>> > > >> access to the main method's parameter values?
>> > > >>
>> > > >> Sent from my iPhone
>> > > >>
>> > > >>> On 2014/08/07, at 9:26, Gary Gregory
>> wrote:
>> > > >>&g
9:26, Gary Gregory
> wrote:
> > > >>>
> > > >>> Yes you are right but the stack walker could be used even if you do
> > not
> > > >> control to source for main. Maybe a script calls a main and then my
> > app
> > > >>
egory wrote:
> > >>>
> > >>> Yes you are right but the stack walker could be used even if you do
> not
> > >> control to source for main. Maybe a script calls a main and then my
> app
> > >> plugin gets called and I want to also follow the verbos
e
> >> setting.
> >>>
> >>>
> >>> Gary
> >>>
> >>> Original message From: Ralph Goers <
> >> ralph.go...@dslextreme.com> Date:08/06/2014 19:18
> >> (GMT-05:00) To: Log4J Users List <
&g
then my app
>> plugin gets called and I want to also follow the verbose command line
>> setting.
>>>
>>>
>>> Gary
>>>
>>> Original message ----From: Ralph Goers <
>> ralph.go...@dslextreme.com> Date:08/06/2014 19:18
>> (GMT-05:0
/06/2014 19:18
> (GMT-05:00) To: Log4J Users List <
> log4j-user@logging.apache.org> Subject: Re: Set the file name
> based on command line args
> > Wouldn’t it be easier to have a Lookup that your main called and
> just passed the arguments? But yeah, it should
: Ralph Goers
> Date:08/06/2014 19:18 (GMT-05:00)
> To: Log4J Users List
> Subject: Re: Set the file name based on command line args
>
> Wouldn’t it be easier to have a Lookup that your main called and just
> passed the arguments? But yeah, it should be possible to do w
/2014 19:18 (GMT-05:00)
To: Log4J Users List
Subject: Re: Set the file name based on command line args
Wouldn’t it be easier to have a Lookup that your main called and just
passed the arguments? But yeah, it should be possible to do what you are
suggesting.
Ralph
On Aug 6, 2014, at 4:09 PM
Wouldn’t it be easier to have a Lookup that your main called and just passed
the arguments? But yeah, it should be possible to do what you are suggesting.
Ralph
On Aug 6, 2014, at 4:09 PM, Gary Gregory wrote:
> I wonder if we could write a "MainArgumentsLookup" that finds the main
> thread an
I wonder if we could write a "MainArgumentsLookup" that finds the main
thread and walks up the stack to the public static main(String[]) main
methods and gets the arguments from the stack...
Gary
On Wed, Aug 6, 2014 at 6:54 PM, Ralph Goers
wrote:
> Well….
>
> You would really be passing the na
Well….
You would really be passing the name of the file to the Appender, not a Logger.
Loggers only reference Appenders so you can’t really configure them with
Appender configuration data. That said, Log4j 2 provides a few ways you could
do this:
1. Set a system property and reference it via
My application takes a parameter where the user can specify the log file. I'd
like to pass this parameter to the Logger which uses a FileAppender. I am not
sure how to do this in log4j 2.
Thanks,
Arwen
This electronic mail message contains information that (a) is or
may be CONFIDENTIAL, PROP
22 matches
Mail list logo