cancel
Showing results for 
Search instead for 
Did you mean: 

EFM and java logging settings

Level 3 Adventurer

EFM and java logging settings

Just looking for clarification on how to modify the log output for the EFM logs. Would I add lines similar to these to /etc/sysconfig/efm-3.1?

 

java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter

# Limit the message that are printed on the console to INFO and above.
java.util.logging.ConsoleHandler.level = CONFIG
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
java.util.logging.SimpleFormatter.format=%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS %4$s %2$s %5$s%6$s%n
3 REPLIES
EDB Team Member

Re: EFM and java logging settings

I think that would only affect the startup log output. Is that what you mean to change? When you start efm, you're starting an initial "launcher" sort of process that reads the properties file and uses info there to start the actual agent. To change things in the running agent, you can update this property:

 

# Extra information that will be passed to the JVM when starting the agent.
jvm.options=-Xmx32m

 

 

I don't think the logging properties you have there would work though, as efm creates its own logger, handler, etc, to write to the cluster.log file. If you'd like to be able to do more than just change the level of what is logged, please let your support contact know and we can get something filed to implement.

 

Cheers,

Bobby

 

Level 3 Adventurer

Re: EFM and java logging settings

Thank you, Bobby. Considering it uses java logging, I was hopeful it would be easy to change. I'm looking to filter logs through logstash into elasticsearch, but i'm unable to get a good "grep" of the messages because the initial timestamp does not follow ISO logging standards.

 

Best,
Larry

Highlighted
EDB Team Member

Re: EFM and java logging settings

Makes sense. The format is ""{0,date,short} {0,time,medium}" but that's a pain to parse.

 

We're open to making this configurable. Can you contact your support person so there's a ticket (can probably send the link to this discussion), and we can talk about how to expose this to the user? This is with no thought at all, but maybe we could add a property that lets you set the format string. That might a little developer-centric, but could provide examples in the documentation for it.

 

Cheers,

Bobby