On Wed, Aug 06, 2008 at 05:53:58PM +0200, Arvin Schnell wrote: > On Wed, Aug 06, 2008 at 05:41:49PM +0200, Martin Vidner wrote: > > On Wed, Aug 06, 2008 at 04:57:13PM +0200, Michael Andres wrote: > > > On Wed, Aug 06, Martin Vidner wrote: > > > > ALog::Item("/etc/ntp.conf: added 'server ntp.example.org'") > > > > ALog::Item("enabled /etd/init.d/ntp") > > > > ALog::Item("started /etd/init.d/ntp") > > > > > > > > ALog::CommitPopup() > > > > will lead to ALog::Note("set up ntp from local server") > > > > > > Isn't this what the loglevel 6 (E_USR) was intended for? An absract of > > > changes done to the system which is also loged into a separate file. > > > > Yes. > > > > The basic requirement is simple: better logging. Naturally the > > design is simple too: a function for the better logging. (I put it > > into a namespace to make room for its brother, a commit message from > > the admin.) E_USR and analogically y2user(fmt, ...) seems to imply > > the constraints shared by the other logging functions: the same log > > file, the same format... > > Log file and format should be possible to change. > > The problem with ALog::Item is that it doesn't understand %1 > syntax. Always using sformat is clumsy. > > Also ALog::Item is not accessible from C++ (in case anybody needs > that). Access from libstorage seems idealistic since libstorage > uses limal/blocxx stuff for logging.
Since I now have a related feature (#305159) I had a look at the feature requests (#100386 and #303700). If logging is really required on such a detailed level then the logging has to be done in libstorage (C++) since the YCP code doesn't have that detailed knowledge. Callbacks would be another possibility. But I suppose logging is also required when libstorage is used by other programs so callbacks would only move the problem to those programs. Have a nice weekend Arvin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]