开发者

Logging to multiple targets with Elmah

I have the following Elmah configuration:

<elmah>
    <security allowRemoteAccess="0" />
    开发者_JS百科<errorLog type="Elmah.SqlErrorLog, Elmah" connectionStringName="Elmah.Sql"  />
    <errorLog type="Elmah.MemoryErrorLog, Elmah" size="50"  />
    <errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="~/App_Data" />
</elmah>

But I get this error when I run my application:

Sections must only appear once per config file. See the help topic for exceptions.


You can only use one of each type of logger in Elmah. What you specify in the <errorLog> section is where Elmah logs it's data.

When you retrieve errors using the /elmah.axd handler it retrieves this data from the data source type specified in the <errorLog> section. It doesn't really make sense to have more than one, or at least it's not designed that way.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜