FintechOS API Logging

FintechOS logs the calls over the FintechOS API (REST AND WCF) and DataService CRUD operations.

The logs are saved by default in a separate database schema named EbsLogs. Database administrators can restrict read access for this schema and grant insert only rights for the SQL login used by the FintechOS platform.

Source names:

  • OpenApi (REST endpoint)
  • ApiService (WCF endpoint)
  • DataService (MVC endpoint)

EbsLogs.ApiLog Schema

Field Type Description
Id bigint identity, primary key
LogId uniqueidentifier alternate unique key
Tenant nvarchar(150) tenant name, default value: ebs_default
UserName nvarchar(200) authenticated user name
Source nvarchar(150) controller name : OpenApi, ApiService or DataService
Method nvarchar(150) action name
Request nvarchar(max) request parameter as JSON
Response nvarchar(max) response as JSON
Message nvarchar(max) response message
Exception nvarchar(max) response error
Success bit success/error
CreatedAtUtc datetime call moment UTC
Duration bigint call duration milliseconds
CorrelationId nvarchar(100) correlation id
RequestId nvarchar(100) request id
ApiInfo nvarchar(max) call authentication information

How to Configure the FintechOSAPI Logging

To configure this feature, go to the web.config file and use a custom configuration section, as provided below:

Copy
<configuration>
     <configSections>
                <section name="ftosApiLogging"
                         type="EBS.Core.Utils.ApiLoggingConfiguration.ApiLoggingConfigSection, EBS.Core.Utils"/>
     </configSections>
     <ftosApiLogging enabled="true|false">
                <sources>
                    <source name="OpenApi|ApiService|DataService" exclude="true|false">
                        <methods>
                            <method name="*">
                                <input exclude="true|false">
                                </input>
                            </method>
                            <method name="GetById" exclude="true|false">
                                <input exclude="true/false">
                                    <properties>
                                        <property name="A" exclude="true|false"/>
                                    </properties>
                                </input>
                                <output exclude="true|false">
                                    <properties>
                                        <property name="B" exclude="true|false"/>
                                    </properties>
                                </output>
                            </method>
                        </methods>
                    </source>
                </sources>
       </ftosApiLogging>
 </configuration>

The configuration allows filtering the out from logging elements at different levels of granularity: source, method (action), input (request), output (result), input property, output property.

The user can configure all other methods of a source by specifying "*" for method name. Any explicitly defined method will override all settings from "*".

NOTE  When a property is excluded, it will not be serialized in the log.

Related Topics Link IconRelated Topics