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

[doc] showing how to use a custom logger #136

Merged
merged 2 commits into from
Jun 9, 2017
Merged

[doc] showing how to use a custom logger #136

merged 2 commits into from
Jun 9, 2017

Conversation

ufoot
Copy link
Member

@ufoot ufoot commented Jun 9, 2017

No description provided.

@ufoot ufoot added the docs Involves documentation label Jun 9, 2017
@ufoot ufoot added this to the 0.7.3 milestone Jun 9, 2017
buf = StringIO.new # Log messages should go there
Datadog::Tracer.log = Logger.new(buf) # Overriding the default tracer
Datadog::Tracer.log.info { "this is typically called by tracing code" }
puts buf.string # Print all our custom log content
Copy link
Contributor

Choose a reason for hiding this comment

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

should we use the buf.string example? isn't better to provide a base example to output to a different file?

Copy link
Member Author

Choose a reason for hiding this comment

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

👍 @palazzem indeed, I rewrote the example so that it uses a file

Copy link
Contributor

@palazzem palazzem left a comment

Choose a reason for hiding this comment

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

good to go for me!

@ufoot ufoot merged commit 3dbe8f8 into master Jun 9, 2017
@ufoot ufoot deleted the christian/doclog branch June 9, 2017 21:00
@ufoot ufoot modified the milestones: 0.7.3, 0.8.0 Jul 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Involves documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants