File tree 1 file changed +13
-4
lines changed
1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change
1
+ -- For most of these default configurations, we're aiming to log at a
2
+ -- 'debug'-style level of logging. For more console-oriented languages (e.g.
3
+ -- shell/python), we log to stderr, as this is often a standard way of producing
4
+ -- output which isn't part of the main program. For others (e.g. JavaScript), we
5
+ -- use a language-specific way, i.e. console.debug().
6
+ --
7
+ -- In general, we're trying to avoid the user of debugprint having to modify
8
+ -- their imports or other libraries in order to use any of these statements.
9
+ -- However, in a few cases, that might be needed. Any potential improvements to
10
+ -- this welcome.
11
+
1
12
local shell = {
2
13
left = ' >&2 echo "' ,
3
14
right = ' "' ,
@@ -10,14 +21,12 @@ local docker = vim.deepcopy(shell)
10
21
docker .left = " RUN " .. docker .left
11
22
12
23
local js = {
13
- left = ' console.log ("' ,
24
+ left = ' console.debug ("' ,
14
25
right = ' ")' ,
15
26
mid_var = ' ", ' ,
16
27
right_var = " )" ,
17
28
}
18
29
19
- -- still printing to stdout: dart, lua, make, vim
20
-
21
30
return {
22
31
[" bash" ] = shell ,
23
32
[" c" ] = {
@@ -66,7 +75,7 @@ return {
66
75
right_var = " ))" ,
67
76
},
68
77
[" make" ] = {
69
- left = ' \t @echo "' ,
78
+ left = ' \t @echo >&2 "' ,
70
79
right = ' "' ,
71
80
mid_var = ' "$(' ,
72
81
right_var = " )" ,
You can’t perform that action at this time.
0 commit comments