-
Notifications
You must be signed in to change notification settings - Fork 36
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
Allow function value for "prefix" property #48
Comments
Why cant you do |
Since this function will only be evaluated once (at instantiation time), you can already pass the computed value. |
@bennyn You cool if I close this issue? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Because it doesn't work? I can't seem to find any indication in the source code that |
If you do use a getter it should work and we don't need to implement anything in the library. logdown('foo', {
get prefix() {
return new Date().toISOString() + ' MyLogger'
}
}) You feel we need docs for it? |
@caiogondim absolutely. I bet many people just add timers to all log calls right now. |
@caiogondim uhm, you sure it works? I tried the following code and it doesn't work. |
Let me try. |
@caiogondim yup, we'll need to think more about this tho |
So as I said in #102
It may be as well be called |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
At the moment the
prefix
property of aLogdown
instance must be astring
value:To enhance the flexbility of the prefix creation, it should be allowed to set
function
values too.Example:
The text was updated successfully, but these errors were encountered: