On Fri, Feb 16, 2018 at 8:40 AM, Ralph Goers <[email protected]>
wrote:

>
>
> > On Feb 16, 2018, at 8:34 AM, Gary Gregory <[email protected]>
> wrote:
> >
> > On Fri, Feb 16, 2018 at 8:32 AM, Jochen Wiedmann <
> [email protected] <mailto:[email protected]>>
> > wrote:
> >
> >> On Fri, Feb 16, 2018 at 4:03 PM, Gary Gregory <[email protected]>
> >> wrote:
> >>> On Fri, Feb 16, 2018 at 7:03 AM, Matt Sicker <[email protected]> wrote:
> >>>
> >>>> Is this property name already set in stone? Why not log4j2.
> >>>> StatusLogger.DateFormat?
> >>>>
> >>>
> >>> +1
> >>
> >> Wrong question, in my opinion: Why use a system property at all? The
> >> preferred source for configuration should be the config file, IMO.
> >> System properties make sense in some cases (like locating the config
> >> file). However: Be aware, that setting system properties is typically
> >> a task for operations, not a task for the application programmer.
> >>
> >
> > As pointed out earlier in this thread, use of an XML/JSON/YAML config
> file
> > assumes that log4j-core is in play, which it may not be.
>
> In addition, the StatusLogger is created the first time it is referenced -
> which is in LogManager. LogManager uses the StatusLogger to log its own
> errors. At this point there is not any logging implementation, much less a
> configuration.
>

WRT command line vs. config file, you _can_ specify the Log4j system
properties in a file:
https://logging.apache.org/log4j/2.x/manual/configuration.html#SystemProperties

Gary


>
> Ralph
>
>

Reply via email to