<ECLoggingXMLConfiguration>
  <!-- define some writer -->
  <ECLoggingWriter id="filewriter"
    class="ECFileLoggingWriter"
    baseFilename="sample.log"/>
    
  <ECLoggingWriter id="nslogwriter"
    class="ECNSLogLoggingWriter"/>
    
  <!-- define the default formatter -->
  <ECLoggingFormatter class="ECDefaultLoggingFormatter" 
    id="defaultWriter"/>
    
  <!-- map some contexts to configurations -->
  <ECLoggingConfiguration id="debugIntoFile"
    loggingLevel="DEBUG"
    loggingWriter-idref="filewriter"
    loggingFormatter-idref="defaultWriter"/>

  <ECLoggingConfiguration id="infoIntoFile"
    loggingLevel="INFO"
    loggingWriter-idref="filewriter"
    loggingFormatter-idref="defaultWriter"/>

  <ECLoggingConfiguration id="errorOnNSLog"
    loggingLevel="ERROR"
    loggingWriter-idref="nslogwriter"
    loggingFormatter-idref="defaultWriter"/>
  
  <ECLoggingContext 
    context="sample.A" 
    loggingConfiguration-idref="debugIntoFile"/>
  <ECLoggingContext 
    context="sample.B" 
    loggingConfiguration-idref="infoIntoFile"/>
  <ECLoggingContext 
    rootContext="true"
    loggingConfiguration-idref="errorOnNSLog"/>
</ECLoggingXMLConfiguration>