I have a small java application running inside of docker. The application is a Dropwizard application, meaning it has java classes that log with log4j, and web endpoints, (JaxRS) that has request logging capability.
Now, I want to forward my container logs to Splunk. The issue is I really want them split into two indexes; one for the application log, and one for the request log. We can call the indexes cool_app
and cool_req
.
Is there any way of doing this? Starting my dropwizard application causes it to output both the application log and request log to the stdout
. (Whilest also logging to two files)
I've tried the docker logdriver but it seems like it's only made for one index.
I might add that it's easy to separate the logs by regEx if that would be an option