Package passwordmanager.manager
Class Logger
java.lang.Object
passwordmanager.manager.Logger
Logger for collecting information
- Since:
- 2023-12-14
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateLogger()Hidden constructor - prevents the creation of a class object -
Method Summary
Modifier and TypeMethodDescriptionstatic voidMethod that creates a log entrystatic voidclear()Method that clears a list of log entriesgetLogs()Method that returns a list of log entriesprivate static voidMethod initializing theLoggerin accordance with the passed valuesstatic voidinicialize(boolean enabledIn) Method initializing theLoggerin accordance with the passed values
-
Field Details
-
logs
List of logs -
enabled
private static boolean enabledField indicating whether the log is enabled
-
-
Constructor Details
-
Logger
private Logger()Hidden constructor - prevents the creation of a class object
-
-
Method Details
-
inicialize
public static void inicialize(boolean enabledIn) Method initializing theLoggerin accordance with the passed values- Parameters:
enabledIn- talks about the need to use logs
-
inicialize
private static void inicialize()Method initializing theLoggerin accordance with the passed values -
addLog
Method that creates a log entry- Parameters:
prefix- indicates the place from which the information was transmittedmessage- stores information about the event
-
getLogs
Method that returns a list of log entries- Returns:
- list of log entries
-
clear
public static void clear()Method that clears a list of log entries
-