Shawn Walker wrote:
John Rice wrote:
Shawn Walker wrote:
John Rice wrote:
Shawn Walker wrote:
John Rice wrote:
Hi - this webrev adds logging handlers to the PM and UM. For now they are just outputting to tmp files:

/var/tmp/packagemanager_info.log
/var/tmp/packagemanager_error.log
var/tmp/updatemanager_info.log
/var/tmp/updatemanager_error.log

Post 2010.03 we can look at hooking them into the GUI so the user can view them directly from the GUI, but this will be tracked as a separate enhancement from this bug.

http://cr.opensolaris.org/~jmr/pm_12240_pm_logging_10Dec_940pm/
12240 PM / UM need to intercept and display client messages

The only thing I'd like to see is a suggestion by the GUI to check these log files for more information when operations fail.

Shawn - we need any API calls which emit Errors to give an appropriate return code, if they are not going to throw an Exception. Then we know

What does "return code" mean here? As I noted before, you already know if something is an "info" message, "warning" message, or "error" message based on the message context which is provided to you.
If the API cannot throw an exception then it needs to return a value to us we can check if we want to flag that an error or wraning has been logged. We can't go and start parsing the output of the log, to decide when we should flag something to the user.

I'd like to assume that the GUI should not be conditionally deciding whether or not to show messages to the user based on anything other than whether something is a warning, error, debug, or info, which it can get today.
Sure that's the plan.

Reading the logging doc, I had not realized we could add multiple handlers, so we can use this mechanism to add a gui_handler in addition to the file handler and have it raise the appropriate status bar error notification. My misunderstanding.

Let's just start simple and if we find that we absolutely must do something more complex, we can do that then.
Sure, so no need for the API to return anything. What we do need to do is to make sure the messages are generic (not CLI specific) and give users enough context to understand where they have come

As you said, this is all post 2010.03 anyway.
Sure.

Cheers,

_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to