Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add back and fix log flags in sidecar #452

Merged
merged 8 commits into from
Nov 20, 2024
4 changes: 4 additions & 0 deletions cmd/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@ module.exports = async (ipc, argv = Bare.argv.slice(1)) => {
description(usage.descriptions.sidecar),
flag('--mem', 'Memory mode: RAM corestore'),
flag('--key <key>', 'Advanced. Switch release lines'),
flag('--log-level <level>', 'Level to log at. 0,1,2,3 (OFF,ERR,INF,TRC)'),
flag('--log-labels <list>', 'Labels to log (internal, always logged)'),
flag('--log-fields <list>', 'Show/hide: date,time,h:level,h:label,h:delta'),
flag('--log-stacks', 'Add a stack trace to each log message'),
flag('--dht-bootstrap <nodes>').hide(),
runners.sidecar(ipc)
)
Expand Down
4 changes: 3 additions & 1 deletion cmd/sidecar.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ module.exports = (ipc) => async function sidecar (cmd) {
if (cmd.flags.mem) print(ansi.green('Memory Mode On') + ansi.gray(' [ --mem ]'), 0)
print('\n========================= INIT ===================================\n')

Bare.argv.splice(1, 0, '--log', ...Bare.argv.filter((arg) => arg.startsWith('--log')))
Bare.argv.splice(Bare.argv.indexOf('sidecar'), 1)
Bare.argv.splice(1, 0, '--sidecar', '--log')

require('../sidecar')

print('\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n')
Expand Down
2 changes: 2 additions & 0 deletions def/pear.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ module.exports = [
flag('--run').hide(), // appling legacy
flag('--sandbox').hide(), // appling legacy
flag('--appling').hide(), // appling legacy
flag('--key <key>', 'Advanced. Switch release lines').hide(),
flag('--mem', 'Memory mode: RAM corestore').hide(),
flag('--dht-bootstrap <nodes>').hide()
]