1
1
import std/ [os, strutils, sugar, strformat, macros, macrocache, sequtils, jsonutils]
2
2
export jsonutils
3
- import nimib / [types, blocks, docs, boost, config, options, capture, jsutils]
3
+ import nimib / [types, blocks, docs, boost, config, options, capture, jsutils, logging ]
4
4
export types, blocks, docs, boost, sugar, jsutils
5
5
# types exports mustache, tables, paths
6
6
@@ -26,25 +26,25 @@ template nbInit*(theme = themes.useDefault, backend = renders.useHtmlBackend, th
26
26
nb.thisFile = instantiationInfo (- 1 , true ).filename.AbsoluteFile
27
27
else :
28
28
nb.thisFile = nb.srcDir / thisFileRel.RelativeFile
29
- echo " [nimib] thisFile: " , nb.thisFile
29
+ log " thisFile: " & $ nb.thisFile
30
30
31
31
try :
32
32
nb.source = read (nb.thisFile)
33
33
except IOError :
34
- echo " [nimib] cannot read source"
34
+ log " cannot read source"
35
35
36
36
if nb.options.filename == " " :
37
37
nb.filename = nb.thisFile.string .splitFile.name & " .html"
38
38
else :
39
39
nb.filename = nb.options.filename
40
40
41
41
if nb.cfg.srcDir != " " :
42
- echo " [nimib] srcDir: " , nb.srcDir
42
+ log " srcDir: " & $ nb.srcDir
43
43
nb.filename = (nb.thisDir.relativeTo nb.srcDir).string / nb.filename
44
- echo " [nimib] filename: " , nb.filename
44
+ log " filename: " & nb.filename
45
45
46
46
if nb.cfg.homeDir != " " :
47
- echo " [nimib] setting current directory to nb.homeDir: " , nb.homeDir
47
+ log " setting current directory to nb.homeDir: " & $ nb.homeDir
48
48
setCurrentDir nb.homeDir
49
49
50
50
# can be overriden by theme, but it is better to initialize this anyway
0 commit comments