com.ptc.windchill.upgrade.util
Class AdvisoryLog
java.lang.Object
com.ptc.windchill.upgrade.util.AdvisoryLog
- public class AdvisoryLog
- extends Object
ADVISORY_LOG_NAME
private static final String ADVISORY_LOG_NAME
- See Also:
- Constant Field Values
lock
private static Object lock
singleton
private static SoftReference singleton
logFile_
private File logFile_
writer_
private BufferedWriter writer_
AdvisoryLog
private AdvisoryLog()
throws IOException,
FileNotFoundException
openIfNeeded
private void openIfNeeded()
throws IOException
- Throws:
IOException
getLog
public static AdvisoryLog getLog()
throws IOException,
FileNotFoundException
- Obtains a hard reference to the log creating it if needed.
Clients should cache their reference to the log
if they will be using it frequently repeatedly
- Throws:
IOException
FileNotFoundException
getFile
public File getFile()
- Reports the underlying log file incase a client wishes to report this file to users.
Clients should not manipulate this file directly.
writeLine
private void writeLine(String line)
throws IOException
- Throws:
IOException
writeIssueHeader
private void writeIssueHeader(Object caller_or_calling_class)
throws IOException
- Throws:
IOException
logIssue
public void logIssue(Object caller_or_calling_class,
String[] multi_line_message)
throws IOException
- Log the issue.
Will (re)open the log as necessary.
- Parameters:
caller_or_calling_class
- the caller (if an instance), the caller's class (if in a static method), or can be null if traceability back to caller is unnecessary
- Throws:
IOException
logIssue
public void logIssue(Object caller_or_calling_class,
String message)
throws IOException
- Log the issue.
Will (re)open the log as necessary.
- Parameters:
caller_or_calling_class
- the caller (if an instance), the caller's class (if in a static method), or can be null if traceability back to caller is unnecessary
- Throws:
IOException
finalize
protected void finalize()
throws Throwable
- Throws:
Throwable
close
public void close()
main
public static void main(String[] args)