Symbian3/SDK/Source/GUID-6E8807F5-9CC0-5A70-8182-22230D43AA9E.dita
author Graeme Price <GRAEME.PRICE@NOKIA.COM>
Fri, 15 Oct 2010 14:32:18 +0100
changeset 15 307f4279f433
parent 0 89d6a7a84779
permissions -rw-r--r--
Initial contribution of the Adaptation Documentation.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept xml:lang="en" id="GUID-6E8807F5-9CC0-5A70-8182-22230D43AA9E"><title>Setting Up Window Server Logging</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>This topic shows an example <filepath>wsini.ini</filepath> configuration file to explain how to set up Window Server logging. </p> <p>Here is the example: </p> <codeblock id="GUID-C9B12FF3-B586-54E7-8CFF-658737853687" xml:space="preserve">LOG FL
LOGP C:\DATA\WSERV.LOG
LOGENABLE
REBOOT 1
AUTOCLEAR 1
SCREENMODE COLOR256</codeblock> <p>The first three lines control respectively, the choice of logging DLL, the location of the generated log file, and the time at which logging begins. <codeph>LOGENABLE</codeph> ensures that logging begins as soon as the Window Server boots. If no log file location is specified, the default on the emulator is <filepath>epoc32\winscw\c\private\ </filepath> and on phones is <filepath>c:\system\data\</filepath>. </p> <p>To enable logging on the emulator, add these settings to the default <filepath>wsini.ini</filepath> file, located in <filepath>\epoc32\release\winscw\</filepath> <i>variant</i> <filepath>\z\system\data\</filepath> (where <i>variant</i> is either <filepath>udeb</filepath> or <filepath>urel</filepath>). On a target phone, copy the <filepath>wsini.ini</filepath> file into <filepath>Z:\system\data\</filepath>, overriding the version in ROM, and restart the Window Server. </p> <p>In order to carry out logging on a target phone, after making any necessary changes to the <filepath>wsini.ini</filepath> file, copy the logging DLL to the <filepath>\sys\bin\</filepath> directory on the phone. </p> <p>To enable and disable logging, the following shortcut keys can be used: </p> <p> <userinput>Alt</userinput> +<userinput>Ctrl</userinput> +<userinput>Shift</userinput> +<userinput>E</userinput> ("<userinput>E</userinput> " for Enable) </p> <p> <userinput>Alt</userinput> +<userinput>Ctrl</userinput> +<userinput>Shift</userinput> +<userinput>D</userinput> ("<userinput>D</userinput> " for Disable) </p> <p>Other useful shortcut keys are: </p> <ul><li id="GUID-4DD20C41-4FB2-58FC-B262-397191966246"><p> <userinput>Alt</userinput> +<userinput>Ctrl</userinput> +<userinput>Shift</userinput> +<userinput>W</userinput> (dumps the full window tree) </p> </li> <li id="GUID-B127233F-A28D-5357-9FD6-1CBB1DE7CCE4"><p> <userinput>Alt</userinput> +<userinput>Ctrl</userinput> +<userinput>Shift</userinput> +<userinput>H</userinput> (dumps the contents of the Window Server's heap) </p> </li> </ul> <p>These two options work whether or not logging is enabled, provided a logging DLL has been specified. </p> <p>Note that in Window Server client code, invoking </p> <ul><li id="GUID-70882334-1192-5ADA-8CB9-97F1F0BB493B"><p> <xref href="GUID-643DDA78-C7A7-386D-AB3F-8710141DDDA9.dita#GUID-643DDA78-C7A7-386D-AB3F-8710141DDDA9/GUID-6BCABC6F-E33D-3CD6-A1C5-FE8D883307BD"><apiname>RWsSession::LogCommand()</apiname></xref> allows the Window Server client to enable or disable logging of Window Server events. </p> </li> <li id="GUID-36F31D32-2B1A-5F5D-B9D3-0BBDBDE64151"><p> <xref href="GUID-643DDA78-C7A7-386D-AB3F-8710141DDDA9.dita#GUID-643DDA78-C7A7-386D-AB3F-8710141DDDA9/GUID-F88F3A17-6010-3A0C-89DD-956E7092A862"><apiname>RWsSession::LogMessage()</apiname></xref> writes the buffer descriptor specified to the log file. </p> </li> </ul> </conbody><related-links><link href="GUID-AA02BFA9-E62E-56FC-BF22-8FE092ABD9DA.dita"><linktext>The wsini.ini File</linktext> </link> <link href="GUID-1D529BDC-6665-58E2-AB3F-7023D8A84F69.dita"><linktext>The wsini.ini File
                Reference</linktext> </link> </related-links></concept>