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

fix lib log config issue #1200

Merged
merged 2 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 2 additions & 5 deletions v2/pkg/runner/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,16 +165,13 @@ func ParseOptions() *Options {
// Check if stdin pipe was given
options.Stdin = fileutil.HasStdin()

// Read the inputs and configure the logging
options.configureOutput()

if options.Version {
gologger.Info().Msgf("Current Version: %s\n", version)
gologger.Info().Msgf("Subfinder Config Directory: %s", configDir)
os.Exit(0)
}

options.preProcessOptions()
options.preProcessDomains()

if !options.Silent {
showBanner()
Expand Down Expand Up @@ -235,7 +232,7 @@ func listSources(options *Options) {
}
}

func (options *Options) preProcessOptions() {
func (options *Options) preProcessDomains() {
for i, domain := range options.Domain {
options.Domain[i], _ = sanitize(domain)
}
Expand Down
1 change: 1 addition & 0 deletions v2/pkg/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ type Runner struct {
// the configuration options, configuring sources, reading lists
// and setting up loggers, etc.
func NewRunner(options *Options) (*Runner, error) {
options.configureOutput()
runner := &Runner{options: options}

// Check if the application loading with any provider configuration, then take it
Expand Down