final String ts = new SimpleDateFormat("yyyyMMdd'T'HHmmss.SSS").format(new Date());
final String pid = ManagementFactory.getRuntimeMXBean().getName().split("@", 2)[0];
final Path directory = Paths.get(System.getProperty("logDir", "/tmp/helios-test/log/"));
final String filename = String.format("%s-%s-%s.log", ts, name, pid);
final Path file = directory.resolve(filename);
final PatternLayoutEncoder ple = new PatternLayoutEncoder();
ple.setContext(context);
ple.setPattern("%d{HH:mm:ss.SSS} %-5level %logger{1} %F:%L - %msg%n");
ple.start();
fileAppender.setEncoder(ple);
fileAppender.setFile(file.toString());
fileAppender.setContext(context);
fileAppender.start();
rootLogger.setLevel(Level.DEBUG);