Review comments++
This commit is contained in:
parent
f67d2fd9a9
commit
5d8806858b
@ -45,12 +45,8 @@ public final class App {
|
|||||||
public static void prepare() throws FileNotFoundException {
|
public static void prepare() throws FileNotFoundException {
|
||||||
|
|
||||||
/* Create new singleton objects and prepare their modules */
|
/* Create new singleton objects and prepare their modules */
|
||||||
fileLoggerModule = FileLoggerModule.getSingleton();
|
fileLoggerModule = FileLoggerModule.getSingleton().prepare();
|
||||||
consoleLoggerModule = ConsoleLoggerModule.getSingleton();
|
consoleLoggerModule = ConsoleLoggerModule.getSingleton().prepare();
|
||||||
|
|
||||||
/* Prepare modules */
|
|
||||||
fileLoggerModule.prepare();
|
|
||||||
consoleLoggerModule.prepare();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -56,12 +56,14 @@ public final class ConsoleLoggerModule {
|
|||||||
/**
|
/**
|
||||||
* Following method performs the initialization
|
* Following method performs the initialization
|
||||||
*/
|
*/
|
||||||
public void prepare() {
|
public ConsoleLoggerModule prepare() {
|
||||||
|
|
||||||
LOGGER.debug("ConsoleLoggerModule::prepare();");
|
LOGGER.debug("ConsoleLoggerModule::prepare();");
|
||||||
|
|
||||||
this.output = new PrintStream(System.out);
|
this.output = new PrintStream(System.out);
|
||||||
this.error = new PrintStream(System.err);
|
this.error = new PrintStream(System.err);
|
||||||
|
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -64,12 +64,14 @@ public final class FileLoggerModule {
|
|||||||
* @throws FileNotFoundException if program is not able to find log files (output.txt and
|
* @throws FileNotFoundException if program is not able to find log files (output.txt and
|
||||||
* error.txt)
|
* error.txt)
|
||||||
*/
|
*/
|
||||||
public void prepare() throws FileNotFoundException {
|
public FileLoggerModule prepare() throws FileNotFoundException {
|
||||||
|
|
||||||
LOGGER.debug("FileLoggerModule::prepare();");
|
LOGGER.debug("FileLoggerModule::prepare();");
|
||||||
|
|
||||||
this.output = new PrintStream(new FileOutputStream(OUTPUT_FILE));
|
this.output = new PrintStream(new FileOutputStream(OUTPUT_FILE));
|
||||||
this.error = new PrintStream(new FileOutputStream(ERROR_FILE));
|
this.error = new PrintStream(new FileOutputStream(ERROR_FILE));
|
||||||
|
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user