{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/issues/842","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/issues/842/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/issues/842/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/issues/842/events","html_url":"https://github.com/GoogleCloudPlatform/gcloud-node/issues/842","id":104344976,"number":842,"title":"[Feature] gcloud-logging","user":{"login":"VikramTiwari","id":1330677,"avatar_url":"https://avatars.githubusercontent.com/u/1330677?v=3","gravatar_id":"","url":"https://api.github.com/users/VikramTiwari","html_url":"https://github.com/VikramTiwari","followers_url":"https://api.github.com/users/VikramTiwari/followers","following_url":"https://api.github.com/users/VikramTiwari/following{/other_user}","gists_url":"https://api.github.com/users/VikramTiwari/gists{/gist_id}","starred_url":"https://api.github.com/users/VikramTiwari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VikramTiwari/subscriptions","organizations_url":"https://api.github.com/users/VikramTiwari/orgs","repos_url":"https://api.github.com/users/VikramTiwari/repos","events_url":"https://api.github.com/users/VikramTiwari/events{/privacy}","received_events_url":"https://api.github.com/users/VikramTiwari/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/labels/logging","name":"logging","color":"bfdadc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-09-01T20:13:04Z","updated_at":"2015-09-16T15:44:37Z","closed_at":null,"body":"Is there any plan to include logging api in this package? If so what is the expected timeline?\r\n\r\nLink: https://cloud.google.com/logging/docs/api/gcloud-logging"},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/issues/comments/140782188","html_url":"https://github.com/GoogleCloudPlatform/gcloud-node/issues/842#issuecomment-140782188","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-node/issues/842","id":140782188,"user":{"login":"stephenplusplus","id":723048,"avatar_url":"https://avatars.githubusercontent.com/u/723048?v=3","gravatar_id":"","url":"https://api.github.com/users/stephenplusplus","html_url":"https://github.com/stephenplusplus","followers_url":"https://api.github.com/users/stephenplusplus/followers","following_url":"https://api.github.com/users/stephenplusplus/following{/other_user}","gists_url":"https://api.github.com/users/stephenplusplus/gists{/gist_id}","starred_url":"https://api.github.com/users/stephenplusplus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephenplusplus/subscriptions","organizations_url":"https://api.github.com/users/stephenplusplus/orgs","repos_url":"https://api.github.com/users/stephenplusplus/repos","events_url":"https://api.github.com/users/stephenplusplus/events{/privacy}","received_events_url":"https://api.github.com/users/stephenplusplus/received_events","type":"User","site_admin":false},"created_at":"2015-09-16T15:44:37Z","updated_at":"2015-09-16T15:44:37Z","body":"I can't come up with a specific use case, but in general our library make the upstream APIs available for any of our users to easily fit into theirs. We do run into these one-off/bootstrap procedures from time to time that are best done with a UI (Pub/Sub creating a topic, Storage creating a bucket). In this case, since our library has full support for Storage, and a possible sink can be a bucket, if a user *did* have a need for programmatic creation of a sink, we can simplify the connection between a new sink and a Bucket destination:\r\n\r\n```js\r\nvar gcloud = require('gcloud')({\r\n  projectId: 'my-project-id',\r\n  keyFilename: 'path-to-service-account-keyfile.json'\r\n});\r\n\r\nvar storage = gcloud.storage();\r\nvar logging = gcloud.logging();\r\n\r\nlogging.createSink('new-sink-name', {\r\n  destination: storage.bucket('logging')\r\n}, function(err, sink) {});\r\n```\r\n\r\nInternally, that would grant the logging account as an owner on the bucket, create the sink, and give the user programmatic access to make further modifications to the sink (getting/setting metadata, deleting).\r\n\r\n@jgeewax might be able to speak to specific use cases.\r\n\r\n--\r\n\r\n> Is it feasible to pass the user's credentials for this operation instead of using a service account?\r\n\r\nAs far as I know, this would be pretty tricky. In production, a user would be using our library headlessly, so I'm not sure how the user auth process would begin. This could just be due to my still-maturing familiarity with all of the auth options, so if anyone can explain how we can easily get the credentials we need, please correct me."}}