{"action":"created","issue":{"url":"https://api.github.com/repos/BigBrotherBot/big-brother-bot/issues/284","labels_url":"https://api.github.com/repos/BigBrotherBot/big-brother-bot/issues/284/labels{/name}","comments_url":"https://api.github.com/repos/BigBrotherBot/big-brother-bot/issues/284/comments","events_url":"https://api.github.com/repos/BigBrotherBot/big-brother-bot/issues/284/events","html_url":"https://github.com/BigBrotherBot/big-brother-bot/issues/284","id":56975309,"number":284,"title":"[b3.sh] setting LOG_ENABLED=\"1\" does not create log","user":{"login":"thomasleveil","id":42300,"avatar_url":"https://avatars.githubusercontent.com/u/42300?v=3","gravatar_id":"","url":"https://api.github.com/users/thomasleveil","html_url":"https://github.com/thomasleveil","followers_url":"https://api.github.com/users/thomasleveil/followers","following_url":"https://api.github.com/users/thomasleveil/following{/other_user}","gists_url":"https://api.github.com/users/thomasleveil/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasleveil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasleveil/subscriptions","organizations_url":"https://api.github.com/users/thomasleveil/orgs","repos_url":"https://api.github.com/users/thomasleveil/repos","events_url":"https://api.github.com/users/thomasleveil/events{/privacy}","received_events_url":"https://api.github.com/users/thomasleveil/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/BigBrotherBot/big-brother-bot/labels/bug","name":"bug","color":"e10c02"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-09T00:07:26Z","updated_at":"2015-02-09T11:06:02Z","closed_at":null,"body":"when setting `LOG_ENABLED=\"1\"` no log file is created, but if the log file exists then it gets written to.\r\n\r\nIt seems this is due to [`readlink -f`](https://github.com/BigBrotherBot/big-brother-bot/blob/release-1.10/scripts/b3.sh#L72) which set `LOG_FILE` to the empty string.\r\n\r\nI would be tempted to remove the `readlink -f` line all together but as it is not clear to me what purpose is has here I prefer opening this issue to discuss the proper way to deal with this."},"comment":{"url":"https://api.github.com/repos/BigBrotherBot/big-brother-bot/issues/comments/73491608","html_url":"https://github.com/BigBrotherBot/big-brother-bot/issues/284#issuecomment-73491608","issue_url":"https://api.github.com/repos/BigBrotherBot/big-brother-bot/issues/284","id":73491608,"user":{"login":"danielepantaleone","id":1245124,"avatar_url":"https://avatars.githubusercontent.com/u/1245124?v=3","gravatar_id":"","url":"https://api.github.com/users/danielepantaleone","html_url":"https://github.com/danielepantaleone","followers_url":"https://api.github.com/users/danielepantaleone/followers","following_url":"https://api.github.com/users/danielepantaleone/following{/other_user}","gists_url":"https://api.github.com/users/danielepantaleone/gists{/gist_id}","starred_url":"https://api.github.com/users/danielepantaleone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielepantaleone/subscriptions","organizations_url":"https://api.github.com/users/danielepantaleone/orgs","repos_url":"https://api.github.com/users/danielepantaleone/repos","events_url":"https://api.github.com/users/danielepantaleone/events{/privacy}","received_events_url":"https://api.github.com/users/danielepantaleone/received_events","type":"User","site_admin":false},"created_at":"2015-02-09T11:06:02Z","updated_at":"2015-02-09T11:06:02Z","body":" I'll provide this change later\n\nInviato da iPhone\n\n> Il giorno 09/feb/2015, alle ore 10:19, Thomas LÉVEIL <notifications@github.com> ha scritto:\n> \n> Instead of using readlink -f and changing directory, it seems safer to set a SCRIPT_DIR variable and use that variable later on:\n> \n> SCRIPTDIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\n> # ...\n> # LOG_FILE=\"$(readlink -f \"${LOG_PATH}\")\"\n> LOG_FILE=\"${SCRIPTDIR}/${LOG_PATH}\"\n> this way you don't either have to worry about eventual symbolic links (hence the no -P)\n> \n> —\n> Reply to this email directly or view it on GitHub.\n> \n"}}