2010/3/17 Martin Paljak <mar...@paljak.pri.ee>:
> On Mar 16, 2010, at 21:57 , Andreas Jellinghaus wrote:
>> Am Dienstag 16 März 2010 18:08:44 schrieb Martin Paljak:
>>> On Mar 16, 2010, at 18:52 , Viktor TARASOV wrote:
>>>> Probably the debug line content can be made configurable?
>>>> I mean to make optional 'pid', 'time', 'process name', 'line', ...
>>>
>>> Eventually the debug information coming from "the wild" should look the
>>> same.
>>>
>>> But something like a "developer mode" can be useful. Don't know if it could
>>> be tied to (N)DEBUG.
>>
>> please: no compile time setting. that way distributions will always compile
>> it the wrong way and generate the logs with too little or too much
>> information. it wouldn't be hard to make it runtime configureable...
> That's why I'm reluctant to make it easily changeable, via whatever method, 
> the worst being a "user definable" (compare to debug level 99 "chicken 
> sacrifice myth")
>
> Eventually the distributions do what they think is right if the information 
> is available about "what is right" and if they still do something that has a 
> "DO NOT DO THIS" sign attached, they probably have a very good reason.
>
> For me, the log format is OK, but a small script snippet in the wiki to 
> remove the verbose information that makes diffing complicated would be a nice 
> extra.
>
> An undocumented #define to tweak the log output in "developer mode" would 
> also be an option.

Another solution I use for pcsc-lite and libccid is to use an
environment variable like PCSCLITE_DEBUG to activate debug in
libpcsclite.
- The user do not have to be root and edit a configuration file.
- The user do not have to change a configuration file back to normal
- The configuration is only for one use in one shell. Not for the
entire system (in a multi-user system)

We could have the same for OpenSC. Something like:
$ export OPENSC_DEBUG=devel
to suppress time and line numbers.
Or use:
$ export OPENSC_DEBUG_FORMAT=pid:time:processname:line

Or maybe look at something like log4c [1] (never used myself).

bye

[1] http://log4c.sourceforge.net/

-- 
 Dr. Ludovic Rousseau
_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to