{"action":"created","comment":{"url":"https://api.github.com/repos/broadinstitute/cromwell/pulls/comments/43657718","id":43657718,"diff_hunk":"@@ -106,13 +108,18 @@ class JesBackend extends Backend with LazyLogging with ProductionJesAuthenticati\n   override def adjustInputPaths(call: Call, inputs: CallInputs): CallInputs = inputs map { case (k, v) => (k, gcsPathToLocal(v)) }\n   override def adjustOutputPaths(call: Call, outputs: CallOutputs): CallOutputs = outputs map { case (k,v) => (k, gcsPathToLocal(v)) }\n \n+  private def makeLogger(descriptor: WorkflowDescriptor) = {\n+    WorkflowLogger(descriptor, otherLoggers=Seq(LoggerFactory.getLogger(getClass.getName)))\n+  }\n+\n   private def writeAuthenticationFile(workflow: WorkflowDescriptor) = authenticated { connection =>\n     val path = GoogleCloudStoragePath(gcsAuthFilePath(workflow))\n+    val log = makeLogger(workflow)\n \n     generateAuthJson(jesConf.dockerCredentials, getGcsAuthInformation(workflow)) foreach { content =>\n       def upload(prev: Option[Unit]) = connection.storage.uploadJson(path, content)\n \n-      logger.info(s\"Creating authentication file for workflow ${workflow.id} at \\n ${path.toString}\")","path":"src/main/scala/cromwell/engine/backend/jes/JesBackend.scala","position":9,"original_position":27,"commit_id":"15ac9139391c6efe02223ab307eb75a1bd4a0bd5","original_commit_id":"e7e8c358f9a20b035d7026153bbb5eee18ad7355","user":{"login":"scottfrazer","id":58551,"avatar_url":"https://avatars.githubusercontent.com/u/58551?v=3","gravatar_id":"","url":"https://api.github.com/users/scottfrazer","html_url":"https://github.com/scottfrazer","followers_url":"https://api.github.com/users/scottfrazer/followers","following_url":"https://api.github.com/users/scottfrazer/following{/other_user}","gists_url":"https://api.github.com/users/scottfrazer/gists{/gist_id}","starred_url":"https://api.github.com/users/scottfrazer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scottfrazer/subscriptions","organizations_url":"https://api.github.com/users/scottfrazer/orgs","repos_url":"https://api.github.com/users/scottfrazer/repos","events_url":"https://api.github.com/users/scottfrazer/events{/privacy}","received_events_url":"https://api.github.com/users/scottfrazer/received_events","type":"User","site_admin":false},"body":"Yeah, I looked into removing the one use of `LazyLogging` in this file and it's actually annoyingly more complicated than one might guess... The function that uses the lazy logger is called *in the constructor of `WorkflowDescriptor`* so we can't use a full `WorkflowLogger` because we don't have a `WorkflowDescriptor` yet.  Yeah it's annoying though I don't mind leaving it as is for now.","created_at":"2015-11-02T17:51:00Z","updated_at":"2015-11-02T17:51:00Z","html_url":"https://github.com/broadinstitute/cromwell/pull/254#discussion_r43657718","pull_request_url":"https://api.github.com/repos/broadinstitute/cromwell/pulls/254","_links":{"self":{"href":"https://api.github.com/repos/broadinstitute/cromwell/pulls/comments/43657718"},"html":{"href":"https://github.com/broadinstitute/cromwell/pull/254#discussion_r43657718"},"pull_request":{"href":"https://api.github.com/repos/broadinstitute/cromwell/pulls/254"}}},"pull_request":{"url":"https://api.github.com/repos/broadinstitute/cromwell/pulls/254","id":48764637,"html_url":"https://github.com/broadinstitute/cromwell/pull/254","diff_url":"https://github.com/broadinstitute/cromwell/pull/254.diff","patch_url":"https://github.com/broadinstitute/cromwell/pull/254.patch","issue_url":"https://api.github.com/repos/broadinstitute/cromwell/issues/254","number":254,"state":"open","locked":false,"title":"Per-workflow logging","user":{"login":"scottfrazer","id":58551,"avatar_url":"https://avatars.githubusercontent.com/u/58551?v=3","gravatar_id":"","url":"https://api.github.com/users/scottfrazer","html_url":"https://github.com/scottfrazer","followers_url":"https://api.github.com/users/scottfrazer/followers","following_url":"https://api.github.com/users/scottfrazer/following{/other_user}","gists_url":"https://api.github.com/users/scottfrazer/gists{/gist_id}","starred_url":"https://api.github.com/users/scottfrazer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scottfrazer/subscriptions","organizations_url":"https://api.github.com/users/scottfrazer/orgs","repos_url":"https://api.github.com/users/scottfrazer/repos","events_url":"https://api.github.com/users/scottfrazer/events{/privacy}","received_events_url":"https://api.github.com/users/scottfrazer/received_events","type":"User","site_admin":false},"body":"This allows for a log file per workflow, as well as the ability to specify the log root.  This also allows for both stdout and file-logging simultaneously.  This will allow us to have an API endpoint which just reads this the particular file for the workflow and sends it back over HTTP\r\n\r\nCromwell now accepts three Java Properties:\r\n\r\n* `LOG_ROOT` - location where log files go (default `.`)\r\n* `LOG_MODE` - `server`, `console`, or `server,console` (default `console`)\r\n* `LOG_LEVEL` - info, debug, etc (default `info`)\r\n\r\n**Standard out logging and the main Cromwell log were not changed by this PR**\r\n\r\nIf the command `sbt -DLOG_MODE=server,console -DLOG_ROOT=log \"run run 3step.wdl 3step.json\"` were run three times, we'd see this in the `log` directory:\r\n\r\n```\r\nlog\r\n├── cromwell.2015-10-26.log\r\n├── workflow.319df202-a60f-47c8-b886-bd4821747c68.log\r\n├── workflow.36e07688-9e47-45bd-9930-aff58471541e.log\r\n└── workflow.7dad065d-9d7a-4450-91c8-1f7ece184851.log\r\n```\r\n\r\nFAQ:\r\n\r\n> Scott, why did you not use the `application.conf` file for things like log root, log mode?  Seems obvious, right?\r\n\r\nGlad you asked.  I tried, for a very long time, to allow for the values to be set in `application.conf`.  However, I was unable to get it to work.  It seems that by querying for a value in `application.conf`, it causes the `logback.xml` to be read and processed.  The logback.xml file does not recognize values in `application.conf` natively, it must have Java Properties set.\r\n\r\n> What the hell were you thinking with the `WorkflowLogger` class?\r\n\r\nI'd be very happy to discuss how to do this better.  The problem is this:\r\n\r\n* We need to log to the Akka logger whenever we can because the tests depend on it\r\n* Akka logger descends from the root logger (`logback.xml`)\r\n* A new logger needs to be created for each workflow.\r\n* Both the Akka logger and the workflow logger descend from the root logger so they both can't propagate  messages or we'll get doubles of everything in the root logger.\r\n* Workflow logger is set to not propagate messages (`setAdditive(false)`)","created_at":"2015-10-26T16:43:48Z","updated_at":"2015-11-02T17:51:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9dbbc58d70f2c2d446d00d6eeed805d6aed5f0a9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/broadinstitute/cromwell/pulls/254/commits","review_comments_url":"https://api.github.com/repos/broadinstitute/cromwell/pulls/254/comments","review_comment_url":"https://api.github.com/repos/broadinstitute/cromwell/pulls/comments{/number}","comments_url":"https://api.github.com/repos/broadinstitute/cromwell/issues/254/comments","statuses_url":"https://api.github.com/repos/broadinstitute/cromwell/statuses/15ac9139391c6efe02223ab307eb75a1bd4a0bd5","head":{"label":"broadinstitute:logging","ref":"logging","sha":"15ac9139391c6efe02223ab307eb75a1bd4a0bd5","user":{"login":"broadinstitute","id":393552,"avatar_url":"https://avatars.githubusercontent.com/u/393552?v=3","gravatar_id":"","url":"https://api.github.com/users/broadinstitute","html_url":"https://github.com/broadinstitute","followers_url":"https://api.github.com/users/broadinstitute/followers","following_url":"https://api.github.com/users/broadinstitute/following{/other_user}","gists_url":"https://api.github.com/users/broadinstitute/gists{/gist_id}","starred_url":"https://api.github.com/users/broadinstitute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broadinstitute/subscriptions","organizations_url":"https://api.github.com/users/broadinstitute/orgs","repos_url":"https://api.github.com/users/broadinstitute/repos","events_url":"https://api.github.com/users/broadinstitute/events{/privacy}","received_events_url":"https://api.github.com/users/broadinstitute/received_events","type":"Organization","site_admin":false},"repo":{"id":34136406,"name":"cromwell","full_name":"broadinstitute/cromwell","owner":{"login":"broadinstitute","id":393552,"avatar_url":"https://avatars.githubusercontent.com/u/393552?v=3","gravatar_id":"","url":"https://api.github.com/users/broadinstitute","html_url":"https://github.com/broadinstitute","followers_url":"https://api.github.com/users/broadinstitute/followers","following_url":"https://api.github.com/users/broadinstitute/following{/other_user}","gists_url":"https://api.github.com/users/broadinstitute/gists{/gist_id}","starred_url":"https://api.github.com/users/broadinstitute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broadinstitute/subscriptions","organizations_url":"https://api.github.com/users/broadinstitute/orgs","repos_url":"https://api.github.com/users/broadinstitute/repos","events_url":"https://api.github.com/users/broadinstitute/events{/privacy}","received_events_url":"https://api.github.com/users/broadinstitute/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/broadinstitute/cromwell","description":"Workflow Execution Engine using WDL","fork":false,"url":"https://api.github.com/repos/broadinstitute/cromwell","forks_url":"https://api.github.com/repos/broadinstitute/cromwell/forks","keys_url":"https://api.github.com/repos/broadinstitute/cromwell/keys{/key_id}","collaborators_url":"https://api.github.com/repos/broadinstitute/cromwell/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/broadinstitute/cromwell/teams","hooks_url":"https://api.github.com/repos/broadinstitute/cromwell/hooks","issue_events_url":"https://api.github.com/repos/broadinstitute/cromwell/issues/events{/number}","events_url":"https://api.github.com/repos/broadinstitute/cromwell/events","assignees_url":"https://api.github.com/repos/broadinstitute/cromwell/assignees{/user}","branches_url":"https://api.github.com/repos/broadinstitute/cromwell/branches{/branch}","tags_url":"https://api.github.com/repos/broadinstitute/cromwell/tags","blobs_url":"https://api.github.com/repos/broadinstitute/cromwell/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/broadinstitute/cromwell/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/broadinstitute/cromwell/git/refs{/sha}","trees_url":"https://api.github.com/repos/broadinstitute/cromwell/git/trees{/sha}","statuses_url":"https://api.github.com/repos/broadinstitute/cromwell/statuses/{sha}","languages_url":"https://api.github.com/repos/broadinstitute/cromwell/languages","stargazers_url":"https://api.github.com/repos/broadinstitute/cromwell/stargazers","contributors_url":"https://api.github.com/repos/broadinstitute/cromwell/contributors","subscribers_url":"https://api.github.com/repos/broadinstitute/cromwell/subscribers","subscription_url":"https://api.github.com/repos/broadinstitute/cromwell/subscription","commits_url":"https://api.github.com/repos/broadinstitute/cromwell/commits{/sha}","git_commits_url":"https://api.github.com/repos/broadinstitute/cromwell/git/commits{/sha}","comments_url":"https://api.github.com/repos/broadinstitute/cromwell/comments{/number}","issue_comment_url":"https://api.github.com/repos/broadinstitute/cromwell/issues/comments{/number}","contents_url":"https://api.github.com/repos/broadinstitute/cromwell/contents/{+path}","compare_url":"https://api.github.com/repos/broadinstitute/cromwell/compare/{base}...{head}","merges_url":"https://api.github.com/repos/broadinstitute/cromwell/merges","archive_url":"https://api.github.com/repos/broadinstitute/cromwell/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/broadinstitute/cromwell/downloads","issues_url":"https://api.github.com/repos/broadinstitute/cromwell/issues{/number}","pulls_url":"https://api.github.com/repos/broadinstitute/cromwell/pulls{/number}","milestones_url":"https://api.github.com/repos/broadinstitute/cromwell/milestones{/number}","notifications_url":"https://api.github.com/repos/broadinstitute/cromwell/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/broadinstitute/cromwell/labels{/name}","releases_url":"https://api.github.com/repos/broadinstitute/cromwell/releases{/id}","created_at":"2015-04-17T19:39:36Z","updated_at":"2015-10-13T18:11:00Z","pushed_at":"2015-11-02T17:37:25Z","git_url":"git://github.com/broadinstitute/cromwell.git","ssh_url":"git@github.com:broadinstitute/cromwell.git","clone_url":"https://github.com/broadinstitute/cromwell.git","svn_url":"https://github.com/broadinstitute/cromwell","homepage":"","size":7699,"stargazers_count":9,"watchers_count":9,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":9,"default_branch":"develop"}},"base":{"label":"broadinstitute:develop","ref":"develop","sha":"7df1a44d3225cd231efd302e4d532dee2e6a7d97","user":{"login":"broadinstitute","id":393552,"avatar_url":"https://avatars.githubusercontent.com/u/393552?v=3","gravatar_id":"","url":"https://api.github.com/users/broadinstitute","html_url":"https://github.com/broadinstitute","followers_url":"https://api.github.com/users/broadinstitute/followers","following_url":"https://api.github.com/users/broadinstitute/following{/other_user}","gists_url":"https://api.github.com/users/broadinstitute/gists{/gist_id}","starred_url":"https://api.github.com/users/broadinstitute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broadinstitute/subscriptions","organizations_url":"https://api.github.com/users/broadinstitute/orgs","repos_url":"https://api.github.com/users/broadinstitute/repos","events_url":"https://api.github.com/users/broadinstitute/events{/privacy}","received_events_url":"https://api.github.com/users/broadinstitute/received_events","type":"Organization","site_admin":false},"repo":{"id":34136406,"name":"cromwell","full_name":"broadinstitute/cromwell","owner":{"login":"broadinstitute","id":393552,"avatar_url":"https://avatars.githubusercontent.com/u/393552?v=3","gravatar_id":"","url":"https://api.github.com/users/broadinstitute","html_url":"https://github.com/broadinstitute","followers_url":"https://api.github.com/users/broadinstitute/followers","following_url":"https://api.github.com/users/broadinstitute/following{/other_user}","gists_url":"https://api.github.com/users/broadinstitute/gists{/gist_id}","starred_url":"https://api.github.com/users/broadinstitute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broadinstitute/subscriptions","organizations_url":"https://api.github.com/users/broadinstitute/orgs","repos_url":"https://api.github.com/users/broadinstitute/repos","events_url":"https://api.github.com/users/broadinstitute/events{/privacy}","received_events_url":"https://api.github.com/users/broadinstitute/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/broadinstitute/cromwell","description":"Workflow Execution Engine using WDL","fork":false,"url":"https://api.github.com/repos/broadinstitute/cromwell","forks_url":"https://api.github.com/repos/broadinstitute/cromwell/forks","keys_url":"https://api.github.com/repos/broadinstitute/cromwell/keys{/key_id}","collaborators_url":"https://api.github.com/repos/broadinstitute/cromwell/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/broadinstitute/cromwell/teams","hooks_url":"https://api.github.com/repos/broadinstitute/cromwell/hooks","issue_events_url":"https://api.github.com/repos/broadinstitute/cromwell/issues/events{/number}","events_url":"https://api.github.com/repos/broadinstitute/cromwell/events","assignees_url":"https://api.github.com/repos/broadinstitute/cromwell/assignees{/user}","branches_url":"https://api.github.com/repos/broadinstitute/cromwell/branches{/branch}","tags_url":"https://api.github.com/repos/broadinstitute/cromwell/tags","blobs_url":"https://api.github.com/repos/broadinstitute/cromwell/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/broadinstitute/cromwell/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/broadinstitute/cromwell/git/refs{/sha}","trees_url":"https://api.github.com/repos/broadinstitute/cromwell/git/trees{/sha}","statuses_url":"https://api.github.com/repos/broadinstitute/cromwell/statuses/{sha}","languages_url":"https://api.github.com/repos/broadinstitute/cromwell/languages","stargazers_url":"https://api.github.com/repos/broadinstitute/cromwell/stargazers","contributors_url":"https://api.github.com/repos/broadinstitute/cromwell/contributors","subscribers_url":"https://api.github.com/repos/broadinstitute/cromwell/subscribers","subscription_url":"https://api.github.com/repos/broadinstitute/cromwell/subscription","commits_url":"https://api.github.com/repos/broadinstitute/cromwell/commits{/sha}","git_commits_url":"https://api.github.com/repos/broadinstitute/cromwell/git/commits{/sha}","comments_url":"https://api.github.com/repos/broadinstitute/cromwell/comments{/number}","issue_comment_url":"https://api.github.com/repos/broadinstitute/cromwell/issues/comments{/number}","contents_url":"https://api.github.com/repos/broadinstitute/cromwell/contents/{+path}","compare_url":"https://api.github.com/repos/broadinstitute/cromwell/compare/{base}...{head}","merges_url":"https://api.github.com/repos/broadinstitute/cromwell/merges","archive_url":"https://api.github.com/repos/broadinstitute/cromwell/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/broadinstitute/cromwell/downloads","issues_url":"https://api.github.com/repos/broadinstitute/cromwell/issues{/number}","pulls_url":"https://api.github.com/repos/broadinstitute/cromwell/pulls{/number}","milestones_url":"https://api.github.com/repos/broadinstitute/cromwell/milestones{/number}","notifications_url":"https://api.github.com/repos/broadinstitute/cromwell/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/broadinstitute/cromwell/labels{/name}","releases_url":"https://api.github.com/repos/broadinstitute/cromwell/releases{/id}","created_at":"2015-04-17T19:39:36Z","updated_at":"2015-10-13T18:11:00Z","pushed_at":"2015-11-02T17:37:25Z","git_url":"git://github.com/broadinstitute/cromwell.git","ssh_url":"git@github.com:broadinstitute/cromwell.git","clone_url":"https://github.com/broadinstitute/cromwell.git","svn_url":"https://github.com/broadinstitute/cromwell","homepage":"","size":7699,"stargazers_count":9,"watchers_count":9,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":9,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/broadinstitute/cromwell/pulls/254"},"html":{"href":"https://github.com/broadinstitute/cromwell/pull/254"},"issue":{"href":"https://api.github.com/repos/broadinstitute/cromwell/issues/254"},"comments":{"href":"https://api.github.com/repos/broadinstitute/cromwell/issues/254/comments"},"review_comments":{"href":"https://api.github.com/repos/broadinstitute/cromwell/pulls/254/comments"},"review_comment":{"href":"https://api.github.com/repos/broadinstitute/cromwell/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/broadinstitute/cromwell/pulls/254/commits"},"statuses":{"href":"https://api.github.com/repos/broadinstitute/cromwell/statuses/15ac9139391c6efe02223ab307eb75a1bd4a0bd5"}}}}