diff -r 80ef3a206772 -r 48780e181b38 Symbian3/SDK/Source/GUID-ABE77283-EED8-5A33-B574-3B771EF11086.dita --- a/Symbian3/SDK/Source/GUID-ABE77283-EED8-5A33-B574-3B771EF11086.dita Fri Jul 16 17:23:46 2010 +0100 +++ b/Symbian3/SDK/Source/GUID-ABE77283-EED8-5A33-B574-3B771EF11086.dita Tue Jul 20 12:00:49 2010 +0100 @@ -9,49 +9,44 @@ --> -How -to Use ULogger with Comms -

This tutorial summarises one approach for enabling, retrieving and post-processing -the ULogger logs -for Comms. ULogger is part of the Unified Trace framework which replaces other -logging mechanisms for Symbian platform including Flogger and -CDU.

+How to Use ULogger with Comms +

This tutorial summarizes one approach for enabling, retrieving +and post-processing the ULogger logs for Comms. ULogger +is part of the Unified Trace framework which replaces other logging +mechanisms for Symbian platform including Flogger and CDU.

The Unified Trace framework has greater flexibility and speed compared to Flogger and CDU.

-
Introduction

The Comms logging which has been migrated -to ULogger is as follows:

    -
  • Comms Framework Node -messages - creation and destruction of Nodes and messages between Nodes.

  • -
  • Mesh Machine messages

  • -
  • data to support the -SVG generation

  • -

This logging replaces some of what was logged through the "LOG -CFNode * ", "LOG Mesh * " and "LOG ESock -* " tags. In the case of the ESock tag, the logging -which is written to ULogger is also written to CDU.

This usage description -assumes that the development tools already include ULogger support.

-
Procedure - Using ULogger

Requirements

- For this tutorial, the code under observation must be run from EShell.

- The following binaries must include logging:

    -
  • nodemessages.dll -

  • -
  • meshmachine.dll -

  • -
  • commsfw.dll

  • -
  • serverden.dll

  • -
  • esocksvr.dll

  • -

To enable logging for a binary either use the UDEB version of the - binary or rebuild the binary with the SYMBIAN_TRACE_ENABLED macro -defined.

+
Introduction

The Comms logging which has been migrated to ULogger is as follows:

    +
  • Comms Framework +Node messages - creation and destruction of Nodes and messages between +Nodes.

  • +
  • Mesh Machine +messages

  • +
  • data to support +the SVG generation

  • +

This logging replaces some of what was logged through the +"LOG CFNode * ", "LOG Mesh * " and +"LOG ESock * " tags. In the case of the ESock tag, the logging which is written to ULogger is also written to +CDU.

This usage description assumes that the development tools +already include ULogger support.

Note: For more information, +see Symbian^3 Tools Guide > Debugging.

+
Procedure +- Using ULogger

Requirements

For this tutorial, +the code under observation must be run from EShell.

The following binaries must include logging:

    +
  • nodemessages.dll

  • +
  • meshmachine.dll

  • +
  • commsfw.dll

  • +
  • serverden.dll

  • +
  • esocksvr.dll

  • +

To enable logging for a binary either use the UDEB version +of the binary or rebuild the binary with the SYMBIAN_TRACE_ENABLED macro defined.

Steps
    -
  1. Start -Eshell - ULogger only supports asynchronous logging, so -from EShell start a second instance of EShell.

    start eshell

    - This allows ULogger to be stopped even if the code under - observation does not exit normally.

  2. -
  3. Set -the ULogger Filters - To allow Comms logging enable the -following filters:

    +
  4. Start Eshell - ULogger only supports asynchronous logging, so from EShell start +a second instance of EShell.

    start eshell

    This allows ULogger to be stopped even if the +code under observation does not exit normally.

  5. +
  6. + Set the ULogger Filters - To allow Comms logging enable +the following filters:

  7. @@ -62,22 +57,24 @@

    194

    -

    Node Messages

    +

    Node Messages +

    195

    -

    Mesh Machine

    +

    Mesh Machine +

    196

    -

    SVG Logging - provides extra logging so -that 194 and 195 can be displayed in an SVG file -

    +

    SVG Logging - provides extra logging +so that 194 and 195 can be displayed in an +SVG file

    -

    The following filter is also useful: -

    +

    The following filter is also useful: +

    @@ -88,69 +85,66 @@

    3

    -

    Kernel Thread ID's - Thread and process -creation

    +

    Kernel Thread ID's - Thread and +process creation

    -

    Set these filters with the following command: -

    ulogger -efv 194 195 3 196 -
  8. -
  9. Start -ULogger - The following command starts ULogger with the -filter:

    +

    Set these filters with the following command:

    ulogger -efv 194 195 3 196 +
  10. +
  11. + Start ULogger - The following command starts ULogger + with the filter:

    ulogger -rv
  12. -
  13. Run -the code under observation - In the first Eshell session, -run the code to be tested or debugged.

  14. -
  15. Stop -ULogger - To stop ULogger and generate the logs, use the -command:

    ulogger -qv
  16. -
  17. Process -the binary logs into text - The log file created by ULogger -is in a binary format and is located in the c:\logs folder -on the device.

    To use the log file, -the file must be converted to a text format. -

    The Comms software has a decoder to interpret the -ULogger output for Comms. This decoder is an MS Windows-compatible -application and is located in …\os\commsfw\commsfwtools\. -

    An example command to run the decoder -is:

    utracedecoder - -message-def esockmessages.definition.txt ulogger.log > log.txt

    - The decoder uses a definition file to decipher the binary data -in the log, and the decoder has definition files configured -for the current scope of Comms logging. This example uses -the ESock messages definition file, which is located in - …\os\commsfw\commsfwtools\commstools\utracedecoder\data\esockmessages.definition.txt. -

    The output in log.txt -contains an interpretation of the original binary logs. -

  18. -
  19. Generating -the SVG diagram - The exchange of messages between Nodes -can be rendered into a diagram.

    From …\os\commsfw\commsfwtools\commstools\svg run - parseit.bat specifying the path to the -generated log.txt file:

    parseit.bat /log M:\path_to_log_file\log.txt +
  20. + Run the code under observation - In the first Eshell + session, run the code to be tested or debugged. +

  21. +
  22. + Stop ULogger - To stop ULogger and generate the + logs, use the command:

    ulogger -qv
  23. +
  24. + Process the binary logs into text - The log file + created by ULogger is in a binary format and is located +in the c:\logs folder on the +device.

    To use the log file, +the file must be converted to a text format. +

    The Comms software has a decoder +to interpret the ULogger output for Comms. This decoder +is an MS Windows-compatible application and is located + in …\os\commsfw\commsfwtools\. +

    An example command to run the decoder +is:

    utracedecoder - -message-def esockmessages.definition.txt ulogger.log > log.txt

    The decoder uses a definition file to decipher +the binary data in the log, and the decoder has definition +files configured for the current scope of Comms logging. +This example uses the ESock messages definition file, which + is located in …\os\commsfw\commsfwtools\commstools\utracedecoder\data\esockmessages.definition.txt.

    The output +in log.txt contains an interpretation of the original + binary logs.

  25. +
  26. + Generating the SVG diagram - The exchange of + messages between Nodes can be rendered into a diagram. +

    From …\os\commsfw\commsfwtools\commstools\svg run parseit.bat specifying +the path to the generated log.txt file:

    parseit.bat /log M:\path_to_log_file\log.txt Example SVG output from the Message Sequence Display Tool - +

    Key to the SVG diagram:

      -
    1. - Vertical black lines are tagged with names to represent node - lifetimes. For example: IPCpr -

    2. -
    3. - Vertical lines forking from the node lifetime lines are - MeshMachine activity lifetimes.

    4. -
    5. - Black horizontal lines are message deliveries.

    6. -
    7. - Green horizontal lines are message postings.

    8. -

    New message types can be added to the definition -files. See the documentation with the utracedecoder component. -

  27. +
  28. + Vertical black lines are tagged with names to represent +node lifetimes. For example: IPCpr

  29. +
  30. + Vertical lines forking from the node lifetime lines are + MeshMachine activity lifetimes. +

  31. +
  32. + Black horizontal lines are message deliveries. +

  33. +
  34. + Green horizontal lines are message postings. +

  35. +

New message types can be added to the +definition files. See the documentation with the utracedecoder component. +

-
-Unified Trace -Solution -How to Use -the ULogger Configuration File -
\ No newline at end of file +
\ No newline at end of file