Class LogFactory
java.lang.Object
com.github.rhys_h_walker.factories.LogFactory
Class that creates and stores logs in the correct location based on information
supplied upon construction of the logger. This class handles the cycling of the
PrintWriter object.
-
Constructor Summary
ConstructorsConstructorDescriptionLogFactory
(String applicationName) Create a LogFactory for a specific application All logs will be located under this name like this: user.home/OnRailsLogging/applicationName/ regular dated directory structure THIS METHOD WILL RETURN ON ANY ERROR -
Method Summary
Modifier and TypeMethodDescriptionboolean
cleanup()
Close any system resources correctlycreateNewLog
(String message, LoggingType logType) Create a new log given a log type and messageboolean
Has this LogFactory been initialized
-
Constructor Details
-
LogFactory
Create a LogFactory for a specific application All logs will be located under this name like this: user.home/OnRailsLogging/applicationName/ regular dated directory structure THIS METHOD WILL RETURN ON ANY ERROR- Parameters:
applicationName
- The name to be used
-
-
Method Details
-
initialized
public boolean initialized()Has this LogFactory been initialized- Returns:
- true if ok, false if not ok
-
createNewLog
Create a new log given a log type and message- Parameters:
message
- The message to acompany the loglogType
- The type to be logged- Returns:
- The timestamp String to use, format of (YYYY-MM-DD-HH:MM:SS)
-
cleanup
public boolean cleanup()Close any system resources correctly- Returns:
- true for success (Can only return true, retained functionality for future updates)
-