gpt4 book ai didi

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

转载 作者:太空宇宙 更新时间:2023-11-04 13:38:18 25 4
gpt4 key购买 nike

我正确安装了 StackHunter 服务器,现在我需要通过在 Java 桌面应用程序中抛出错误来测试它。

根据documentation我所需要的只是:

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()

但是使用

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

什么都不做,考虑到我需要首先以编程方式设置密码和远程主机,这是相当合理的,但是在哪里以及如何设置?

显然,官方网站上没有任何文档说明如何以简单的编程方式设置桌面应用程序来发送异常。

最佳答案

您可以在 https://stackhunter.com/support/ 找到支持页面.

听起来您已经安装(甚至可能设置)服务器:https://stackhunter.com/support/setup/install-stackhunter .

如果是这种情况,请尝试设置客户端:https://stackhunter.com/support/setup/configure-clients .

希望这有帮助。

关于java - 不在 Servlet 容器中时 StackHunter 远程错误日志记录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31473863/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com