Hello, i'm working on preparing the implementation of dt java agent in production. Default-Logfilename with the pid looks not so nice for me. I would like to have a simple logfilename dt_(agentname).log and control this in size and number of files. In documentation i found the note, that rotation with adding suffix is done and also parameter logfilesize, but there is no documentation how to use the parameter.
Thanks for your help!
Michael
Answer by Guenter H. ·
Hi Michael,
great question -- that I asked engineering yesterday (Thankfully the gurus are just some meters away and I can bug them any time!), because I´m just reworking the Agent Configuration page. (Will be live some time today or tomorrow.)
With the Java Agent (and many others) it´s an option in the connection string.
Generically
-agentpath:<agentlib>=<parameter>[,<option>]
Example for a 32 bit instrumentation on Linux:
-agentpath:$DT_HOME/agent/lib/libdtagent.so=name=MyJavaApplication,server=mydtserver,logfilesize=50000000
Value is in bytes. Default is 10000000. (10MB) No unit, no spaces.
BTW: I tried %DT_HOME% in a Windows Tomcat instrumentation yesterday and couldn´t get it to work with all my best gurus around.
It did work when I put the environment variable in setenv.bat.
Hope this helps
G.
Answer by Joe H. ·
You might also find the following switches useful.
logfile=<filename> (this allows you to specify the filename)
logpath=<path> (specifies the path to where the log file will be written)
Just add these to the end of the -agentpath string after the logfilesize parameter. Order doesn't matter, all log switches are optional.
Answer by Guenter H. ·
Hi,
as you know from programmers, "tomorrow" is an elastic term, recurring forever and if one gives you a month/day date when he´ll be finished better ask for the year. ;-)
Saying that: I hoped to finish the Agent Configuration page tweaks last Thursday, but when I started to look around I found that the Java Agent Configuration page needed a rewrite / compaction / weeding even more badly, so I went ahead and did this dependent page first.
Also, I cross checked all the options with actual production code and worked with engineering to be sure I don´t miss anything and there is nothing outdated.
I just replaced in 6.1 and 6.2 what I had collected on the private space for the next version.
Sadly I currently don´t have the time to de-duplicate everything on the respective Agent pages for every techtype.
Hope that makes things clearer. Feedback is appreciated!
G.
JANUARY 15, 3:00 PM GMT / 10:00 AM ET