// If neither traceFile, nor logWriter, nor traceDirectory are set, then null is returned.
static LogWriter computeDncLogWriterForNewConnection(PrintWriter logWriter, String traceDirectory, String traceFile, boolean traceFileAppend, int traceLevel, String logWriterInUseSuffix, int traceFileSuffixIndex) throws SqlException {
int globaltraceFileSuffixIndex = Configuration.traceFileSuffixIndex__++;
// compute regular dnc log writer if there is any
LogWriter dncLogWriter = computeDncLogWriter(logWriter, traceDirectory, traceFile, traceFileAppend, logWriterInUseSuffix, traceFileSuffixIndex, traceLevel);
if (dncLogWriter != null) {
return dncLogWriter;
}
// compute global default dnc log writer if there is any
dncLogWriter = computeDncLogWriter(null, Configuration.traceDirectory__, Configuration.traceFile__, Configuration.traceFileAppend__, "_global", globaltraceFileSuffixIndex, Configuration.traceLevel__);