Allow logSource to be a function and use name of it