Summary: | [dstore] error logged when user cannot create folder/File under root | ||
---|---|---|---|
Product: | [Tools] Target Management | Reporter: | Rupen Mardirossian <rupenm> |
Component: | RSE | Assignee: | David McKnight <dmcknigh> |
Status: | CLOSED FIXED | QA Contact: | Martin Oberhuber <mober.at+eclipse> |
Severity: | trivial | ||
Priority: | P5 | CC: | dmcknigh |
Version: | 2.0 | ||
Target Milestone: | 2.0.1 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: | |||
Bug Depends on: | 196317 | ||
Bug Blocks: |
Description
Rupen Mardirossian
2007-07-10 13:50:04 EDT
If you connect to the host as "root", then this does not fail. You're not able to create folders or files under / because you don't have authority to do that. Is the reported problem that the error logging is unneeded? I was assuming that logging is uneeded due to the user being informed of the error in the view. Is this correct? Well, the logging probably isn't needed and this log doesn't occur for ftp and ssh. FTP and SSH throw RemoteFileSecurityExceptions which wrapper the service-layer exception. Dstore doesn't throw service-layer exceptions so we have to generate an exception - in this case we use SystemMessageException. The wizard takes any SystemMessageException it catches and logs them, which is why we see the log for dstore but not for the other services. The SystemMessageException is necessary but I can stick that in a RemoteFileSecurityException to make this consistent with the other services. I've committed the change to wrapper with the security exception (for the sake of consistency). Do we really need to log any SystemMessageException we get, especially in wizards and dialogs? - We have bug #142184 open for a very similar issue. At this point I'd like to understand why SystemMessageException is logged to the error log even if it's already being shown to the user by means of a dialog. (In reply to comment #5) > Do we really need to log any SystemMessageException we get, especially in > wizards and dialogs? - We have bug #142184 open for a very similar issue. > I don't see the need to log this. > At this point I'd like to understand why SystemMessageException is logged to > the error log even if it's already being shown to the user by means of a > dialog. > I don't know why it is logged. I'd guess the logging is there to handle unexpected situations. (In reply to comment #6) > I don't know why it is logged. I'd guess the logging is there to handle > unexpected situations. I'm a big friend of logging stuff in order to ease problem determination; just tell a customer "send us the logs" and you'll know what went wrong. But I think that such kind of Logs should be hidden from the user. Having stuff in the "PDE Errorlog" View aka Eclipse Log often disturbs users and makes them lose confidence in the product, since they think something went wrong. But in fact, SystemMessageException is typically used to give feedback about the normal outcome of an operation e.g. could not rename a file because it was read only. This is not an unexpected situation and should thus not be logged to the Errorlog. Same for feedback about invalid user input. Isn't there a special RSE Log which is typically not visible to the user and configurable via the Preferences? If we think we must log SystemMessageException (which I personally do NOT think we should) we could perhaps log it there. And organize the Log as a bounded buffer so it doesn't grow to the 100 Megabyte Range. Thoughts? If we look at the code in SystemNewFolderWizard, the non-SystemMEssageExceptions are logged via SystemBasePlugin.logDebugMessage(). I suppose it would make sense to do the same for the SystemMessageExceptions. This sounds like a good idea, but I'm afraid that messages logged with logDebugMessage() will never actually be logged because the logging level Logger.DEBUG cannot be set any more in the UI (Only levels ERROR, WARNING and INFO are now available). Dave D made this change because with level DEBUG it was not possible to use RSE any more since it became too slow. Again, the question is what do we log and where? - I filed bug #196317 (assigned to Dave D) to continue this discussion. When that one is fixed, wrappering the SystemMessageException should be revisited. I see that this bug has been resolved/fixed although there is still a log appearing as initially stated when I opened the bug... getting lost in all the comment I don't know if that is the behaviour that was decided on. I guess what im asking is if it is ok to close this bug? If you still see the original issue (something logged to the PDE Errorlog although a message is already shown to the user), then this is not fixed --> REOPENING. I think this should probably be marked as a duplicate of bug 196317, asking that SystemMessageException should not be logged to the PDE Errorlog but somewhere else instead. Rupen, I tried this but I'm not seeing the error logged. Could you list the steps you took to reproduce this? The logging is no longer present. I will close the bug. I apologize for any confusion. Thank you, Rupen closing. |