Skip to content

Commit

Permalink
Merge pull request #448 from owasp-noir/improve-no-log
Browse files Browse the repository at this point in the history
Improve --no-log flag
  • Loading branch information
hahwul authored Nov 6, 2024
2 parents 2f35d95 + c7b5b72 commit 233b2c4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/models/logger.cr
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ class NoirLogger
end

def heading(message)
if @no_log
return
end

prefix = "".colorize(:yellow).toggle(@color_mode)
STDERR.puts "#{prefix} #{message}"
end
Expand Down
5 changes: 4 additions & 1 deletion src/noir.cr
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ if noir_options["exclude_codes"] != ""
end

# Run Noir
banner()
if noir_options["nolog"] == false
banner()
end

app = NoirRunner.new noir_options
start_time = Time.monotonic

Expand Down

0 comments on commit 233b2c4

Please sign in to comment.