logzio / logzio-logback-appender

Logback Appender that ships logs using HTTPs bulk
Apache License 2.0
25 stars 19 forks source link

Typify the log fields #31

Closed gabriele83 closed 7 years ago

gabriele83 commented 7 years ago

It needs a way to define the type of a field of the log, for example:

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.MDC;

public class LogzioLogbackExample {

    public static void main(String[] args) {
        Logger logger = LoggerFactory.getLogger(LogzioLogbackExample.class);

        MDC.put("CreateDate", new Date());
        logger.info("This log will hold the MDC data as well");
    }
}

I can't define CreateDate as Data field in the ElasticSearch model

roiravhon commented 7 years ago

Please use the in-app chat to get to support. They can set up the ES mapping for you so that the fields you like would be parsed as date.