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

Showable logging functions #78

Merged
merged 4 commits into from Feb 3, 2016
Merged

Showable logging functions #78

merged 4 commits into from Feb 3, 2016

Conversation

bitemyapp
Copy link
Contributor

Used SH for SHowable. Hopefully this is good enough.


-- | Generates a function that takes a 'Show a => a' and logs a 'LevelDebug' message. Usage:
--
-- > $(logDebug) "This is a debug log message"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add @since comments and do a minor version bump in the cabal file/changelog?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me know if this is satisfactory please :)

--
-- > $(logOtherSH "My new level") "This is a log message"
logOtherSH :: Text -> Q Exp
logOtherSH = logTH . LevelOther
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this supposed to be logTHShow?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sigh, yes, good catch. Fixed. Sorry about that :\

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NP, that's what code review is for :)

snoyberg added a commit that referenced this pull request Feb 3, 2016
Showable logging functions
@snoyberg snoyberg merged commit 83014b4 into kazu-yamamoto:master Feb 3, 2016
@snoyberg
Copy link
Collaborator

snoyberg commented Feb 3, 2016

Thanks!

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.

None yet

2 participants