in src/main/java/org/apache/sling/tracer/internal/LogTracer.java [161:194]
TracerContext getTracerContext(String tracerSetNames, String tracerConfig, Recording recording) {
//No config or tracer set name provided. So tracing not required
tracerConfig = trimToNull(tracerConfig);
tracerSetNames = trimToNull(tracerSetNames);
if (tracerSetNames == null && tracerConfig == null) {
return null;
}
List<TracerConfig> configs = new ArrayList<TracerConfig>();
List<String> invalidNames = new ArrayList<String>();
if (tracerSetNames != null) {
for (String tracerSetName : tracerSetNames.split(",")) {
TracerSet ts = tracers.get(tracerSetName.toLowerCase(Locale.ENGLISH));
if (ts != null) {
configs.addAll(ts.getConfigs());
} else {
invalidNames.add(tracerSetName);
}
}
}
if (!invalidNames.isEmpty()) {
LOG.warn("Invalid tracer set names passed [{}] as part of [{}]", invalidNames, tracerSetNames);
}
if (tracerConfig != null) {
TracerSet ts = new TracerSet("custom", tracerConfig);
configs.addAll(ts.getConfigs());
}
return new TracerContext(configs.toArray(new TracerConfig[configs.size()]), recording);
}