Hi! I've implemented a low-level equivalent of this functionality and commited to trunk. #include <y2util/y2changes.h> This provides 2 functions: y2useritem(format, args...) Function to log an item entry (system action) into the user-level action log y2usernote(format, args...) Function to log a note entry (additional information) into the user-level action log The similar builtins are available for YCP. The values are written to /var/log/YaST2/y2changes log. Comments welcome! Stano Dňa Wednesday 06 August 2008 16:29:00 Martin Vidner ste napísal:
Dear hackers,
you are all admins of your own workstations, I believe. Have you ever wondered what YaST did to your system? Or even what *you* did to your system a week or a month ago?
Please have a look at your y2log now: sudo less /var/log/YaST2/y2log The information is (mostly) there, but it is buried in piles and heaps of debugging information.
So yes, as if you did not have enough features to implement already, I am asking you for more. But the users will love it.
Please take one (or all) of your modules and put in log messages using the API below. Presumably they are already there, using y2milestone.
ALog stands for Admin's log, to remind you who the reader is.
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")
A prototype is in SVN already: http://svn.opensuse.org/svn/yast/trunk/yast2/library/log/src/ALog.ycp
The interface is not set in stone (yet). Please comment and let's find a design that is useful and easy to use.
Open questions:
- actual log format
References:
- https://keeper.novell.com/sxkeeper/feature/303700?contenttype=text/html - https://keeper.novell.com/sxkeeper/feature/100386?contenttype=text/html - related log in zypp: http://lists.opensuse.org/zypp-devel/2008-07/msg00043.html
-- Martin Vidner, YaST developer http://en.opensuse.org/User:Mvidner
Kuracke oddeleni v restauraci je jako fekalni oddeleni v bazenu
-- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org