The REcmt API enables S60 applications to send messages to the log view of the Diagnostics window. This is a convenient way to create and observe debug messages from an application: The application can be run in an S60 device and the debug log can be viewed by using the Diagnostics window.
In order to use the REcmt API, the application must have the following
line in its .mmp
file:
LIBRARY EcmtClient.lib
It enables the application to link against the functions available in REcmt API:
TInt Connect( ); void Close( ); void Write( const TDesC16& aText ); void WriteFormat(TRefByValue<const TDesC16> aFmt,...);
Connect()
and Close()
are
used to establish and sever the connection to the Ecmt Server. With Write()
and WriteFormat()
the
application can send log messages to the Ecmt Server, which then forwards
them to the Ecmt Manager Diagnostics view.
Note: Write()
allows the writing of arbitrarily long
descriptors, but WriteFormat()
has a maximum length of
256 characters which is defined in KFormatMaxSize
in EcmtClient.h
.
The message cannot exceed this maximum length after the formatting has been
applied, otherwise the application will raise a USER 11 panic.