Logging switch hooked up to gui