• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Dynamically attaching to a SmartInspect-enabled application?

 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is it possible to attach to an already running SmartInspect-enabled application, and alter the SI settings? Suppose there's a web app running on a production server; it may do production-level logging to a file. Now I discover that it's misbehaving, and I need to alter the logging levels to "debug" or something like that in order to get more information. But I don't want to restart the web app because I suspect that the erroneous behavior might disappear. Plus, I'd want to see the output in the viewer, so the app would need to send the logging info over TCP in addition to writing it to a file. Is that possible?
 
SmartInspect Support
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Ulf,

Yes, this is possible, but it works a bit differently from what you described. Instead of "attaching" to the application, you can just modify the SmartInspect configuration file the application uses (configuration files are optional, as configuring SmartInspect only takes 2 lines of code, but they can be really useful for added flexibility). SmartInspect comes with an optional class that can monitor the configuration file for changes, and automatically reload it when it's modified.

You can also enable or disable logging for specific logging sessions, which allows you to enable logging for just specific application modules or even just for specific users. You can of course also change the log level (globally or per session) depending on the level of information you need.

It's quite common to have a general production level configuration file (with disabled logging or logging of just errors and exceptions), and a second configuration file for debugging / live monitoring with more detailed log levels and different logging destinations (as, for example, the TCP protocol you mentioned).

Regards,
Dennis
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic