{"action":"created","issue":{"url":"https://api.github.com/repos/lucagrulla/node-tail/issues/32","labels_url":"https://api.github.com/repos/lucagrulla/node-tail/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/lucagrulla/node-tail/issues/32/comments","events_url":"https://api.github.com/repos/lucagrulla/node-tail/issues/32/events","html_url":"https://github.com/lucagrulla/node-tail/issues/32","id":122297760,"number":32,"title":"Error when file does not exist yet \"Error: ENOENT, no such file or directory ...\"","user":{"login":"InstanceOfMichael","id":4094542,"avatar_url":"https://avatars.githubusercontent.com/u/4094542?v=3","gravatar_id":"","url":"https://api.github.com/users/InstanceOfMichael","html_url":"https://github.com/InstanceOfMichael","followers_url":"https://api.github.com/users/InstanceOfMichael/followers","following_url":"https://api.github.com/users/InstanceOfMichael/following{/other_user}","gists_url":"https://api.github.com/users/InstanceOfMichael/gists{/gist_id}","starred_url":"https://api.github.com/users/InstanceOfMichael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/InstanceOfMichael/subscriptions","organizations_url":"https://api.github.com/users/InstanceOfMichael/orgs","repos_url":"https://api.github.com/users/InstanceOfMichael/repos","events_url":"https://api.github.com/users/InstanceOfMichael/events{/privacy}","received_events_url":"https://api.github.com/users/InstanceOfMichael/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-15T15:32:06Z","updated_at":"2015-12-18T19:29:46Z","closed_at":null,"body":"```\r\nfs.js:797\r\n  return binding.stat(pathModule._makeLong(path));\r\n                 ^\r\nError: ENOENT, no such file or directory '../storage/logstash/20151215-fpm-fcgi.log'\r\n    at Error (native)\r\n    at Object.fs.statSync (fs.js:797:18)\r\n    at new Tail (/home/forge/www/client1/logwatch/node_modules/tail/tail.js:67:16)\r\n    at /home/forge/www/client1/logwatch/server.js:32:16\r\n    at Array.forEach (native)\r\n    at Object.<anonymous> (/home/forge/www/client1/logwatch/server.js:30:3)\r\n    at Module._compile (module.js:460:26)\r\n    at Object.Module._extensions..js (module.js:478:10)\r\n    at Module.load (module.js:355:32)\r\n    at Function.Module._load (module.js:310:12)\r\n```\r\n\r\nA. In my use-case scenario I think it would be safe to ``touch`` this file first. I'm a little new to streams and tails. Is that the recommended action?\r\n\r\nB. Any advice for tailing a daily log (e.g. opening a new tail every midnight)?"},"comment":{"url":"https://api.github.com/repos/lucagrulla/node-tail/issues/comments/165877392","html_url":"https://github.com/lucagrulla/node-tail/issues/32#issuecomment-165877392","issue_url":"https://api.github.com/repos/lucagrulla/node-tail/issues/32","id":165877392,"user":{"login":"InstanceOfMichael","id":4094542,"avatar_url":"https://avatars.githubusercontent.com/u/4094542?v=3","gravatar_id":"","url":"https://api.github.com/users/InstanceOfMichael","html_url":"https://github.com/InstanceOfMichael","followers_url":"https://api.github.com/users/InstanceOfMichael/followers","following_url":"https://api.github.com/users/InstanceOfMichael/following{/other_user}","gists_url":"https://api.github.com/users/InstanceOfMichael/gists{/gist_id}","starred_url":"https://api.github.com/users/InstanceOfMichael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/InstanceOfMichael/subscriptions","organizations_url":"https://api.github.com/users/InstanceOfMichael/orgs","repos_url":"https://api.github.com/users/InstanceOfMichael/repos","events_url":"https://api.github.com/users/InstanceOfMichael/events{/privacy}","received_events_url":"https://api.github.com/users/InstanceOfMichael/received_events","type":"User","site_admin":false},"created_at":"2015-12-18T19:29:46Z","updated_at":"2015-12-18T19:29:46Z","body":"Maybe \"touch first\" should be an option?\r\n\r\nI'm also finding that if I use the ``{ fromBeginning: true }`` option, I need to touch again after if the file is not actively being written to."}}