Skip to content

Commit

Permalink
Merge branch '6.0' of https://github.com/lucee/Lucee into 6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zspitzer committed Apr 10, 2021
2 parents 3e7d7ff + dc0ac78 commit ece0204
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions core/src/main/java/lucee/runtime/config/ConfigWebFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
import lucee.runtime.dump.TextDumpWriter;
import lucee.runtime.engine.CFMLEngineImpl;
import lucee.runtime.engine.ConsoleExecutionLog;
import lucee.runtime.engine.DebugExecutionLog;
import lucee.runtime.engine.ExecutionLog;
import lucee.runtime.engine.ExecutionLogFactory;
import lucee.runtime.engine.InfoImpl;
Expand Down Expand Up @@ -1909,6 +1910,7 @@ else if (!IOUtil.toString(exeLog, SystemUtil.getCharset()).equals(val)) {
if (!StringUtil.isEmpty(strClass)) {
try {
if ("console".equalsIgnoreCase(strClass)) clazz = ConsoleExecutionLog.class;
else if ("debug".equalsIgnoreCase(strClass)) clazz = DebugExecutionLog.class;
else {
ClassDefinition cd = el != null ? getClassDefinition(el, "", config.getIdentification()) : null;

Expand Down
7 changes: 5 additions & 2 deletions core/src/main/java/lucee/runtime/debug/DebuggerImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ public DebugEntryTemplate getEntry(PageContext pc, PageSource source) {
return getEntry(pc, source, null);
}

// add pages entry
@Override
public DebugEntryTemplate getEntry(PageContext pc, PageSource source, String key) {
lastEntry = System.currentTimeMillis();
Expand All @@ -184,6 +185,7 @@ public DebugEntryTemplate getEntry(PageContext pc, PageSource source, String key
return de;
}

// add page parts entry
@Override
public DebugEntryTemplatePart getEntry(PageContext pc, PageSource source, int startPos, int endPos) {
String src = DebugEntryTemplatePartImpl.getSrc(source == null ? "" : source.getDisplayPath(), startPos, endPos);
Expand Down Expand Up @@ -517,8 +519,6 @@ public Struct getDebuggingData(PageContext pc, boolean addAddionalInfo) throws D
int qrySize = 0;
Query qryPart = null;
if (hasParts) {
qryPart = new QueryImpl(PAGE_PART_COLUMNS, qrySize, "query");
debugging.setEL(PAGE_PARTS, qryPart);
String slowestTemplate = arrPages.get(0).getPath();
List<DebugEntryTemplatePart> filteredPartEntries = new ArrayList();
java.util.Collection<DebugEntryTemplatePartImpl> col = partEntries.values();
Expand All @@ -528,6 +528,9 @@ public Struct getDebuggingData(PageContext pc, boolean addAddionalInfo) throws D
}
qrySize = Math.min(filteredPartEntries.size(), MAX_PARTS);

qryPart = new QueryImpl(PAGE_PART_COLUMNS, qrySize, "query");
debugging.setEL(PAGE_PARTS, qryPart);

int row = 0;
Collections.sort(filteredPartEntries, DEBUG_ENTRY_TEMPLATE_PART_COMPARATOR);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected void _init(PageContext pc, Map<String, String> arguments) {
protected void _log(int startPos, int endPos, long startTime, long endTime) {

long diff = endTime - startTime;
LogUtil.log(ThreadLocalPageContext.getConfig(pc), Log.LEVEL_INFO, Controler.class.getName(),
LogUtil.log(ThreadLocalPageContext.getConfig(pc), Log.LEVEL_TRACE, Controler.class.getName(),
pc.getId() + ":" + pc.getCurrentPageSource().getDisplayPath() + ":" + positons(startPos, endPos) + " > " + timeLongToString(diff));
}

Expand Down

0 comments on commit ece0204

Please sign in to comment.