Skip to content

Commit e5e0367

Browse files
committed
code: Add new flag log-level
1 parent b80748c commit e5e0367

3 files changed

Lines changed: 15 additions & 1 deletion

File tree

eask

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ yargs
4545
description: 'log without timestamps',
4646
type: 'boolean',
4747
})
48+
.option('log-level', {
49+
description: 'log with level',
50+
type: 'boolean',
51+
})
52+
.option('no-log-level', {
53+
description: 'log without level',
54+
type: 'boolean',
55+
})
4856
.option('proxy', {
4957
description: 'update proxy for HTTP and HTTPS to host',
5058
type: 'string',

lisp/_prepare.el

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@
100100
(defun eask-strict-p () (eask--flag "--strict")) ; --strict
101101
(defun eask-timestamps-p () (eask--flag "--timestamps")) ; --timestamps
102102
(defun eask-no-timestamps-p () (eask--flag "--no-timestamps")) ; --no-timestamps
103+
(defun eask-log-level-p () (eask--flag "--log-level")) ; --log-level
104+
(defun eask-no-log-level-p () (eask--flag "--no-log-level")) ; --no-log-level
103105

104106
;;; String (with arguments)
105107
(defun eask-proxy () (eask--flag-value "--proxy")) ; --proxy
@@ -119,6 +121,8 @@
119121
(when (eask-verbose) (setq eask-verbosity (eask-verbose)))
120122
(when (eask-timestamps-p) (setq eask-timestamps t))
121123
(when (eask-no-timestamps-p) (setq eask-timestamps nil))
124+
(when (eask-log-level-p) (setq eask-log-level t))
125+
(when (eask-no-log-level-p) (setq eask-log-level nil))
122126
(eask--add-proxy "http" (eask-proxy))
123127
(eask--add-proxy "https" (eask-proxy))
124128
(eask--add-proxy "http" (eask-http-proxy))
@@ -183,7 +187,8 @@ other scripts internally. See function `eask-call'.")
183187
(eask--form-options
184188
'("-g" "-f" "--depth" "--dev"
185189
"--debug" "--strict"
186-
"--timestamps" "--no-timestamps"))
190+
"--timestamps" "--no-timestamps"
191+
"--log-level" "--no-log-level"))
187192
"List of boolean type options")
188193

189194
(defconst eask--option-args

src/util.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ function _global_options(argv) {
6060
flags.push(def_flag(argv.debug, '--debug'));
6161
flags.push(def_flag(argv.strict, '--strict'));
6262
flags.push(def_flag(argv.timestamps, (argv.timestamps) ? '--timestamps' : '--no-timestamps'));
63+
flags.push(def_flag(argv['log-level'], (argv['log-level']) ? '--log-level' : '--no-log-level'));
6364
/* With arguments */
6465
flags.push(def_flag(argv.proxy, '--proxy', argv.proxy));
6566
flags.push(def_flag(argv['http-proxy'], '--http-proxy', argv['http-proxy']));

0 commit comments

Comments
 (0)