So, the current logging behavior of Phono is very annoying to develop around. Having to sort through the Phono logs to find my logs is a practice in futility. So I poked around the code and found a currently in place system that identifies log items. So I used that and created a public API for setting the loglevel. So, setting the loglevel can be done like so:
var a = $.phono({
apiKey: "abcd"
});
a.setLogLevel("< ALL | TRACE | DEBUG | INFO | WARN | ERROR | FATAL | OFF >");
a.getLogLevel(); // -> "WARN" (The default level)
The only thing I can't seem to figure out how to do without messing with the application structure is set the log level using the initial $.phono configuration like this:
var a = $.phono({
apiKey: "abcd",
loglevel: "INFO"
});
a.getLogLevel(); // -> "INFO"
If the maintainers of Phono can figure out how to do that, the logging would be perfect.
Feel free to edit any of my changes before pulling to master, but the logging really needs to be tamed.
So, the current logging behavior of Phono is very annoying to develop around. Having to sort through the Phono logs to find my logs is a practice in futility. So I poked around the code and found a currently in place system that identifies log items. So I used that and created a public API for setting the
loglevel
. So, setting theloglevel
can be done like so:The only thing I can't seem to figure out how to do without messing with the application structure is set the log level using the initial
$.phono
configuration like this:If the maintainers of Phono can figure out how to do that, the logging would be perfect.
Feel free to edit any of my changes before pulling to master, but the logging really needs to be tamed.
Thanks Phono team!