I am using the
Java client for event logging from a web application. At the application level, I want to be able to enable or disable Keen IO logging via a runtime property. For example, in development, I don't always want logging to go to even a development project. But I only want to check this property once on application startup. At the moment, if it's set to "true", I set up a simple client and call
KeenClient.initialize(client). If false, I'm doing nothing, but then later calling, say,
addEventAsync() throws an exception because
KeenClient is not initialized. I'd rather not have to guard each of these calls with a check of the property—it would be great if it was like, say, Log4J where you just throw whatever you want at the
Logger, and it's the central log level setting that determines if that results in anything.