You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently when ignoreLocalhost is set to false, there is a single console.warn message but no other info for troubleshooting your app. When you are new to Ackee or using it a new framework or pattern, it would be nice if you could get some indication of what would have been tracked. For example, you could console.info something like:
ackee record <domainId> - <recordId>
ackee record update - <recordId>
ackee action <key> - <recordId>
ackee action update - <recordId>
(unsure if the updates should be logged, but seems right at least for actions whose updates will be manually driven)
Would you accept a PR adding functionality along these lines? If so, design questions follow.
New key: ignoreLocalhostBehavior: 'log' | 'silent' or logOnIgnoreLocalhost: true | false etc (or verbose: true | false which could be independent from ignore if people want this in prod for some reason)
Would you prefer updates be logged? Or just creates? Configurable (logOnIgnoreLocalhost: 'create' | 'all' | false)?
Would you prefer the logging instance augment all of the standard behavior? Maybe something like
// new function with same API as sendconstlog=function(url,body,options,next){// probably inspect body.variables to determine what mutation type is happening, though could also parse query string}exportconstcreate=function(server,options){// added to body of create and replaces existing direct calls to `send` in this functionconst_send=options.ignoreLocalhost==='log' ? log : send;
...
I think this is probably the right path forward for best simulation, and it means calls to stop don't need to be logged since the intervals will just stop happening.
Currently when
ignoreLocalhost
is set to false, there is a singleconsole.warn
message but no other info for troubleshooting your app. When you are new to Ackee or using it a new framework or pattern, it would be nice if you could get some indication of what would have been tracked. For example, you couldconsole.info
something like:(unsure if the updates should be logged, but seems right at least for actions whose updates will be manually driven)
Would you accept a PR adding functionality along these lines? If so, design questions follow.
What is your preferred API for this?
ignoreLocalhost: true | false | 'log'
(most straightforward)ignoreLocalhostBehavior: 'log' | 'silent'
orlogOnIgnoreLocalhost: true | false
etc (orverbose: true | false
which could be independent from ignore if people want this in prod for some reason)Would you prefer updates be logged? Or just creates? Configurable (
logOnIgnoreLocalhost: 'create' | 'all' | false
)?Would you prefer the logging instance augment all of the standard behavior? Maybe something like
I think this is probably the right path forward for best simulation, and it means calls to
stop
don't need to be logged since the intervals will just stop happening.This would also be useful in something like electerious/use-ackee#10.
The text was updated successfully, but these errors were encountered: