Skip to content
This repository has been archived by the owner on Jul 26, 2023. It is now read-only.

Logging Guide

Ayaz Maqbool edited this page Nov 25, 2018 · 9 revisions

IDA Logging Guide

How are the logs being created?

For the creation of logs, we are using the Spring AOP. There is a Aspect Component created as upb.ida.logging.AspectLogger which has multiple pointcuts and logging methods. In our case, we are using the following methods of AOP:

  • @Before (When a particular method is called)
  • @AfterReturning (When a particular method finishes and it returns something)
  • @AfterThrowing(When an exception occurs in a particular method)

Which things are currently being logged?

At the moment, the logging has been done for the following type of methods:

  • Logging the Request to the controller methods of Message Rest Controller (as in upb.ida.rest.MessageRestController).
  • Logging the Response by the controller methods of Message Rest Controller (as in upb.ida.rest.MessageRestController).
  • Logging of Exceptions thrown by any of the methods of Ida. (as in upb.ida..*..).

What is the format of logging?

The logs are saved in the format of an appended message which contains concrete details about the request, response or an exception. For Example, the request to the message rest controller is logged as:

INFO 2018-11-23 14:59:19,942 [http-nio-8080-exec-1] upb.ida.logging.AspectLogger - Request - 0:0:0:0:0:0:0:1 upb.ida.rest.MessageRestController.sendmessage(I would like you to load the city dataset,0,,)

  • LogLevel (INFO, TRACE or ERROR)
  • Timestamp
  • Tomcat Server and Port
  • LoggerClass callee.
  • Type of Logging (request, Response, Exception)
  • IpAdress of Request Sender
  • LogMessage (which contains the class name, class args, return bean and exception in respective cases.)

Where can log files be found?

The logs can be found in the folder:

/ida/ida-ws/

And the log files are:

  • ida-ws-dataset-response.log
  • ida-ws-exceptions.log
  • ida-ws-requests_responses.log

How to add/update custom configuration?

The configurations can be updated in the log4j.properties file and the configuration file can be found in the folder /ida/ida-ws/.

Clone this wiki locally