Skip to content

Commit

Permalink
Allow choice of logging verbosity
Browse files Browse the repository at this point in the history
  • Loading branch information
xsduan committed Nov 25, 2018
1 parent 57ff98e commit 431aa01
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions config/default-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ database: db.sqlite
# which directory to keep x2i keys (sub dirs.data)
x2i: x2i

# logging level; see npmlog.level
level: info

# embed options (ie the fancy posts only bots can do)
# they mess with e-readers and logging apparently so you might want to turn it
# off if that's a thing you need to worry about
Expand Down
1 change: 1 addition & 0 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ npmlog.style = new Proxy(npmlog.style, {
get: (o, k) => o[k] || o.info,
});
npmlog.enableColor();
npmlog.level = c.has("level") ? c.get("level") : "info";

function splitPrefix(status: string): [string, string] {
const sepIndex = status.indexOf(":");
Expand Down

0 comments on commit 431aa01

Please sign in to comment.