{"action":"created","issue":{"url":"https://api.github.com/repos/triAGENS/ArangoDB/issues/1226","labels_url":"https://api.github.com/repos/triAGENS/ArangoDB/issues/1226/labels{/name}","comments_url":"https://api.github.com/repos/triAGENS/ArangoDB/issues/1226/comments","events_url":"https://api.github.com/repos/triAGENS/ArangoDB/issues/1226/events","html_url":"https://github.com/triAGENS/ArangoDB/issues/1226","id":55550748,"number":1226,"title":"arangod log issues","user":{"login":"pekeler","id":42363,"avatar_url":"https://avatars.githubusercontent.com/u/42363?v=3","gravatar_id":"","url":"https://api.github.com/users/pekeler","html_url":"https://github.com/pekeler","followers_url":"https://api.github.com/users/pekeler/followers","following_url":"https://api.github.com/users/pekeler/following{/other_user}","gists_url":"https://api.github.com/users/pekeler/gists{/gist_id}","starred_url":"https://api.github.com/users/pekeler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pekeler/subscriptions","organizations_url":"https://api.github.com/users/pekeler/orgs","repos_url":"https://api.github.com/users/pekeler/repos","events_url":"https://api.github.com/users/pekeler/events{/privacy}","received_events_url":"https://api.github.com/users/pekeler/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/triAGENS/ArangoDB/labels/core","name":"core","color":"0066ff"},{"url":"https://api.github.com/repos/triAGENS/ArangoDB/labels/foxx","name":"foxx","color":"66aaff"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-26T23:03:35Z","updated_at":"2015-01-27T07:56:28Z","closed_at":null,"body":"using 2.4.1 on a mac\r\n\r\nI was running `arangod --javascript.dev-app-path foxx db` to develop a new Foxx app. At some point I made a mistake (I forgot to require a model in my controller) and my page didn't load anymore (`{\"error\":true,\"code\":404,\"errorNum\":404,\"errorMessage\":\"unknown path 'dev/arango_react/index.html'\"}`). This brings me to my first point: it would be nice if this error message was a bit closer to the actual cause.\r\n\r\nThere was no indication on stdout of any problem. So I restarted arangod and the stdout looked all good but I was puzzled why my app was gone now (from http://localhost:8529/_db/_system/_admin/aardvark/standalone.html#applications). After wasting some time trying to mount my app with foxxmanager, I come across arangod.log which shows the root cause of my problem (the missing require).\r\n\r\nShouldn't arangod print some sort of warning to stdout if it can't load the application?\r\n\r\n arangod --help claims that --log.file defaults to + but that is clearly not the case because if I start it up with `arangod --javascript.dev-app-path foxx --log.file + db` it is way more talkative.\r\n\r\nHowever, even with `arangod --javascript.dev-app-path foxx --log.file + --log.level debug db` there's still no indication whatsoever about the bug in my application when starting up. Only when I make a request to my app do I see the error now (which I didn't realize immediately).\r\n\r\nLong story to give you some beginner's feedback. The big issue that I think needs fixing is that either\r\n- launching arangod without log parameters should log to stdout\r\n- or `arangod --help` shouldn't claim + is the default, and all the tutorials should be updated to include `--log.file +`"},"comment":{"url":"https://api.github.com/repos/triAGENS/ArangoDB/issues/comments/71603884","html_url":"https://github.com/triAGENS/ArangoDB/issues/1226#issuecomment-71603884","issue_url":"https://api.github.com/repos/triAGENS/ArangoDB/issues/1226","id":71603884,"user":{"login":"jsteemann","id":1423118,"avatar_url":"https://avatars.githubusercontent.com/u/1423118?v=3","gravatar_id":"","url":"https://api.github.com/users/jsteemann","html_url":"https://github.com/jsteemann","followers_url":"https://api.github.com/users/jsteemann/followers","following_url":"https://api.github.com/users/jsteemann/following{/other_user}","gists_url":"https://api.github.com/users/jsteemann/gists{/gist_id}","starred_url":"https://api.github.com/users/jsteemann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsteemann/subscriptions","organizations_url":"https://api.github.com/users/jsteemann/orgs","repos_url":"https://api.github.com/users/jsteemann/repos","events_url":"https://api.github.com/users/jsteemann/events{/privacy}","received_events_url":"https://api.github.com/users/jsteemann/received_events","type":"User","site_admin":false},"created_at":"2015-01-27T07:56:28Z","updated_at":"2015-01-27T07:56:28Z","body":"Thanks for the feedback! I think you pointed us at two things which can be confusing for users.\r\n\r\nI think there are a two issues to sort out:\r\n* 404 errors are showing when a route that was called is not available. Among other things, non-availability can be caused by an issue in the JavaScript file that defines the routes. For example, if the file defining the routes contains a parse error, there is no way for ArangoDB to figure out which routes should have been there if it were correct. However, getting just a 404 isn't helpful during development. My suggestion to fix this is to install a special error route handler for any apps that cannot be mounted, for whatever reason. This error handler could print the exception (and stack trace) that was caught when trying to mount the app. This would be very helpful for developers from my point of view. @fceller, @mchacki: what do you think about this?\r\n* when invoking `arangod --help` manually, it will print its defaults. The default for `--log-file` is `+` indeed. I think the confusion about ArangoDB not logging to stdout when started regularly arises because then it is given a config file, which has different settings for logging. I think the default config file contains the value `./log/arangodb/arangodb.log` so ArangoDB will log there when given the config file or started as a service. I admit this might be confusing. Obviously you don't want to log to stderr/stdout when ArangoDB is started as a service, but for development and manual starts it might be better to always have log messages printed on the console. Maybe a solution is to always log to stdout/stderr if arangod was started by a terminal, and use `--log.file` for additional, file-based logging only? @fceller, @mchacki: what do you think about this?"}}