{"action":"created","issue":{"url":"https://api.github.com/repos/scality/ScalitySproxydSwift/issues/133","labels_url":"https://api.github.com/repos/scality/ScalitySproxydSwift/issues/133/labels{/name}","comments_url":"https://api.github.com/repos/scality/ScalitySproxydSwift/issues/133/comments","events_url":"https://api.github.com/repos/scality/ScalitySproxydSwift/issues/133/events","html_url":"https://github.com/scality/ScalitySproxydSwift/pull/133","id":89302974,"number":133,"title":"Log configuration at load time","user":{"login":"NicolasT","id":102605,"avatar_url":"https://avatars.githubusercontent.com/u/102605?v=3","gravatar_id":"","url":"https://api.github.com/users/NicolasT","html_url":"https://github.com/NicolasT","followers_url":"https://api.github.com/users/NicolasT/followers","following_url":"https://api.github.com/users/NicolasT/following{/other_user}","gists_url":"https://api.github.com/users/NicolasT/gists{/gist_id}","starred_url":"https://api.github.com/users/NicolasT/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NicolasT/subscriptions","organizations_url":"https://api.github.com/users/NicolasT/orgs","repos_url":"https://api.github.com/users/NicolasT/repos","events_url":"https://api.github.com/users/NicolasT/events{/privacy}","received_events_url":"https://api.github.com/users/NicolasT/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"cazino","id":287542,"avatar_url":"https://avatars.githubusercontent.com/u/287542?v=3","gravatar_id":"","url":"https://api.github.com/users/cazino","html_url":"https://github.com/cazino","followers_url":"https://api.github.com/users/cazino/followers","following_url":"https://api.github.com/users/cazino/following{/other_user}","gists_url":"https://api.github.com/users/cazino/gists{/gist_id}","starred_url":"https://api.github.com/users/cazino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cazino/subscriptions","organizations_url":"https://api.github.com/users/cazino/orgs","repos_url":"https://api.github.com/users/cazino/repos","events_url":"https://api.github.com/users/cazino/events{/privacy}","received_events_url":"https://api.github.com/users/cazino/received_events","type":"User","site_admin":false},"milestone":null,"comments":10,"created_at":"2015-06-18T14:05:59Z","updated_at":"2015-06-25T08:50:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/scality/ScalitySproxydSwift/pulls/133","html_url":"https://github.com/scality/ScalitySproxydSwift/pull/133","diff_url":"https://github.com/scality/ScalitySproxydSwift/pull/133.diff","patch_url":"https://github.com/scality/ScalitySproxydSwift/pull/133.patch"},"body":"This patch adds info-level logging for the configuration retrieved at load-time, and whenever a storage policy is used for the first time. This should ease debugging configuration issues.\r\n\r\nProposed by @cazino."},"comment":{"url":"https://api.github.com/repos/scality/ScalitySproxydSwift/issues/comments/115167937","html_url":"https://github.com/scality/ScalitySproxydSwift/pull/133#issuecomment-115167937","issue_url":"https://api.github.com/repos/scality/ScalitySproxydSwift/issues/133","id":115167937,"user":{"login":"cazino","id":287542,"avatar_url":"https://avatars.githubusercontent.com/u/287542?v=3","gravatar_id":"","url":"https://api.github.com/users/cazino","html_url":"https://github.com/cazino","followers_url":"https://api.github.com/users/cazino/followers","following_url":"https://api.github.com/users/cazino/following{/other_user}","gists_url":"https://api.github.com/users/cazino/gists{/gist_id}","starred_url":"https://api.github.com/users/cazino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cazino/subscriptions","organizations_url":"https://api.github.com/users/cazino/orgs","repos_url":"https://api.github.com/users/cazino/repos","events_url":"https://api.github.com/users/cazino/events{/privacy}","received_events_url":"https://api.github.com/users/cazino/received_events","type":"User","site_admin":false},"created_at":"2015-06-25T08:50:04Z","updated_at":"2015-06-25T08:50:04Z","body":"The log is really not easy to read.\r\nI see two problems.\r\n\r\nFirst problem : as the configuration is red twice per process, you get 2 * process numbers times each log line.\r\nIn the worst case scenario (that I already observe sometimes), the log lines of each process are mixed together : \r\nobject-server: === Begin swift_scality_backend configuration for storage policy 2 ===\r\nobject-server: === Begin swift_scality_backend configuration for storage policy 2 ===\r\nSo this make the log file really crowded. Don't know if we can do something about it since we don't handle process spawning in our driver (or is there someone available to submit a patch to swift to implement a configuration hook so that object-server gets spawned with a configuration object instead of each process reading a config file ????????????)\r\nOne thing that could help would be to show the process number in each log line. I checked in swift src and currently you can't customize the LogFormater with configuration variables (that would be an easier patch....)\r\n\r\nSecond problem : the '_get_client_for_policy' logs exposes some internal implementation details that any system administrator is completely unaware of. Such a guy would probably know about 'storage policy', 'rings', 'endpoints' and 'location' (all the things he has to fill in the configuration). But he is completely not aware of any 'ClientCollection' and 'SproxydClient'. Even though it is not too hard to go from the first concepts to the seconds ones once you think about it, it is really confusing at first sight (at least it was not for me).\r\n\r\nI suggest that we put the _get_client_for_policy' logs in 'debug'  instead of  'info'. I checked an you can change the verbosity of the logger by using configuration variables in the object server configuration."}}