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 {
|
||||
|
||||
/* Create new singleton objects and prepare their modules */
|
||||
fileLoggerModule = FileLoggerModule.getSingleton();
|
||||
consoleLoggerModule = ConsoleLoggerModule.getSingleton();
|
||||
|
||||
/* Prepare modules */
|
||||
fileLoggerModule.prepare();
|
||||
consoleLoggerModule.prepare();
|
||||
fileLoggerModule = FileLoggerModule.getSingleton().prepare();
|
||||
consoleLoggerModule = ConsoleLoggerModule.getSingleton().prepare();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -56,12 +56,14 @@ public final class ConsoleLoggerModule {
|
||||
/**
|
||||
* Following method performs the initialization
|
||||
*/
|
||||
public void prepare() {
|
||||
public ConsoleLoggerModule prepare() {
|
||||
|
||||
LOGGER.debug("ConsoleLoggerModule::prepare();");
|
||||
|
||||
this.output = new PrintStream(System.out);
|
||||
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
|
||||
* error.txt)
|
||||
*/
|
||||
public void prepare() throws FileNotFoundException {
|
||||
public FileLoggerModule prepare() throws FileNotFoundException {
|
||||
|
||||
LOGGER.debug("FileLoggerModule::prepare();");
|
||||
|
||||
this.output = new PrintStream(new FileOutputStream(OUTPUT_FILE));
|
||||
this.error = new PrintStream(new FileOutputStream(ERROR_FILE));
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user