Logger Class Reference
List of all members.
|
Public Member Functions |
| void | write (String data) |
Static Public Member Functions |
| static Logger | getInstance (String filename) |
Member Function Documentation
| static Logger Logger::getInstance |
( |
String |
filename |
) |
[inline, static] |
00014 {
00015 if (_theInstance == null) {
00016 throw new RuntimeException("No singleton instance available");
00017 } else {
00018 logfile = filename;
00019 return _theInstance;
00020 }
00021 }
| void Logger::write |
( |
String |
data |
) |
[inline] |
00023 {
00024
00025 try{
00026
00027 FileWriter fstream = new FileWriter(logfile,true);
00028 BufferedWriter out = new BufferedWriter(fstream);
00029 out.write(data+"\n");
00030 out.close();
00031 }catch (Exception e){
00032 System.err.println("Error: " + e.getMessage());
00033 }
00034 }
The documentation for this class was generated from the following file: