Skip to content

Commit

Permalink
debug print err
Browse files Browse the repository at this point in the history
  • Loading branch information
rjrodger committed Jan 14, 2021
1 parent f02405a commit b96eec2
Show file tree
Hide file tree
Showing 11 changed files with 4,747 additions and 4,654 deletions.
5 changes: 5 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 3.22.2 2021-01-14

* Debug option to print full error stacks regardless of logger


## 3.22.1 2020-12-10

* Flat logger shows Error callpoint.
Expand Down
1 change: 1 addition & 0 deletions lib/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ exports.delegate = function (fixedargs, fixedmeta) {
return delegate
}

// TODO: should be a configuration param so we can handle plugin name resolution
exports.depends = function () {
var self = this
var private$ = this.private$
Expand Down
5 changes: 5 additions & 0 deletions lib/logging.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ function make_logging() {
module.exports = make_logging

function flat_logger(entry) {
let opts = this.options()

var level_str = (entry.level_name + '').toUpperCase()
if (level_str.length < 5) {
level_str += '_'.repeat(5 - level_str.length)
Expand Down Expand Up @@ -120,6 +122,9 @@ function flat_logger(entry) {
]

this.private$.print.log(sb.join('\t').substring(0, entry.maxlen$ || 11111))
if(entry.err && opts.debug.print.err) {
this.private$.print.err(entry.err)
}
}

// TODO: make default in 4.x
Expand Down
2 changes: 1 addition & 1 deletion lib/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ var Common = require('./common')

var error = Error({ package: 'seneca', msgmap: ERRMSGMAP() })

module.exports = function (callmodule, defaults, orig_initial) {
module.exports = function resolve_options(callmodule, defaults, orig_initial) {
var sourcemap = {
argv: {},
env: {},
Expand Down
1 change: 0 additions & 1 deletion lib/plugin.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/plugin.js.map

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions lib/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ function api_use(callpoint: any, opts: any) {
ordu.operator('seneca_options', intern.op.seneca_options)
ordu.operator('seneca_complete', intern.op.seneca_complete)


// TODO: exports -> meta and handle all meta processing

ordu.add([
tasks.args,
tasks.load,
Expand Down
Loading

0 comments on commit b96eec2

Please sign in to comment.