private ActualStringLogger( FileSystemAbstraction fileSystem, String filename, int rotationThreshold, boolean debugEnabled) { this.fileSystem = fileSystem; this.rotationThreshold = rotationThreshold; this.debugEnabled = debugEnabled; try { file = new File(filename); if (file.getParentFile() != null) { fileSystem.mkdirs(file.getParentFile()); } instantiateWriter(); } catch (IOException e) { throw new RuntimeException(e); } }