{"action":"created","issue":{"url":"https://api.github.com/repos/jbachorik/btrace/issues/188","labels_url":"https://api.github.com/repos/jbachorik/btrace/issues/188/labels{/name}","comments_url":"https://api.github.com/repos/jbachorik/btrace/issues/188/comments","events_url":"https://api.github.com/repos/jbachorik/btrace/issues/188/events","html_url":"https://github.com/jbachorik/btrace/issues/188","id":117957744,"number":188,"title":"Option to send output to a file","user":{"login":"zeocio","id":3344890,"avatar_url":"https://avatars.githubusercontent.com/u/3344890?v=3","gravatar_id":"","url":"https://api.github.com/users/zeocio","html_url":"https://github.com/zeocio","followers_url":"https://api.github.com/users/zeocio/followers","following_url":"https://api.github.com/users/zeocio/following{/other_user}","gists_url":"https://api.github.com/users/zeocio/gists{/gist_id}","starred_url":"https://api.github.com/users/zeocio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeocio/subscriptions","organizations_url":"https://api.github.com/users/zeocio/orgs","repos_url":"https://api.github.com/users/zeocio/repos","events_url":"https://api.github.com/users/zeocio/events{/privacy}","received_events_url":"https://api.github.com/users/zeocio/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-20T03:22:28Z","updated_at":"2015-11-23T19:07:03Z","closed_at":null,"body":"Can we add a \"-o logfile\" option to the client?"},"comment":{"url":"https://api.github.com/repos/jbachorik/btrace/issues/comments/159030219","html_url":"https://github.com/jbachorik/btrace/issues/188#issuecomment-159030219","issue_url":"https://api.github.com/repos/jbachorik/btrace/issues/188","id":159030219,"user":{"login":"zeocio","id":3344890,"avatar_url":"https://avatars.githubusercontent.com/u/3344890?v=3","gravatar_id":"","url":"https://api.github.com/users/zeocio","html_url":"https://github.com/zeocio","followers_url":"https://api.github.com/users/zeocio/followers","following_url":"https://api.github.com/users/zeocio/following{/other_user}","gists_url":"https://api.github.com/users/zeocio/gists{/gist_id}","starred_url":"https://api.github.com/users/zeocio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeocio/subscriptions","organizations_url":"https://api.github.com/users/zeocio/orgs","repos_url":"https://api.github.com/users/zeocio/repos","events_url":"https://api.github.com/users/zeocio/events{/privacy}","received_events_url":"https://api.github.com/users/zeocio/received_events","type":"User","site_admin":false},"created_at":"2015-11-23T19:07:03Z","updated_at":"2015-11-23T19:07:03Z","body":"@jbachorik  actually yes!\r\n\r\nThe use case I have in mind is this:\r\n- I am writing test code (or app logic) against a library or framework\r\n- I want to use btrace to build a trace of intra-library calls to help me understand/debug its internals\r\n- the attaching of btrace to the jvm process needs to be controlled by the test/app logic, a blocking call to attach upon entry to a block and detach upon exit from that block.\r\n- the output of the btrace client in question can be either a file or a PrintStream/Logger in the current jvm.\r\n\r\n\r\nvoid TestCaller() {\r\n  // blocking call to attach to self\r\n  btrace_attach_self(output, library_btrace_script);\r\n\r\n  // call library/framework internal logic here\r\n  ...\r\n\r\n  btrace_detach();\r\n}\r\n"}}