Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Panel
id0

Loggers Logger writes information in log file.

What does this section cover?

Table of Contents

Define logger

A logger is defined in the following path: project_name/src/main/resources/metadata/logbackloggers.xml:

Code Block
titleRetrieve CRM Session
collapsetrue
<logbackconfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/applications.xsd">
       <logbackloggers> 
               <logbacklogger>
                       <loggername>loggername</loggername>
                       <logbackappenderfilename>loggerfilename</logbackappenderfilename>
                       <logbackclasses>
                              <logbackclass>
                                     <logbackclassname>com.crm.kounta.webapi.KOUNTAUtilBean</logbackclassname>
                              </logbackclass>
                       </logbackclasses> 
               </logbacklogger>
       </logbackloggers>
</logbackconfig>

Retrieve logger

To retrieve the current CRM Session object you have to use getCRMSession() method which is implemented in com.crm.businessobject.CRMBase super class. Note that all CRMBO, CRMUI, CRMProcess and CRMAPIBean classes extend CRMBase.

...