logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <h...@visi.com>
Subject RE: EnhancedHTMLAppender
Date Fri, 10 Sep 2004 17:46:24 GMT
Quoting Ceki Gülcü <ceki@qos.ch>:

> Hi Steve,
> At 02:31 AM 9/8/2004, you wrote:
> >Long time no speak,
> >
> >I've been very slack on this front and as it seems that 1.3 is gathering
> >steam to get released I hope to get the EnhancedHTMLAppender completed in
> >the next week.
> >
> >After leaving it so long, and having to re-read the discussion to work out
> >where we were up to I think its time to solve this CSS issue.
> >
> >My suggestion is to hard-code styles into the top of the style sheet and
> >provide the user a property to change a link to override the default styles,
> >as suggested here:
> >
> > > ><HEAD>
> > > >   <STYLE TYPE="text/css">
> > > >     <!--
> > > >       BODY { background-color: white }
> > > >     -->
> > > >   </STYLE>
> > > >   <LINK REL=StyleSheet HREF="http://apache.org/~ceki/yellow.css"
> > > > TITLE="Basic"/>
> > > ></HEAD>
> Well, the above probably not such a good idea because the rules for style
> cascades are not that simple. Later rules add up on earlier rules except if
> they contain already existing properties in which case they mask older
> properties. In short, if there are more than one source for styles most
> users are likely to get very confused. We don't want to mislead or confuse
> users whenever we can help it.

If the defaults are clearly defined, then it is simple to override those
properties.  The defaults don't have to be overly complex, but there ought to
be some defaults.  Users creating custom stylesheets would simply read the docs
to see what the default styles are.  Even then, if sane defaults are used,
there shouldn't be any reason for the user to override most of them.  But if
they really wanted to, it would be simple to do so.  Logging configuration is,
by far, more complex than this.

> The best solution I can think of consist of linking to a style located at a
> well-known URL by default but allow the user to override that default by
> specifying an alternative URL if need be. This approach will work out of
> the box in 95% of the cases and still allow developers to handle
> exceptional cases when necessary.

...except in the case where you are offline, then you won't have any styling
whatsoever unless you configured a custom local location for the css file. 
Seriously, the defaults shouldn't be confusing.  If they are, then the styles
weren't written properly.  That's a development issue, not a user issue.  The
linked stylesheet should only be for overriding defaults.  The HTML file ought
to be able to be used in standalone mode rather than counting on an external
resource for any formatting.

> --
> Ceki Gülcü


This message was sent using IMP, the Internet Messaging Program.

To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org

View raw message