{"action":"created","issue":{"url":"https://api.github.com/repos/AFriemann/mdc/issues/1","repository_url":"https://api.github.com/repos/AFriemann/mdc","labels_url":"https://api.github.com/repos/AFriemann/mdc/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/AFriemann/mdc/issues/1/comments","events_url":"https://api.github.com/repos/AFriemann/mdc/issues/1/events","html_url":"https://github.com/AFriemann/mdc/issues/1","id":303640762,"number":1,"title":"Support nested context and params that are not set to be null","user":{"login":"krishnambm","id":1282489,"avatar_url":"https://avatars0.githubusercontent.com/u/1282489?v=4","gravatar_id":"","url":"https://api.github.com/users/krishnambm","html_url":"https://github.com/krishnambm","followers_url":"https://api.github.com/users/krishnambm/followers","following_url":"https://api.github.com/users/krishnambm/following{/other_user}","gists_url":"https://api.github.com/users/krishnambm/gists{/gist_id}","starred_url":"https://api.github.com/users/krishnambm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krishnambm/subscriptions","organizations_url":"https://api.github.com/users/krishnambm/orgs","repos_url":"https://api.github.com/users/krishnambm/repos","events_url":"https://api.github.com/users/krishnambm/events{/privacy}","received_events_url":"https://api.github.com/users/krishnambm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-08T21:36:12Z","updated_at":"2018-03-08T21:54:47Z","closed_at":null,"author_association":"NONE","body":" I was exactly trying to add something similar on the same day as you :) and saw your package.\r\n\r\nWould you be able to support nested context and context when some of the params are null?\r\n\r\n```\r\n+def test_mdc_formatter():\r\n+    formatter = MDCFormatter('[%(foo)s/%(bar)s/%(blah)s] - %(message)s', datefmt='%Y-%m-%d %H:%M:%S')\r\n+    hndlr.setFormatter(formatter)\r\n+    @with_mdc(bar='def')\r\n+    def bar(ctx, x):\r\n+        logging.debug(x)\r\n+        assert ctx.bar == 'def', ctx.bar\r\n+        assert ctx.foo == 'abc', ctx.foo\r\n+\r\n+    @with_mdc(foo='abc')\r\n+    def foo(ctx, x):\r\n+        logging.debug(x)\r\n+        bar(1)\r\n+        assert ctx.foo == 'abc', ctx.foo\r\n+    foo(1)\r\n```"},"comment":{"url":"https://api.github.com/repos/AFriemann/mdc/issues/comments/371637693","html_url":"https://github.com/AFriemann/mdc/issues/1#issuecomment-371637693","issue_url":"https://api.github.com/repos/AFriemann/mdc/issues/1","id":371637693,"user":{"login":"AFriemann","id":1730315,"avatar_url":"https://avatars3.githubusercontent.com/u/1730315?v=4","gravatar_id":"","url":"https://api.github.com/users/AFriemann","html_url":"https://github.com/AFriemann","followers_url":"https://api.github.com/users/AFriemann/followers","following_url":"https://api.github.com/users/AFriemann/following{/other_user}","gists_url":"https://api.github.com/users/AFriemann/gists{/gist_id}","starred_url":"https://api.github.com/users/AFriemann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AFriemann/subscriptions","organizations_url":"https://api.github.com/users/AFriemann/orgs","repos_url":"https://api.github.com/users/AFriemann/repos","events_url":"https://api.github.com/users/AFriemann/events{/privacy}","received_events_url":"https://api.github.com/users/AFriemann/received_events","type":"User","site_admin":false},"created_at":"2018-03-08T21:54:47Z","updated_at":"2018-03-08T21:54:47Z","author_association":"OWNER","body":"Hey @krishnambm ! \r\n\r\nthank you for the issue :)\r\n\r\nUnfortunately I'm not sure this is what you're looking for. The MDCFormatter outputs json right now and I don't have the use case for specific formatting. (I'm only using this in Containers with an EFK for log tracing) \r\n\r\nHowever, I get what you are trying to achieve and I see the value. If you have a good Idea how to implement this send me a pull request and we'll discuss it further."}}
{"actor":{"display_login":"AFriemann"}}