Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Jonesy
Copy link
Contributor

@Jonesy Jonesy commented Dec 8, 2023

Fixes #94

Description

Adds the ability to log to stdout when the --debug flag is added to any command. This adds 3 new global methods to log, which are just some simple syntactic sugar around Go's std.log module.

pkg.Info(msg), pkg.Warn(msg) and pkg.Error(msg) are available and will print any messages with a pre-formatted debug log. This is useful for troubleshooting with a client or during development. All the the core packages have logs added and more can written as needed (see issue checklist)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Documentation (non-breaking change with enhancements to documentation)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have checked that unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

@ikethecoder ikethecoder merged commit bc18d23 into main Jan 11, 2024
@ikethecoder ikethecoder deleted the feature/debug-output branch January 11, 2024 09:33
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

Successfully merging this pull request may close these issues.

Add debug mode

4 participants