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

allow disabling log file output and creation of the results directory #181

Open
ZZiigguurraatt opened this issue Jan 12, 2025 · 0 comments

Comments

@ZZiigguurraatt
Copy link

Upon startup, chantools tries to create a directory $PWD/results, and then writes a file chantools.log inside of it. If $PWD is currently read only, we get an error:

tester@fc610f97347b:/$ chantools help
panic: failed to create log directory: mkdir ./results/: permission denied

goroutine 1 [running]:
main.setupLogging()
	github.com/lightninglabs/chantools/cmd/chantools/root.go:315 +0x185
main.init.func1(0xc0001d1d00?, {0x1a16674?, 0x4?, 0x1a16678?})
	github.com/lightninglabs/chantools/cmd/chantools/root.go:78 +0xd5
github.com/spf13/cobra.(*Command).execute(0xc000224b08, {0x2bd8560, 0x0, 0x0})
	github.com/spf13/[email protected]/command.go:836 +0x59b
github.com/spf13/cobra.(*Command).ExecuteC(0x2b5cf00)
	github.com/spf13/[email protected]/command.go:960 +0x389
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/[email protected]/command.go:897
main.main()
	github.com/lightninglabs/chantools/cmd/chantools/root.go:139 +0x55e
tester@fc610f97347b:/$ 

We need a command line option to disable log file output and creation of the results directory so that chantools can be used on read only filesystems on stateless devices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant