简体   繁体   中英

StackHunter remote error logging when not in a Servlet Container

I correctly installed StackHunter server, now I need to test it by throwing an error in my Java Desktop application.

According to documentation all I need is to:

Not in a Servlet Container?

If you're not running in a servlet container, you can log exceptions using the API directly:

 com.stackhunter.client.StackHunter.logException(Throwable) 

Or, by using Log4J or Logback, after initializing the API:

 com.stackhunter.client.StackHunter.init() 

however using

StackHunter.logException(new Exception("test error..."));

does nothing, that's quite reasonable considering I would need to set the password and remote host programatically first, but where and how?

Apparently there's no documentation whatsoever in the official website for a simple programatical way to setup a desktop application to send an exception.

You can find the support pages at https://stackhunter.com/support/ .

It sounds like you've already installed (and maybe even setup) the server: https://stackhunter.com/support/setup/install-stackhunter .

If that's the case, try setting up the client: https://stackhunter.com/support/setup/configure-clients .

Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM