{"action":"created","issue":{"url":"https://api.github.com/repos/psquickitjayant/log4net-loggly/issues/17","labels_url":"https://api.github.com/repos/psquickitjayant/log4net-loggly/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/psquickitjayant/log4net-loggly/issues/17/comments","events_url":"https://api.github.com/repos/psquickitjayant/log4net-loggly/issues/17/events","html_url":"https://github.com/psquickitjayant/log4net-loggly/issues/17","id":122115286,"number":17,"title":"Using Active Property Values results in empty string when using provider","user":{"login":"brianyeckley-gr","id":7582014,"avatar_url":"https://avatars.githubusercontent.com/u/7582014?v=3","gravatar_id":"","url":"https://api.github.com/users/brianyeckley-gr","html_url":"https://github.com/brianyeckley-gr","followers_url":"https://api.github.com/users/brianyeckley-gr/followers","following_url":"https://api.github.com/users/brianyeckley-gr/following{/other_user}","gists_url":"https://api.github.com/users/brianyeckley-gr/gists{/gist_id}","starred_url":"https://api.github.com/users/brianyeckley-gr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianyeckley-gr/subscriptions","organizations_url":"https://api.github.com/users/brianyeckley-gr/orgs","repos_url":"https://api.github.com/users/brianyeckley-gr/repos","events_url":"https://api.github.com/users/brianyeckley-gr/events{/privacy}","received_events_url":"https://api.github.com/users/brianyeckley-gr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-14T19:41:44Z","updated_at":"2015-12-23T09:43:40Z","closed_at":null,"body":"Following this pattern when putting a pattern in the ThreadContext results in an empty string.  https://logging.apache.org/log4net/release/manual/contexts.html\r\n\r\nExample of our provider:\r\n\r\n    public class RequestIdProvider : IFixingRequired\r\n    {\r\n        public object GetFixedObject()\r\n        {\r\n            return ToString();\r\n        }\r\n\r\n        public override string ToString()\r\n        {\r\n            return RequestContext.RequestId ?? \"\";\r\n        }\r\n    }\r\n\r\nAnd how we used it:\r\n\r\n    log4net.ThreadContext.Properties[\"RequestId\"] = new RequestIdProvider();\r\n\r\nUsing it without the provider works correctly:\r\n\r\n    log4net.ThreadContext.Properties[\"RequestId\"] = RequestContext.RequestId ?? \"\";\r\n\r\nThe problem seems to be that GetFixedObject is not called because the IFixingRequired attribute (http://logging.apache.org/log4net/log4net-1.2.12/release/sdk/log4net.Core.IFixingRequired.html) is not being honored, which is required for a buffered appender."},"comment":{"url":"https://api.github.com/repos/psquickitjayant/log4net-loggly/issues/comments/166847818","html_url":"https://github.com/psquickitjayant/log4net-loggly/issues/17#issuecomment-166847818","issue_url":"https://api.github.com/repos/psquickitjayant/log4net-loggly/issues/17","id":166847818,"user":{"login":"psquickitjayant","id":7300910,"avatar_url":"https://avatars.githubusercontent.com/u/7300910?v=3","gravatar_id":"","url":"https://api.github.com/users/psquickitjayant","html_url":"https://github.com/psquickitjayant","followers_url":"https://api.github.com/users/psquickitjayant/followers","following_url":"https://api.github.com/users/psquickitjayant/following{/other_user}","gists_url":"https://api.github.com/users/psquickitjayant/gists{/gist_id}","starred_url":"https://api.github.com/users/psquickitjayant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psquickitjayant/subscriptions","organizations_url":"https://api.github.com/users/psquickitjayant/orgs","repos_url":"https://api.github.com/users/psquickitjayant/repos","events_url":"https://api.github.com/users/psquickitjayant/events{/privacy}","received_events_url":"https://api.github.com/users/psquickitjayant/received_events","type":"User","site_admin":false},"created_at":"2015-12-23T09:43:40Z","updated_at":"2015-12-23T09:43:40Z","body":"hi @brianyeckley-gr \r\n\r\nsorry, earlier I was busy in some other stuff, could not get a chance to look at it.\r\n\r\nYou need to call ToString(). You can try the following code.\r\n\r\n```\r\nlog4net.ThreadContext.Properties[\"RequestId\"] = new RequestIdProvider().ToString();\r\n```\r\nThis works fine for me. "}}