{"action":"created","issue":{"url":"https://api.github.com/repos/ofiwg/libfabric/issues/711","labels_url":"https://api.github.com/repos/ofiwg/libfabric/issues/711/labels{/name}","comments_url":"https://api.github.com/repos/ofiwg/libfabric/issues/711/comments","events_url":"https://api.github.com/repos/ofiwg/libfabric/issues/711/events","html_url":"https://github.com/ofiwg/libfabric/pull/711","id":59369587,"number":711,"title":"Implement logging with fine grained control over output.","user":{"login":"bturrubiates","id":2322856,"avatar_url":"https://avatars.githubusercontent.com/u/2322856?v=3","gravatar_id":"","url":"https://api.github.com/users/bturrubiates","html_url":"https://github.com/bturrubiates","followers_url":"https://api.github.com/users/bturrubiates/followers","following_url":"https://api.github.com/users/bturrubiates/following{/other_user}","gists_url":"https://api.github.com/users/bturrubiates/gists{/gist_id}","starred_url":"https://api.github.com/users/bturrubiates/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bturrubiates/subscriptions","organizations_url":"https://api.github.com/users/bturrubiates/orgs","repos_url":"https://api.github.com/users/bturrubiates/repos","events_url":"https://api.github.com/users/bturrubiates/events{/privacy}","received_events_url":"https://api.github.com/users/bturrubiates/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-03-01T00:50:25Z","updated_at":"2015-03-03T00:41:59Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ofiwg/libfabric/pulls/711","html_url":"https://github.com/ofiwg/libfabric/pull/711","diff_url":"https://github.com/ofiwg/libfabric/pull/711.diff","patch_url":"https://github.com/ofiwg/libfabric/pull/711.patch"},"body":"Not sure if this is ready for merging, but this is the current iteration and a pull request makes it easier to receive feedback. \r\n\r\nThoughts? @shefty, @hppritcha\r\n\r\n- Define three log levels: LOG_WARN (1), LOG_TRACE (3), LOG_INFO (7)\r\n  LOG_WARN: Intended for warnings.\r\n  LOG_TRACE: Intended for non-detailed output meant to trace execution, or\r\n  provide useful information.\r\n  LOG_INFO: Higher traffic logging meant for detailed output.\r\n\r\n- Define 8 subsystems: FABRIC (0), DOMAIN (1), EP_CM (2), EP_DM (3), AV (4), CQ\r\n  (5), EQ (6), MR (7).\r\n\r\n- Define three new environment variables:\r\n  - FI_LOG_LEVEL: Controls log level. Valid values are: \"warn\", \"trace\",\r\n    \"info\". Each level cascades. Level info will also trigger \"warn\" and\r\n    \"trace\" output.\r\n  - FI_LOG_PROV: Controls the provider output.\r\n  - FI_LOG_SUBSYSTEMS: Controls the subsystem output. Valid values are:\r\n  \"fabric\", \"domain\", \"ep_cm\", \"ep_dm\", \"av\", \"cq\", \"eq\", \"mr\".\r\n\r\n- Define new logging macros:\r\n  - FI_ERR, FI_SERR:\r\n    Intended for errors. Always logged.\r\n  - FI_LOG, FI_SLOG:\r\n    Intended for logging. Print if user intended provider and log level match\r\n    log statement. FI_SLOG also depends on the subsystem.\r\n  - FI_DEBUG, FI_SDEBUG:\r\n    Always prints when configured with --enable-debug.\r\n\r\n- Logging from all providers and subsystems is enabled by default.\r\n\r\n- Specific provider and subsystems can be provided using the following syntax:\r\n  - Negating a list of options by preceding it with '^' symbol.\r\n  - Providing a list of options.\r\n\r\nSigned-off-by: Ben Turrubiates <bturrubiates@lanl.gov>"},"comment":{"url":"https://api.github.com/repos/ofiwg/libfabric/issues/comments/76863466","html_url":"https://github.com/ofiwg/libfabric/pull/711#issuecomment-76863466","issue_url":"https://api.github.com/repos/ofiwg/libfabric/issues/711","id":76863466,"user":{"login":"bturrubiates","id":2322856,"avatar_url":"https://avatars.githubusercontent.com/u/2322856?v=3","gravatar_id":"","url":"https://api.github.com/users/bturrubiates","html_url":"https://github.com/bturrubiates","followers_url":"https://api.github.com/users/bturrubiates/followers","following_url":"https://api.github.com/users/bturrubiates/following{/other_user}","gists_url":"https://api.github.com/users/bturrubiates/gists{/gist_id}","starred_url":"https://api.github.com/users/bturrubiates/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bturrubiates/subscriptions","organizations_url":"https://api.github.com/users/bturrubiates/orgs","repos_url":"https://api.github.com/users/bturrubiates/repos","events_url":"https://api.github.com/users/bturrubiates/events{/privacy}","received_events_url":"https://api.github.com/users/bturrubiates/received_events","type":"User","site_admin":false},"created_at":"2015-03-03T00:41:59Z","updated_at":"2015-03-03T00:41:59Z","body":"@shefty This is not ready for merging, but is this getting closer to what you were talking about?\r\nThere are a couple of downsides...\r\n- Filtering macros in the INI functions will not work as expected since the mask is updated in register_provider and the INI functions get called before the provider is registered.\r\n- Since subsystems are now necessary all of the providers (include fabric core) need to go add subsystems to each log call. For now I just made them all be MR to allow compilation and testing...\r\n"}}