Great. I am glad you got it working.
Type: Posts; User: Norm
Great. I am glad you got it working.
I think only 1 close is required. The API doc for the close method says: Closes the stream, flushing it first.
Have you solved the problem?
That statement says the path to the logger file is "". Where is that location????
Note this statement:
if ("".equals(logFile)) return;
Try this with a good path in the...
Move the IConsole class's definition outside of the Logger class (past the line: } // end of class Logger) at the end of the source file.
That is my code for testing.
What is in your code on...
You keep skipping these questions:
The command needs to be: java Logger
not Java IConsole.
Change the source by putting the IConsole class at the end of the source file.
Also add the word...
Also these questions about how the Logger program is used in the Dukascopy environment:
Why do you think the Logger class is usable? Where did you get it?
If you did not write the code, how...
The name of your version of the class is Logger. That is what you need to use in the main method, not BobsLogger.
For my testing I changed it to BobsLogger to keep from having a confusing class in...
The structure of the source file needs fixing. The structure should be like this:
class statement {
fields for the class
method declarations with {}s
} at end of class
Start with the code in...
Can you post the actual code in the logger.java file that you passed to the javac.exe command?
--- Update ---
I am done for tonight. I'll be back tomorrow.
Stand alone.
We are testing the code in the Logger class to find the problem you are having. The rest of the code is not needed for the test.
Here is a version of IConsole for testing:
class IConsole { ...
No. The flush clears any data left in the buffer.
Did you make a small, complete class with a main that can be compiled and executed for testing to demonstrate the problem?
Please post it and the...
I usually add a main method to simple utility classes like this to allow easy standalone testing. Here is an example of the one I used with your code. It allows both of us to execute the same code...
Where is a main method for testing the code?
What is printed on the console when the code is executed?
I get this when I execute the code:
Are you sure you put a call to printStackTrace in all the catch blocks?
Have you solved your problem now?
Are there any exceptions thrown? Empty catch blocks ignore any exception.
catch (IOException e) {}
Add a call to printStackTrace to the catch blocks to print a message/trace if there is an...