Better log level control in smartstore plugin and smartsync

Duplicated code but smartsync doesn't require smartstore so can't think of a good place to keep that function