Tracing debug/log from addin

Tracing debug/log from addin

Maxim-CADman77
Advisor Advisor
617 Views
4 Replies
Message 1 of 5

Tracing debug/log from addin

Maxim-CADman77
Advisor
Advisor

I'd like to know the correct way to trace debug/log from my addin.

 

l've already succeded with tracing in iLogic  (logger.debug...)

 

...and in plugin version (Debug.WriteLine ...+DebugView++ filter set to plugin's exe process).

 

I expected addin would behave like plugin (just set filter to inventor.exe) but there is nothing there...

Please vote for Inventor-Idea Text Search within Option Names

0 Likes
Accepted solutions (1)
618 Views
4 Replies
Replies (4)
Message 2 of 5

Maxim-CADman77
Advisor
Advisor
Accepted solution

On my config Debug.WriteLine works as expected only if DebugView++ was started with "Run as administrator".

Please vote for Inventor-Idea Text Search within Option Names

0 Likes
Message 3 of 5

Michael.Navara
Advisor
Advisor

There is no standard way to logging from add-in. iLogic has it's own logging system and plugin uses Debug.WriteLine method and somehow handles the listeners.

I usually use third party logging system log4net. It is very powerful and flexible system.

0 Likes
Message 4 of 5

Maxim-CADman77
Advisor
Advisor

@Michael.Navara 

What is the key feature of log4net in context of log from Inventor add-in.
It can filter out the given add-in only output from the complete inventor.exe output?

Please vote for Inventor-Idea Text Search within Option Names

0 Likes
Message 5 of 5

Michael.Navara
Advisor
Advisor

Key features for me are:

  • I can select from many Appenders. Because my applications (like product configurators) works in different environments (desktop Inventor, JobServer, Forge Design Automation) and share one code base (single bussines logic for all), I need to change logging behavior for each deployment.
  • When I need to analyze some issues, I can configure different logging level for each class or command. Usually I set logging level to warning and above, but for some classes I can set verbose logging to different target (different file)
  • Usually I use RollingFileAppender which can split logs to multiple files on its size, date, etc.

All of the above does not require any code change. All I want to achieve with configuration.

 

0 Likes