stevebuik / greased

Faster Lightning development and testing
MIT License
26 stars 2 forks source link

FEATURE: custom logger control #7

Open stevebuik opened 7 years ago

stevebuik commented 7 years ago

Tests should follow the best practice of using $A.log when logging in the client.

It's possible to configure a client logger that handles these log events (like a log4j appender) and writes a filtered set out to the console.

$A.logger.subscribe("INFO", function(level, message, error) { console.log(error); });

A dropdown menu can be added to the status bar which controls this logger so that it's easy to change the log level without changing the code. It should cause a page refresh with a new url parameter which sets the new log level i.e. the logging level attributes are loaded from parameters

stevebuik commented 7 years ago

This suggests that a custom appender is no longer possible!

http://salesforce.stackexchange.com/questions/129894/lockerservice-not-allowing-subscribing-to-a-logger