LibDBIcon just uses your data object's icon.
Code:
f.dataObject = {
type = "launcher",
icon = "Interface\\Addons\\MaggzAutoLog\\disabled",
label = "MaggzAutoLog",
OnClick = function(self, button)
if button == "RightButton" then
LOGSTATE()
elseif LoggingCombat() then
disablelogging()
f.dataObject.icon = "Interface\\Addons\\MaggzAutoLog\\disabled"
else
enablelogging()
f.dataObject.icon = "Interface\\Addons\\MaggzAutoLog\\enabled"
end
end,
}