Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log4js.fileAppender - Writing to file ../logfile/2015-7-10.log, error happened #314

Closed
Messilimeng opened this issue Jul 10, 2015 · 5 comments

Comments

@Messilimeng
Copy link

error in linux

{ [Error: ENOENT, open '../logfile/2015-7-10.log'] errno: -2, code: 'ENOENT', path: '../logfile/2015-7-10.log' }

@nomiddlename
Copy link
Collaborator

You're going to have to give me a bit more to work with here. What does your log4js config look like? Does the "logfile" directory exist? log4js won't create directories.

@Messilimeng
Copy link
Author

log4js config

var log4js = require('log4js');

log4js.configure({
appenders: [{
type: 'console'
}, {
type: 'file',
filename: '../logfile/'+ new Date().getFullYear() + "-"+ (new Date().getMonth()+ 1) + "-"+ new Date().getDate()+'.log',
category: 'cheese'
}]
});

module.exports.logger = log4js.getLogger('cheese');

@nomiddlename
Copy link
Collaborator

Closing this - assuming that the user managed to get it to work.

@jayaprasanth-g
Copy link

How can i use this on backbone.js with require.js ? I'm tried but is not working. Can you please help me out this!

@ciglesiasweb
Copy link

I have the same problem on my EC2 instance:

log4js.fileAppender - Writing to file /home/........../logs/app.log, error happened { Error: EACCES: permission denied, open '/home/..........//logs/app.log'
errno: -13,
code: 'EACCES',
syscall: 'open',
path: '/home/..........//logs/app.log'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants