Hi! Martin Paljak: > Privet, > > On 14.09.2009, at 14:57, Aktiv Co. Aleksey Samsonov wrote: >> Patch for /branches/martin/0.12 revision 3732 is in attachment: >> rollback check (ctx->debug >= level) in SC_FUNC_RETURN macro. >> Martin, could you please add it? > > Thanks for double-checking, applied/rolled back in r3733
In my patch http://www.opensc-project.org/pipermail/opensc-devel/attachments/20090914/45072333/attachment.txt there were not these http://www.opensc-project.org/opensc/changeset/3734 spaces. I'm trying to make these patches as convenient as possible to use. But it seemed that my patch was not convenient. Could you please tell because of what? > So, either: > - log level concept can be removed (0/1) altogether > - or levels can be better defined and limited (3, not more than 4 > levels with more well-defined purposes) and a SC_DEBUG macro with a > level parameter created. code in log.c checks for debug level > 0 so > redundant >= 1 style checks are scattered across files. > > Unlike long-running processes (servers) I have personally not found a > reason to have "some debug" when I really need "as much debug as > possible" from OpenSC, partly because I don't know which smaller than > 9 number would give not too much garbage but enough information to be > useful. In normal situations everything should just work and no debug > log generated at all, but when things break it is always the best to > have as much logs as possible. > > Thoughts? I consider, that different levels of debug prints are very useful. First of all developers need them, especially for developing of a new code, not for correcting mistakes. It is easy-to-use (handy) to see the log only from the level which you need or only of detail which you need. I think that in "core" files we have to more deliberate and better defined the output's level, but not to change the system and keep the levels up to 6. We may have defined from 0 to 6 levels, but for developers of card-drivers more than 6 levels may be allowed. Martin, if we replace everywhere sc_error to sc_debug, then how we provide details/reasons/tips to the user, and not just SC_ERROR_NOT_SUPPORTED (eg see src/pkcs15init/pkcs15-rtecp.c:rtecp_create_pin)? Thanks _______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel