{"action":"opened","issue":{"url":"https://api.github.com/repos/emicklei/go-restful/issues/189","labels_url":"https://api.github.com/repos/emicklei/go-restful/issues/189/labels{/name}","comments_url":"https://api.github.com/repos/emicklei/go-restful/issues/189/comments","events_url":"https://api.github.com/repos/emicklei/go-restful/issues/189/events","html_url":"https://github.com/emicklei/go-restful/issues/189","id":62216948,"number":189,"title":"go-restful should allow the user to provide the logger it will use","user":{"login":"GuyMorgan","id":11506243,"avatar_url":"https://avatars.githubusercontent.com/u/11506243?v=3","gravatar_id":"","url":"https://api.github.com/users/GuyMorgan","html_url":"https://github.com/GuyMorgan","followers_url":"https://api.github.com/users/GuyMorgan/followers","following_url":"https://api.github.com/users/GuyMorgan/following{/other_user}","gists_url":"https://api.github.com/users/GuyMorgan/gists{/gist_id}","starred_url":"https://api.github.com/users/GuyMorgan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GuyMorgan/subscriptions","organizations_url":"https://api.github.com/users/GuyMorgan/orgs","repos_url":"https://api.github.com/users/GuyMorgan/repos","events_url":"https://api.github.com/users/GuyMorgan/events{/privacy}","received_events_url":"https://api.github.com/users/GuyMorgan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-16T21:38:18Z","updated_at":"2015-03-16T21:38:18Z","closed_at":null,"body":"Tthere are explicit uses of the stdlib log.* methods, which doesnt interoperate well\r\nin the case where a user uses a different .logging package. there's also `LogIngo` which\r\nprobably could be monkey-patched (-1), but even that isn't consistent:\r\n```\r\nroute_builder.go\r\n136:\tlog.Println(\"ReturnsError is deprecated, use Returns instead.\")\r\n189:\t\tlog.Fatalf(\"[restful] Invalid path:%s because:%v\", b.currentPath, err)\r\n192:\t\tlog.Fatalf(\"[restful] No function specified for route:\" + b.currentPath)\r\n\r\nswagger/swagger_webservice.go\r\n26:// LogInfo is the function that is called when this package needs to log. It defaults to log.Printf\r\n27:var LogInfo = log.Printf\r\n\r\nweb_service.go\r\n29:\t\tlog.Fatalf(\"[restful] invalid path:%s because:%v\", w.rootPath, err)\r\n \r\ncontainer.go\r\n110:\t\t\tlog.Fatalf(\"[restful] WebService with duplicate root path detected:['%v']\", each)\r\n135:\tlog.Println(buffer.String())\r\n174:\t\t\t\tlog.Println(\"[restful] unable to install compressor:\", err)\r\n \r\n````\r\n\r\n for example of why this is an issue, here's an example where the application uses structured logging: \r\n```\r\n{\"level\":\"info\",\"msg\":\"Starting up...\",\"time\":\"2015-03-16T23:27:17\"}\r\n2015/03/16 23:27:17 [restful/swagger] listing is available at http://localhost:8080/apidocs.json\r\n2015/03/16 23:27:17 [restful/swagger] http://localhost:8080/apidocs/ is mapped to folder swagger-ui/dist\r\n{\"level\":\"info\",\"msg\":\"start listening on localhost:8080\",\"time\":\"2015-03-16T23:27:17\"}\r\n```\r\n\r\nrelated to #187 \r\n"}}