简体   繁体   English

不在Servlet容器中时的StackHunter远程错误日志记录

[英]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. 我正确安装了StackHunter服务器,现在我需要通过在Java桌面应用程序中抛出错误来对其进行测试。

According to documentation all I need is to: 根据文档,我需要做的是:

Not in a Servlet Container? 不在Servlet容器中吗?

If you're not running in a servlet container, you can log exceptions using the API directly: 如果您不在servlet容器中运行,则可以直接使用API​​记录异常:

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

Or, by using Log4J or Logback, after initializing the API: 或者,在初始化API之后,通过使用Log4J或Logback:

 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/ . 您可以在https://stackhunter.com/support/上找到支持页面。

It sounds like you've already installed (and maybe even setup) the server: https://stackhunter.com/support/setup/install-stackhunter . 听起来您已经安装(甚至安装了)服务器: https : //stackhunter.com/support/setup/install-stackhunter

If that's the case, try setting up the client: https://stackhunter.com/support/setup/configure-clients . 如果是这种情况,请尝试设置客户端: https : //stackhunter.com/support/setup/configure-clients

Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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