[JIRA] Created: (LBCORE-197) CSS Builder that can accept the css text directly

CSS Builder that can accept the css text directly ------------------------------------------------- Key: LBCORE-197 URL: http://jira.qos.ch/browse/LBCORE-197 Project: logback-core Issue Type: New Feature Reporter: Benoit Xhenseval Assignee: Logback dev list I suggest creating a CSSBuilder class that can accept the CSS text directly in the XML configuration file. We will submit a simple implementation. Thanks for LogBack! -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCORE-197?page=com.atlassian.jira.plugin.system.i... ] Ceki Gulcu commented on LBCORE-197: ----------------------------------- Although I have not tested it, I think this maybe as simple as: package some.pkg; import ch.qos.logback.core.html.CssBuilder; public class MyCssBuilder implements CssBuilder { String cssText; public void getCssTest() { return cssText; } public void setCssTest(String cssText) { this.cssText = cssText; } public void addCss(StringBuilder sbuf) { sbuf.append(cssText); } } HTH
CSS Builder that can accept the css text directly -------------------------------------------------
Key: LBCORE-197 URL: http://jira.qos.ch/browse/LBCORE-197 Project: logback-core Issue Type: New Feature Reporter: Benoit Xhenseval Assignee: Logback dev list
I suggest creating a CSSBuilder class that can accept the CSS text directly in the XML configuration file. We will submit a simple implementation. Thanks for LogBack!
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira

[ http://jira.qos.ch/browse/LBCORE-197?page=com.atlassian.jira.plugin.system.i... ] Benoit Xhenseval updated LBCORE-197: ------------------------------------ Attachment: CssTextBuilder.java Hi Thanks for the hint. It is working essentially how you suggested BUT it is best to declare the <style... inside the class otherwise the parsing of the logback.xml will consider the <style as XML (and most people would not use [[CDATA[.. I think it would be a nice addition to LogBack: Simple to us: <appender name="EMAIL" class="ch.qos.logback.classic.net.SMTPAppender"> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <level>debug</level> </filter> <Subject>Error: %m</Subject> <SMTPHost>@smtp.host@</SMTPHost> <To>@log4j.email.to@</To> <From>@log4j.email.from@</From> <layout class="ch.qos.logback.classic.html.HTMLLayout"> <pattern>%d{MMM-dd HH:mm:ss.SSS}%thread%level%logger{0}%msg</pattern> <cssBuilder class="som.pckg.CssTextBuilder"> <cssText> table { margin-left: 0em; margin-right: 0em; border-left: 1px solid #AAA; } TR.even { background: #FFFFFF; } TR.odd { background: #AAEAEA; } ... </cssText> </cssBuilder> </layout> <CyclicBufferTracker class="ch.qos.logback.core.spi.CyclicBufferTrackerImpl"> <BufferSize>75</BufferSize> </CyclicBufferTracker> </appender>
CSS Builder that can accept the css text directly -------------------------------------------------
Key: LBCORE-197 URL: http://jira.qos.ch/browse/LBCORE-197 Project: logback-core Issue Type: New Feature Reporter: Benoit Xhenseval Assignee: Logback dev list Attachments: CssTextBuilder.java
I suggest creating a CSSBuilder class that can accept the CSS text directly in the XML configuration file. We will submit a simple implementation. Thanks for LogBack!
-- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.qos.ch/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
participants (2)
-
Benoit Xhenseval (JIRA)
-
Ceki Gulcu (JIRA)