Server Specific

Server specific methods are used to customize the actions performed on the server.

This page discusses:

Trace

The trace action is listed below.

Syntax

Trace(level:Integer, message:String, argument:Literal, ...) : VoidType

Where:

  • The level is comprised between 1 and 9 and is used to indent the traces.
  • The message is used like a message function.
  • The argument must have the same number of # and parameters. If there are more parameters than #, parameters are added at the end of the message. If there are more # than parameters, the character # is not replaced.

Note: Remember that:
  • The | symbol lets you insert a carriage return in a prompt.
  • # is replaced with the parameter value.

To activate traces:

  • modify the logback.xml file located in WEB-INF/classes
  • Add logger tags. The other tags are compulsory but the ones provided in the example below are examples only.
This file must have the following format:
<configuration ... > 
  <!-- logback.xml -->
  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
    <encoder>
      <pattern>%d [%thread] %-5level %logger{15} - %msg%n</pattern>
    </encoder>
  </appender>

  <!--  basic traces -->
  <logger name="CKE_CUSTO_TRACES" level="DEBUG"><appender-ref ref="STDOUT"/></logger>

  <!-- extended traces
    <logger name="CKE_CUSTO_TRACES_Verbose" level="DEBUG"><appender-ref ref="STDOUT"/></logger>
  -->
  <root level="OFF"/>
</configuration>

The text provided to the Trace() function is displayed on the server side in the application server console. You can also display it through the logger name CKE_EKL_TRACE in debug mode, for example: <logger name="CKE_EKL_TRACE" level="DEBUG"><appender-ref ref="STDOUT"/></logger>. The traces are only used for debug purposes.

Arguments

String Required/Optional Description Comment
level Required comprised between 1 and 9 and is used to indent the traces
message Required The message is used like a message function You must put a String in quotes.
argument Required The argument must have the same number of # and parameters. If there are more parameters than #, parameters are added at the end of the message. If there are more # than parameters, the character # is not replaced.
Note: Remember that:
  • The | symbol lets you insert a carriage return in a prompt.
  • # is replaced with the parameter value.

Example

Trace(1,"this is a trace")

Profile Card

Function.Signature = Trace@Integer@String@Literal@...
Function.Visibility = Visible
Function.Arg1 = LocalCPU
Function.Arg2 = LocalCPU
Function.Arg3 = LocalCPU

BuildDeferredMessageNLS

CATNls file depending on the client NLS on a target machine. Its role is to store the information to build a message (could be error, warning, or info) from a catalog, key, and inputs arguments. The BuildDeferredMessageNLS function can build an NLS message (a message in a given language) by finding it in a CATXXX.

Warning: It is strongly discouraged to use this method as it is not web client compatible.

Syntax

BuildDeferredMessageNLS ( iCatalog : String, iKey : String, iArgs : List) : NLSMessage

Arguments

String Required/Optional Description Comment
Catalog (String) Required CATNLS file name
Key(String) Required Key name in the NLS file
Args (List) Optional Variable arguments number

The output is a structure composed of Catalog, Key, and List of arguments, that is to be affected to Parameters.

Note: The BuildMessageNLS on the client is replaced by a BuildDeferredMessageNLS on the server. The CATNls files must be available on the client.

Example 1

Parameters.NLSMessage = BuildKweMessageNLS(Catalog, Key, Arg1, Arg2, …)

Profile Card

Function.Signature = BuildDeferredMessageNLS@String@String@Literal@...
Function.Visibility = Visible
Function.Arg1 = LocalCPU
Function.Arg2 = LocalCPU
Function.Arg3 = LocalCPU