Skip to content

Commit 23950ef

Browse files
committed
Reduce dvLow level debug verbosity
1 parent bfec63e commit 23950ef

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/ntangle.nim

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ proc orgRemoveEscapeCommas(line: string): string =
278278

279279
proc lineAdjust(line: string, indent: int): string =
280280
## Remove extra indentation from ``line``, and append it with newline.
281-
dbg "[lineAdjust] line={line}"
281+
dbg "[lineAdjust] line={line}", dvHigh
282282
result =
283283
if indent == 0:
284284
line & "\n"
@@ -357,7 +357,7 @@ proc getHeaderArgs(s: string): LangAndArgs =
357357
headerArgs: seq[string] = @[]
358358
headerArgPair: string
359359
lang: string
360-
dbg "spaceSepParts: {spaceSepParts}"
360+
dbg "spaceSepParts: {spaceSepParts}", dvHigh
361361
if spaceSepParts.len >= 3 and
362362
spaceSepParts[0].toLowerAscii() == "#+property:":
363363
doAssert spaceSepParts[2][0] == ':'
@@ -415,8 +415,9 @@ proc lineAction(line: string, lnum: int) =
415415
updateHeaderArgsDefault()
416416
let
417417
(haType, haLang, haArgs) = line.getHeaderArgs()
418-
dbg "[line {lnum}] {line}"
419-
dbg "getHeaderArgs: line {lnum}:: {haType}, {haLang}, {haArgs}"
418+
dbg "[line {lnum}] {line}", dvHigh
419+
if haType != haNone:
420+
dbg "getHeaderArgs: line {lnum}:: {haType}, {haLang}, {haArgs}"
420421
if haType in {haPropertyKwd, haPropertyDrawer, haPropertyDrawerAppend}:
421422
dbg "Property header-args found [Lang={haLang}]: {haArgs}"
422423
parseTangleHeaderProperties(haArgs, lnum, haLang, false)
@@ -426,7 +427,7 @@ proc lineAction(line: string, lnum: int) =
426427
linePartsLower = lineParts.mapIt(it.toLowerAscii.strip())
427428
if firstLineSrcBlock:
428429
dbg " first line of src block"
429-
dbg "line {lnum}: bufEnabled: {bufEnabled} linePartsLower: {linePartsLower}"
430+
dbg "line {lnum}: bufEnabled: {bufEnabled} linePartsLower: {linePartsLower}", dvHigh
430431
if bufEnabled:
431432
if (linePartsLower[0] == "#+end_src"):
432433
bufEnabled = false

0 commit comments

Comments
 (0)