java.util.logging package for logging.LogsCenter class is used to manage the logging levels and logging destinations.Logger for a class can be obtained using LogsCenter.getLogger(Class) which will log messages according to the specified logging level..log file.logLevel setting in the configuration file (See the Configuration guide section).TalentMatch logs important events in these key components:
// Example for LogicManager when parsing a command
private static final Logger logger = LogsCenter.getLogger(LogicManager.class);
// ...
logger.info("Command word: " + commandWord + "; Arguments: " + arguments);
// Example for ModelManager when adding a person
private static final Logger logger = LogsCenter.getLogger(ModelManager.class);
// ...
logger.info("Adding person: " + person.getName());
// Example for StorageManager when saving data
private static final Logger logger = LogsCenter.getLogger(StorageManager.class);
// ...
logger.fine("Attempting to write to data file: " + filePath);
When troubleshooting issues with TalentMatch:
FINE or FINER in config.json to see detailed execution flow.log file for error stacktraces and warningsLogs are especially useful for diagnosing issues related to: