View Javadoc

1   /**
2    * Logback: the reliable, generic, fast and flexible logging framework.
3    * 
4    * Copyright (C) 1999-2006, QOS.ch
5    * 
6    * This library is free software, you can redistribute it and/or modify it under
7    * the terms of the GNU Lesser General Public License as published by the Free
8    * Software Foundation.
9    */
10  package ch.qos.logback.classic.html;
11  
12  import ch.qos.logback.core.html.CssBuilder;
13  
14  
15  /**
16   * This class helps the HTMLLayout build the CSS link.
17   * It either provides the HTMLLayout with a default css file,
18   * or builds the link to an external, user-specified, file.
19   *
20   * @author Sébastien Pennec
21   */
22  public class UrlCssBuilder implements CssBuilder {
23  
24    String url = "http://logback.qos.ch/css/classic.css";
25    
26    public UrlCssBuilder() {  
27    }
28    
29    public String getUrl() {
30      return url;
31    }
32    
33    public void setUrl(String url) {
34      this.url = url;
35    }
36    
37    public void addCss(StringBuilder sbuf) {
38      sbuf.append("<link REL=StyleSheet HREF=\"");
39      sbuf.append(url);
40      sbuf.append("\" TITLE=\"Basic\" />");
41    }
42  }