【发布时间】: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