{"action":"opened","issue":{"url":"https://api.github.com/repos/Unitech/PM2/issues/1054","labels_url":"https://api.github.com/repos/Unitech/PM2/issues/1054/labels{/name}","comments_url":"https://api.github.com/repos/Unitech/PM2/issues/1054/comments","events_url":"https://api.github.com/repos/Unitech/PM2/issues/1054/events","html_url":"https://github.com/Unitech/PM2/issues/1054","id":59253672,"number":1054,"title":"Pm2 fails silently if log directory doesn't exist in json app declaration","user":{"login":"michaelBenin","id":521971,"avatar_url":"https://avatars.githubusercontent.com/u/521971?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelBenin","html_url":"https://github.com/michaelBenin","followers_url":"https://api.github.com/users/michaelBenin/followers","following_url":"https://api.github.com/users/michaelBenin/following{/other_user}","gists_url":"https://api.github.com/users/michaelBenin/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelBenin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelBenin/subscriptions","organizations_url":"https://api.github.com/users/michaelBenin/orgs","repos_url":"https://api.github.com/users/michaelBenin/repos","events_url":"https://api.github.com/users/michaelBenin/events{/privacy}","received_events_url":"https://api.github.com/users/michaelBenin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-27T15:50:54Z","updated_at":"2015-02-27T15:50:54Z","closed_at":null,"body":"With this configuration:\r\n\r\n````\r\n{\r\n  \"apps\": [\r\n    {\r\n      \"name\": \"app_name_port_number\",\r\n      \"cwd\": \".\",\r\n      \"script\": \"app.js\",\r\n      \"ignoreWatch\": [\r\n        \"logs\",\r\n        \"test\",\r\n        \"static\",\r\n        \"browser\",\r\n        \"node_modules\"\r\n      ],\r\n      \"watch\": [\r\n        \"app.js\",\r\n        \"app\",\r\n        \"config\",\r\n        \"lib\"\r\n      ],\r\n      \"max_memory_restart\" : \"450M\",\r\n      \"merge_logs\": true,\r\n      \"log_file\"   : \"logs/pm2_child.log\",\r\n      \"error_file\" : \"logs/pm2_error.log\",\r\n      \"out_file\"   : \"logs/pm2_child_out.log\",\r\n      \"exec_interpreter\": \"node\",\r\n      \"env\": {\r\n        \"NODE_ENV\": \"development\"\r\n      },\r\n      \"env_development\": {\r\n        \"NODE_ENV\": \"development\"\r\n      }\r\n    }\r\n  ]\r\n}\r\n````\r\nIf the logs directory doesn't exist pm2 silently fails, it should give a warning stating that the directory doesn't exist and then create the directory and run normally,  or fail with an error message stating that the log directory needs to be created in order to have these configured log files from the json config. \r\n"}}