javadockertomcatperfino

How can i control Perfino agent logging behaviour


Is there any way of controlling or disabling the logging of perfino agent? Perfino agent stores log file inside docker container which it is run on, under /opt/namename/.perfino/log/<name_provided_in_VM_parameter>.log which is a problem in my use case. Container runs tomcat which stores application. Log doesn't seem to store anything useful or important as after I deleted it I've seen no issues inside perfino UI. I haven't seen anything about logging of agent in perfino documentation. The strangest thing about this issue is I noticed it on one application (Let's call it APP_1) , but on another one (Let's call it APP_2), using similar image with tomcat, it does not occur. Strangely changing JDK and tomcat version in APP_2 leads to generating troublesome log. I've tried using JDK 8 and tomcat 8.5 in APP_1 (since this configuration is used in APP_2 and it does not genereate log), but it does not change a thing. I've found a config file under /opt/namename/.perfino/config/g=<nameOfApplication>.cfg, but I've noticed no information about logging (It's not very readable, I assume it is not to be changed manually).

So after this a bit long introduction, my question is: Is there any way of controlling the logging of perfino agent? Maybe through logback or tomcat config since I see no way of configuration using perfino UI or setup.

Part of log file:

inst> com.perfino.agent.e.a.e.<init>(ejt:170)
inst> com.perfino.agent.e.a.e.<init>(ejt:153)
inst> com.perfino.agent.e.a.a(ejt:223)
inst> com.perfino.agent.e.i.transform(ejt:83)
inst> java.instrument/java.lang.instrument.ClassFileTransformer.transform(ClassFileTransformer.java:246)
inst> java.instrument/sun.instrument.TransformerManager.transform(TransformerManager.java:188)
inst> java.instrument/sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:563)
inst> java.management/sun.management.Util.newObjectName(Util.java:52)

Solution

  • You can disable logging by appending ,logEnabled=false to the -javaagent VM parameter.

    A different log file can be specified by appending ,logFile=<path to log file>.