Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Use logrus for logging #24

Merged
merged 3 commits into from
Aug 10, 2018
Merged

Use logrus for logging #24

merged 3 commits into from
Aug 10, 2018

Conversation

temsa
Copy link
Collaborator

@temsa temsa commented Aug 9, 2018

adds log levels, cleanup a bit stdout and brings new CLI commands for logging:

$> ./gammaray -h
Usage of ./gammaray:
  -image string
    	analyze this docker image
  -log-as-json
    	detailed logs should be formated as JSON if true (default: false)
  -log-file string
    	in which file to put the detailed logs (default ".gammaray.log")
  -log-level string
    	minimal level that should be logged (default "info")
  -only-installed
    	force only installed module checking usage (default false: use it as the main strategy then use other fallbacks)
  -only-package-lock
    	force only <package-lock.json> usage (default false: use it as a fallback)
  -only-yarn-lock
    	force only <yarn.lock> usage (default false: use it as a fallback)
  -path string
    	path to installed Node package (locally or inside the container, depending if 'image' is provided)

@temsa temsa requested review from dgonzalez and Elexy August 9, 2018 14:29
@coveralls
Copy link

Pull Request Test Coverage Report for Build 83

  • 773 of 1019 (75.86%) changed or added relevant lines in 10 files are covered.
  • 115 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+1.1%) to 77.911%

Changes Missing Coverage Covered Lines Changed/Added Lines %
analyzer/analyzer.go 2 3 66.67%
versionformatter/versionformatter.go 19 20 95.0%
pathrunner/pathrunner.go 1 3 33.33%
vulnfetcher/ossvulnfetcher/osindexfetcher.go 6 10 60.0%
docker/docker.go 16 23 69.57%
main.go 16 35 45.71%
yarnlockparser/yarnlockparser.go 680 892 76.23%
Files with Coverage Reduction New Missed Lines %
main.go 1 61.25%
vulnfetcher/ossvulnfetcher/osindexfetcher.go 1 72.07%
versionformatter/versionformatter.go 113 77.66%
Totals Coverage Status
Change from base Build 79: 1.1%
Covered Lines: 2081
Relevant Lines: 2671

💛 - Coveralls

@temsa temsa merged commit 23998fb into master Aug 10, 2018
@temsa temsa deleted the use-logrus branch August 10, 2018 09:21
@temsa temsa mentioned this pull request Aug 10, 2018
@temsa temsa changed the title [Needs #22] Use logrus for logging Use logrus for logging Aug 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants