bruno-garcia / log4net.ElasticSearch

log4net appender to ElasticSearch
https://bruno-garcia.github.io/log4net.ElasticSearch/
Other
220 stars 92 forks source link

Fields mismatch #100

Closed ghost closed 5 years ago

ghost commented 6 years ago

Hello! I'm using log4net.ElasticSearch with log4net.ElasticSearch-AWS I have ES AWS service.

Maybe you know why I'm getting some additional fields in es:

{
    "_index": "log-2018.06.01",
    "_type": "uwLogEvent",
    "_id": "9nUZu2MBci37DUwTKSUS",
    "_score": 1,
    "_source": {
        "logDate": "2018-06-01T11:26:11.6247960Z",
        "thread": "5",
        "executingAssembly": null,
        "version": null,
        "logLevel": "INFO",
        "logger": "MyLogger",
        "message": """INFO: Incoming POST http://localhost/values Request: {"data":{ "id":"1"}""",
        "exception": null,
        "environment": null,
        "host": "ANTON-PC",
        "originalCallerId": null,
        "userAgent": null,
        "page": null,
        "remoteIP": null,
        "threadId": null,
        "directCallerId": null,
        "httpMethod": null,
        "resourceName": null,
        "requestFormat": null,
        "webServiceVersion": null,
        "logSourceName": null,
        "logModelKey": null,
        "taskFriendlyID": null,
        "hostProcessGuid": null,
        "responseTime": null,
        "responseStatusCode": null
    }
}

Some of this fields are not in logEvent class and vice versa. Most important for me to get properties from logEvent.

Looking forward for your reply. Best regards!

jptoto commented 6 years ago

@antonkorovaikin off the top of my head I don't know why you'd get extra data except to guess that amazon is adding it in their hosted instance. I will try to replicate this issue on my side and let you know if I can tell what it is.