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

Document yes switch for custom (time) printer #4

Closed
mustardamus opened this issue Jan 14, 2018 · 2 comments
Closed

Document yes switch for custom (time) printer #4

mustardamus opened this issue Jan 14, 2018 · 2 comments

Comments

@mustardamus
Copy link

mustardamus commented Jan 14, 2018

If you follow the documentation for the custom printer for timestamps (https://github.com/xpl/ololog#timestamping), it will show you nothing. That is because the example code lacks the yes switch you need to enable the custom printer.

So this current example:

log.configure ({ time: { print: x => (String (x) + ' | ').bright.cyan }}) ('Lorem ipsum dolor sit amet\nconsectetur adipiscing elit..')

Should be (added yes: true):

log.configure ({ time: { yes: true, print: x => (String (x) + ' | ').bright.cyan }}) ('Lorem ipsum dolor sit amet\nconsectetur adipiscing elit..')

Not sure if it applies to other custom printers as well. It works without the yes on the locate custom printer.

@xpl xpl closed this as completed in 47baf73 Jan 14, 2018
@xpl
Copy link
Owner

xpl commented Jan 14, 2018

Thank you for pointing that out, fixed!

@xpl
Copy link
Owner

xpl commented Jan 14, 2018

It works without the yes on the locate custom printer.

This is because the location printer is turned on by default, while the timestamp printer is not. You can turn these things on and off with yes. Here's a bit of documentation on that topic.

xpl added a commit that referenced this issue Feb 27, 2021
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

No branches or pull requests

2 participants