[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Apso-devel] Logging system and defensive code (for Apso 0.3.0)
From: |
Jeronimo Pellegrini |
Subject: |
[Apso-devel] Logging system and defensive code (for Apso 0.3.0) |
Date: |
Fri, 6 Apr 2007 21:29:36 -0300 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Caio has been working on the missing items for release 0.2.0 (fixing
types and using bdata instead of char*).
I'll start working on the stuff for 0.3.0. Basically, we need:
- Robustness. We need to detect more problematic situations, handle
errors more graciously whenever possible, and be more consistent
with our dealing with exceptions. So, I thought we could have
something like:
+ Sanity checks inside the code (a la Monotone)
+ Review the use of exception throwing, and maybe start catching
more of them
+ Isolate the filesystem handling code and make it more robust.
Maybe something like a FileSystem class, or a namespace
apso::filesystem. This part of the code should:
. Automaticaly create of entire paths if necessary
. Give the caller some feedback (permission denied, file found
where a directory was expected, etc)
. Rollback partially done operations if it can't be done entirely
(if we created a/b/c/, but couldn't write to a/b/c/d, then
delete a, b and c)
I'd like to be able to do this:
FileSystem::file_exists(path_list);
And that function will take care of all that is needed. Maybe we
could pass the required permissions for the paths and files in the
path_list also.
- Start using a logging mechanism instead of writing to stdout. I
though of making it pluggable through an abstract class, pretty much
as Cryptengine and VersionControl. That would be the "Logger" class.
As a first attemt to implement a logger, we could use a very simple
logging system, like slogcxx:
http://vislab-ccom.unh.edu/~schwehr/software/slogcxx/
The reason for choosing it is the same behind the coice of Nettle:
simplicity and ease of use.
Any comments on these?
For 0.3.0, we will also need:
- A test framework. Caio is also working on that. BTW, Caio, could you
say more about your ideas for tests?
J.
- [Apso-devel] Logging system and defensive code (for Apso 0.3.0),
Jeronimo Pellegrini <=