Skip to content

Instantly share code, notes, and snippets.

@jsanda
Created October 13, 2016 15:24
Show Gist options
  • Save jsanda/79d77181e748c117d03b99483b451643 to your computer and use it in GitHub Desktop.
Save jsanda/79d77181e748c117d03b99483b451643 to your computer and use it in GitHub Desktop.
public boolean enableAll(MetricRegistry registry)
{
boolean enabled = false;
if (console != null)
{
if (enableConsole(registry))
{
enabled = true;
}
}
if (csv != null)
{
if (enableCsv(registry))
{
enabled = true;
}
}
if (ganglia != null)
{
if (enableGanglia(registry))
{
enabled = true;
}
}
if (graphite != null)
{
if (enableGraphite(registry))
{
enabled = true;
}
}
if (riemann != null)
{
if (enableRiemann(registry))
{
enabled = true;
}
}
if (!enabled)
{
log.warn("No reporters were succesfully enabled");
}
return enabled;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment