View on GitHub

tp

PlanNUS helps NUS undergraduates plan their academic journey in NUS. It is optimized for CLI users as commands can be typed in faster by undergraduates.

Logging Guide for PlanNUS

Table of contents

Using Logging Tool in PlanNUS

LoggingTool is available to use for accessible logging at the package src.main.java.seedu.duke.global. LoggingTool constructor takes in a parameter String and FileHandler. String represents loggerName and FileHandler represents the object fh, which is the java API. initialise() will automatically return a fully configured Logger object with the following parameters :

After initialising, the logger can be used as per java API constraints. Below shows an example code snippet that can be used to initialise a logger:

FileHandler fh = new FileHandler(<YOUR_LOG_FILE_NAME>);
Logger logger = new LoggingTool(<YOUR_LOGGER_NAME>,fh).initialize();