Move logConfig guard into factory

Convert Factory to a function type along the way, this helps with testability

Signed-off-by: Alex Suraci <asuraci@pivotallabs.com>