diff --git a/README.md b/README.md index d44ffdc..725484a 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ Editing the plain text crontab is error prone for managing jobs, e.g., adding jo 2. Safe adding, deleting or pausing jobs. Easy to maintain hundreds of jobs. 3. Backup your crontabs. 4. Export crontab and deploy on other machines without much hassle. +5. Error log support (NEW) Read [this](http://lifepluslinux.blogspot.in/2015/06/crontab-ui-easy-and-safe-way-to-manage.html) to see more details. @@ -39,6 +40,9 @@ But make sure to take a backup before importing. ###See when the job is going to run next. ![future](http://4.bp.blogspot.com/-gN-wLmhd5Os/VX6fQ5wM2LI/AAAAAAAABcA/_Ej0PqrByBU/s1600/next.gif) +###Separate error log support for every job +![logs](http://alseambusher.github.io/files/crontab_ui_log_feature.gif) + ###Contribute Fork Crontab UI and contribute to it. Pull requests are encouraged. diff --git a/app.js b/app.js index d8cd387..f42893a 100755 --- a/app.js +++ b/app.js @@ -133,8 +133,12 @@ app.get(routes.import_crontab, function(req, res) { }) app.get(routes.logger, function(req, res) { - console.log(crontab.log_folder) - res.sendFile(crontab.log_folder +"/"+req.query.id+".log"); + var fs = require("fs"); + _file = crontab.log_folder +"/"+req.query.id+".log"; + if (fs.existsSync(_file)) + res.sendFile(_file); + else + res.end("No errors logged yet"); }) app.listen(app.get('port'), function() { diff --git a/package.json b/package.json index 4f511ba..ba2e1df 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "crontab-ui", - "version": "0.1.4", + "version": "0.1.5", "description": "Easy and safe way to manage your crontab file", "main": "index.js", "scripts": {