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
I love the library, but one request I have is I'd like the ability to 'whitelist' messages from other parts of my JS to not go through the formatter. If I use other JS libraries alongside my elm, I have to be careful about not outputting non alphanumeric characters in their console logs.
I'm not sure exactly how it could be done cause I haven't read the code in question yet, but is there a way to listen only to the elm bundles logs? Or have some kind of special string we look for in the beginning of the message to override the formatter and escape? Then you could write a special console log function that always inserts that string for your own code.
The text was updated successfully, but these errors were encountered:
sadly there is no way to distinguish between elm and non-elm console logs :/ The transformer should transform only the logs that are in the format of elm Debug.log, i.e. something before colon : "some parsable value" - if the parser is not able to parse this, it should default to the plain console.log
I have to be careful about not outputting non alphanumeric characters in their console logs.
I don't understand the limitation here - it should not limit you if you don't want to format the other JS logs - if you put in the non alphanumeric character it should just default to the console.log without the formatting.
Or have some kind of special string we look for in the beginning of the message to override the formatter and escape? Then you could write a special console log function that always inserts that string for your own code.
You can try to start the console messages with e.g. :: - that should fail the parser.
Anyway, can you provide the messages you are trying to get through and what you actually get?
Hi,
I love the library, but one request I have is I'd like the ability to 'whitelist' messages from other parts of my JS to not go through the formatter. If I use other JS libraries alongside my elm, I have to be careful about not outputting non alphanumeric characters in their console logs.
I'm not sure exactly how it could be done cause I haven't read the code in question yet, but is there a way to listen only to the elm bundles logs? Or have some kind of special string we look for in the beginning of the message to override the formatter and escape? Then you could write a special console log function that always inserts that string for your own code.
The text was updated successfully, but these errors were encountered: