How to enable Trace Logging for the BlackBerry Enterprise Management Web Service (EMWS)

Article ID: KB29472

Type: Support Content

Last Modified: 04-22-2013


Product(s) Affected:

  • BlackBerry Device Service
Jump to: Environment | Overview
  • BlackBerry Device Service

Warning: System/database changes could potentially result in irreparable damage. Prior to making any system/database changes it is recommended that you perform a system/database backup.

In certain circumstances it may be required to enabled trace logging for the BlackBerry Enterprise Management Web Service (EMWS) for troubleshooting. Trace logging can provide much more detailed logging of the functions that the EMWS performs. To enable trace logging perform the following:

  1. Navigate to C:\Program Files (x86)\Research In Motion\BlackBerry Device Service\EMWS\webapps\mdm\WEB-INF\classes
  2. Open the EMWSLogging.xml file using a text editor.
  3. Edit the EMWSLogging.xml file to reflect the changes in bold below and save the file.

    <?xml version="1.0" encoding="UTF-8"?>
    <log4j:configuration debug="true">
     <appender name="EMWS.FILE" class="com.rim.bes.bas.logutility.DailyLogFileAppender">
       <param name="Threshold" value="TRACE"/>
       <param name="RootDir" value=""/>
       <param name="LogFilePrefix" value=""/>
       <param name="UseDateSubdir" value="true"/>
       <param name="UseHostName" value="true"/>
       <param name="ComponentId" value="EMWS"/>
       <param name="ComponentInstance" value="01"/>
       <param name="Append" value="true"/>
       <param name="MaxLogInstance" value="10"/>
       <param name="MaxLogFileSize" value="524288000"/>

      <!-- Rollover at midnight each day -->
      <param name="DatePattern" value="yyyyMMdd"/>

      <layout class="org.apache.log4j.PatternLayout">
        <!-- The default BES pattern: Level Date [Logger] Message\n -->
        <param name="ConversionPattern" value="[%-5p] (%d{MM/dd HH:mm:ss:SSS}):{%t} %c{1}:%X{UserInfo}%m%n"/>
     <logger name="org.apache.commons.httpclient">
      <level value="trace"/>

     <logger name="httpclient.wire.header">
      <level value="trace"/>

     <logger name="httpclient.wire.content">
      <level value="trace"/>

      <priority value="trace"></priority>
      <appender-ref ref="EMWS.FILE"/>

The logs will be located in the following location:

C:\Program Files (x86)\Research In Motion\BlackBerry Device Service\EMWS\logs

For BlackBerry Device Service 6.2 (BlackBerry Enterprise Service 10), Trace Logging can now be enabled via the Windows Registry as seen below.

Note: EMWS would have to be restarted for this setting to take effect.

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Research In Motion\BlackBerry Enterprise Server\Logging Info\EMWS

DebugLogLevel set to 5


By downloading, accessing or otherwise using the Knowledge Base documents you agree:

   (a) that the terms of use for the documents found at apply to your use or reference to these documents; and

   (b) not to copy, distribute, disclose or reproduce, in full or in part any of the documents without the express written consent of RIM.

Visit the BlackBerry Technical Solution Center at