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");
fh = new FileHandler("E:/dynatrace/DynatraceAlerts2.log", 8096, 1, true);
customFileLogger.addHandler(fh); SimpleFormatter formatter = new SimpleFormatter();
// Test logging output
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