[ 
http://jira.qos.ch/browse/LBGENERAL-49?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12321#action_12321
 ] 

Sebastian Davids commented on LBGENERAL-49:
-------------------------------------------

You have to look closely:

<tr class="ınfo even"> 
</tr> 

should be:

<tr class="info even"> 
</tr>

There is a missing dot on the i -- some fonts and font sizes make it hard to 
spot the difference.

Logger names should not be localized; it should be 

info
INFO

not

ınfo
İNFO

Encoders have nothing to do with it btw.

> Logback does not pass turkey test
> ---------------------------------
>
>                 Key: LBGENERAL-49
>                 URL: http://jira.qos.ch/browse/LBGENERAL-49
>             Project: logback-general
>          Issue Type: Bug
>    Affects Versions: 1.0.0
>            Reporter: Sebastian Davids
>            Assignee: Logback dev list
>         Attachments: turkey.patch
>
>
> import java.io.Serializable;
> import java.util.ArrayList;
> import java.util.List;
> public class Bean implements Serializable {
>       private static final long serialVersionUID = 1957667958813006175L;
>       private List<String> iceCreams = new ArrayList<String>();
>       public void addIceCream(String iceCream) {
>               iceCreams.add(iceCream);
>       }
>       @Override
>       public String toString() {
>               return iceCreams.toString();
>       }
> }
> ////
> import java.beans.Introspector;
> import java.util.Locale;
> import org.slf4j.LoggerFactory;
> import ch.qos.logback.classic.Level;
> import ch.qos.logback.classic.Logger;
> import ch.qos.logback.classic.html.HTMLLayout;
> import ch.qos.logback.classic.spi.ILoggingEvent;
> import ch.qos.logback.classic.spi.LoggingEvent;
> import ch.qos.logback.core.ContextBase;
> import ch.qos.logback.core.joran.util.PropertySetter;
> public class Main {
>       public static void main(String[] args) {
>               Bean bean = new Bean();
>               PropertySetter setter = new PropertySetter(bean);
>               setter.setContext(new ContextBase());
>               String propertyName = "iceCream";
>               setter.addBasicProperty(propertyName, "vanilla");
>               System.out.println(bean);
>               System.out.println(propertyName.toUpperCase());
>               Locale.setDefault(new Locale("tr", "", ""));
>               setter.addBasicProperty(propertyName, "chocolate");
>               System.out.println(bean);
>               System.out.println(propertyName.toUpperCase());
>               System.out.println(Introspector.decapitalize("IceCream"));
>               System.out.println("I".toLowerCase() + "ceCream");
>               System.out.println(capitalizeFirstLetter(propertyName));
>               System.out.println("i".toUpperCase() + "ceCream");
>               Logger logger = (Logger) LoggerFactory.getLogger("iAmALogger");
>               Level level = Level.INFO;
>               ILoggingEvent event = new LoggingEvent("iAmALoggingEvent", 
> logger, level, "i am logging", null, null);
>               System.out.println(event);
>               
>               HTMLLayout layout = new HTMLLayout();
>               String html = layout.doLayout(event);
>               System.out.println(html);
>       }
>       public static String capitalizeFirstLetter(String name) {
>               if (name == null || name.length() == 0) {
>                       return name;
>               }
>               char chars[] = name.toCharArray();
>               chars[0] = Character.toUpperCase(chars[0]);
>               return new String(chars);
>       }
> }
> @@ Output @@
> [vanilla]
> ICECREAM
> [vanilla]
> İCECREAM
> iceCream
> ıceCream
> IceCream
> İceCream
> [INFO] i am logging
> <tr class="ınfo even">
> </tr>
> @@@@
> http://www.codinghorror.com/blog/2008/03/whats-wrong-with-turkey.html

-- 
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

       
_______________________________________________
logback-dev mailing list
[email protected]
http://mailman.qos.ch/mailman/listinfo/logback-dev

Reply via email to