【问题标题】:http extended logging format in weblogic 9.1 access logsweblogic 9.1 访问日志中的 http 扩展日志记录格式
【发布时间】:2011-01-07 07:55:41
【问题描述】:

我正在尝试在访问日志中记录经过身份验证的用户名。我能知道如何记录它吗?

我为此编写了我的自定义类。并将其添加到 weblogic 启动类路径中。启动 weblogic 时出现错误。 这是错误

<Error> <HTTP> <BEA-101231> <HTTP log file does not use version 1.0 of the Extended Log File format.> <Jan 7, 2011 1:07:22 PM GMT+05:30> <Error> <HTTP> <BEA-101234> <Attempting to initialize ExtendedLogFormat application specific header: x-MyCustomField. However, failed due to exception.>

有谁知道这个问题。请帮忙

这是我的课程

` 导入 weblogic.servlet.logging.CustomELFLogger; 导入 weblogic.servlet.logging.FormatStringBuffer; 导入 weblogic.servlet.logging.HttpAccountingInfo;

/* This example outputs the User-Agent field into a
 custom field called MyCustomField
*/

public class MyCustomField implements CustomELFLogger{

public void logField(HttpAccountingInfo metrics,
  FormatStringBuffer buff) {
  buff.appendQuotedValueOrDash(metrics.getRemoteUser());
  }
}

`

【问题讨论】:

    标签: java http logging https weblogic


    【解决方案1】:

    我得到了解决方案。需要使用用户定义的类生成 jar 文件,然后需要在 weblogic 启动类中加载这些文件。所以没有问题。

    但仍然无法在 http 标头中找到用户名和密码。

    【讨论】:

      【解决方案2】:

      使用大写的“x”(“X-MyCustomField”而不是“x-MyCustomField”)

      【讨论】:

        猜你喜欢
        • 2014-06-13
        • 1970-01-01
        • 1970-01-01
        • 2021-10-04
        • 2013-12-29
        • 1970-01-01
        • 2012-08-28
        • 1970-01-01
        • 2018-01-24
        相关资源
        最近更新 更多