SOLIDWORKS-PDM-API-SDK icon indicating copy to clipboard operation
SOLIDWORKS-PDM-API-SDK copied to clipboard

DictionaryLogger : A new way of logging

Open AmenJlili opened this issue 1 year ago • 2 comments
trafficstars

Some thoughts about logging in the SDK just to start conversation.

Background: I log my exceptions to the PDM file system. This has the unfortunate consequence of requiring check in and check outs and it is some what annoying to write that code. I have been thinking about a new type of logging called Dictionary logger. This can be added to the PDMSDK. Features: The Dictionary Logger would use a PDM dictionary as storage (No need for check in or check out). AddInBase.Identity.Name and Version can be used to name the dictionary. The Dictionary Logger can be easily flushed. This is concerning as to how this affects PDM in terms of performance. Imagine if you had have thousands of logs. A Simple UI can be developed to show the logs in the administration tool. The Logger is perfect for logging stuff during common hooks such as check-in or check outs without having to show error message boxes to the user.

AmenJlili avatar May 21 '24 19:05 AmenJlili

I figured the UI would look something like this: It sounds like it is a lot of work. image

AmenJlili avatar May 29 '24 18:05 AmenJlili

It might be interesting to use the Winforms control from this:

https://github.com/gragra33/LogViewerControl

AmenJlili avatar May 29 '24 18:05 AmenJlili