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

custom stringifier doesn't work #15

Closed
punund opened this issue Feb 22, 2020 · 2 comments
Closed

custom stringifier doesn't work #15

punund opened this issue Feb 22, 2020 · 2 comments

Comments

@punund
Copy link

punund commented Feb 22, 2020

I tried the example from the docs:

const obj = { foo: true, bar: 42 }
  
const log = require ('ololog').configure ({ stringify: { print: require ('q-i').stringify } })
log(obj)

const { stringify } = require('q-i')
console.log(stringify(obj))

It turns out that while q-i works by itself, with ololog it doesn't:

image

xpl added a commit that referenced this issue Feb 22, 2020
@xpl
Copy link
Owner

xpl commented Feb 22, 2020

@punund Good catch! The print option should now work (let me know if it still doesn't). I've also updated the docs, as there's another way of overriding the stringification that might be also useful to you:

https://github.com/xpl/ololog#using-with-custom-stringifier

@xpl xpl closed this as completed May 17, 2020
@wycats
Copy link

wycats commented Oct 26, 2020

@xpl is there a clean way to override just the object printing (and leave stacktracey formatting for exceptions)?

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

3 participants