- Search a given directory and its sub-directories (possibly) looking for files of a particular type.
- If a file is found then check its date: does it need to be searched for errors?
- If the file is young enough to be checked then validate it, looking for exceptions.
- If it contains exceptions, are they the ones we’re looking for or have they been excluded?
- If it contains the kind of exceptions we’re after, then add the details to a report.
- When all the files have been checked, format the report ready for publishing.
- Publish the report using email or some other technique.
- The whole thing will run at a given time every day
Java tips, observations, bugs and problems from the world of Spring, Weblogic, Oracle, MySQL and many other technologies...
Wednesday, 23 April 2014
Tracking Exceptions - Part 5 - Scheduling With Spring
It seems that I'm finally getting close to the end of this series of blogs on Error Tracking using Spring and for those who haven’t read any blogs in the series I’m writing a simple, but almost industrial strength, Spring application that scans for exceptions in log files and then generates a report. From the first blog in the series, these were my initial requirements:
Tuesday, 8 April 2014
Tracking Exceptions - Part 4 - Spring's Mail Sender
If you've read any of the previous blogs in this series, you may remember that I'm developing a small but almost industrial strength application that searches log files for exceptions. You may also remember that I now have a class that can contain a whole bunch of results that will need sending to any one whose interested. This will be done by implementing my simple Publisher interface shown below.
If you remember, the requirement was:
In this blog I’m dealing with the concrete part of the requirement: sending a report by email.
public interface Publisher {
public <T> boolean publish(T report);
}
If you remember, the requirement was:
7 . Publish the report using email or some other technique.
In this blog I’m dealing with the concrete part of the requirement: sending a report by email.
Labels:
email,
Errors,
Exceptions,
Java,
Logs,
MailSender,
Spring
Subscribe to:
Posts (Atom)