Showing results for 
Show  only  | Search instead for 
Did you mean: 

This product reached the end of support date on March 31, 2021.

Dynatrace Application Monitoring Plugin: Write incident details to custom file system location


Hello all,

I'm attempting to create a plugin that writes details of triggered incidents to a custom Windows file system location. However, the logging mechanism seemed to be directing the plugin logs to the default logs location instead <dt install>\log\server\ instead, including my custom implementation. Is it possible for Dynatrace to write to a customized file system location instead? If yes, how do I do it?

The code in question:

private static final Logger customFileLogger = Logger.getLogger("Alert Logger");

FileHandler fh;

fh = new FileHandler("E:/dynatrace/DynatraceAlerts2.log", 8096, 1, true);
customFileLogger.addHandler(fh); SimpleFormatter formatter = new SimpleFormatter();

// Test logging output"TestLog");

Dynatrace Guru
Dynatrace Guru

Hi. I discussed this internally. Everything you log through java.util.logger will end up in the Collectors log directory. If you want to change that directory in general you can modify the log directory for the Collector in general - which means all logs go to a different location. If you really want a custom file on a total different location then the only other option is that you are not using java.util.Logger but a different mechanism, e.g: direct file output to bypass our Collector logging mechanism



Thanks Andi,

I guess I'll implement a custom logging mechanism for my purpose then, probably log4J.

See Hua

Hi Team,

We have this plugins into production? I interested to check in my account.