D
denzel
Hello,
i have a big design problem. Until today, we had a text log system, wich
worked pretty good. But we decided to use XML for several reasons. This
change is a lot more complicated than we thought. The thing is that in
XML, you can't juste append some text, you need to repect a DTD... And i
can't design the new log system because of this! Here are my constraints:
1/ An application crash must be detected (this was done by the log file
still present until now)
2/ If several instance of the application are started, nothing must be
erased/lost (new constraint)
3/ The log file must keep the "extrem" events which are "throwed"
between main entry and UI appearance, and between UI disappearing and
application exiting, which make user questioning pretty hard!
So for example, let's say i'm starting the app, the UI is not yet
showned. In the log directory, there are 3 log files. I don't know
- If they belong to another application instance
- If they belong to a crashed session, in which case, i must send them,
whith user approval of course.
- If they belong to the previous, cleanly closed session, parse them to
see if they contains an exception. If they do, ask user approval to send
them.
- All of this must not take too long (i think i must use a background
thread)
It would be better to ask the user at the end of the session, but i need
to close the XML stream to be able to email it, but i also need to log
if the email sending fails...
Some others non technical constraints:
- my boss said "no sockets" for checking other instances
- my boss said "one day there won't be any bugs left in our software so
the log is no priority"
- i must finish the log system for tomorrow evening...
I'm pretty lost...
Have you ever done something like that? Have you some advices? I will
not use log4j, or similar, because i don't want to lost my work, and i'm
pretty sure we will have some specific features to add for our software.
Thanks for any help, really.
i have a big design problem. Until today, we had a text log system, wich
worked pretty good. But we decided to use XML for several reasons. This
change is a lot more complicated than we thought. The thing is that in
XML, you can't juste append some text, you need to repect a DTD... And i
can't design the new log system because of this! Here are my constraints:
1/ An application crash must be detected (this was done by the log file
still present until now)
2/ If several instance of the application are started, nothing must be
erased/lost (new constraint)
3/ The log file must keep the "extrem" events which are "throwed"
between main entry and UI appearance, and between UI disappearing and
application exiting, which make user questioning pretty hard!
So for example, let's say i'm starting the app, the UI is not yet
showned. In the log directory, there are 3 log files. I don't know
- If they belong to another application instance
- If they belong to a crashed session, in which case, i must send them,
whith user approval of course.
- If they belong to the previous, cleanly closed session, parse them to
see if they contains an exception. If they do, ask user approval to send
them.
- All of this must not take too long (i think i must use a background
thread)
It would be better to ask the user at the end of the session, but i need
to close the XML stream to be able to email it, but i also need to log
if the email sending fails...
Some others non technical constraints:
- my boss said "no sockets" for checking other instances
- my boss said "one day there won't be any bugs left in our software so
the log is no priority"
- i must finish the log system for tomorrow evening...
I'm pretty lost...
Have you ever done something like that? Have you some advices? I will
not use log4j, or similar, because i don't want to lost my work, and i'm
pretty sure we will have some specific features to add for our software.
Thanks for any help, really.