No log files are being created
See original GitHub issueOS: Ubuntu 14.04 NodeJS: 6.2.0 Winston: 2.2.0
The following code does not create a log file:
const logger = new Winston.Logger({
level: 'verbose',
transports: [
new Winston.transports.Console({
timestamp: true
}),
new Winston.transports.File({
filename: 'app.log',
timestamp: true
})
]
});
logger.info('Holla');
It logs to the terminal fine:
2016-05-26T13:11:49.927Z - info: Holla
But no log file created.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:32
- Comments:28 (3 by maintainers)
Top Results From Across the Web
log File not generating in log4j - Stack Overflow
I have created a sample java program implementing log4j in it. Below is the java program: package logging; import org.apache.log4j.
Read more >IIS not creating log files.. - TechNet - Microsoft
So Im running Server 1012 r2 and Exchange 2013 and in preparing for a migration to Exchange online I discovered that IIS is...
Read more >No syslog data received or no log files being created - Fastvue
1. Try browsing to the web Interface using a different browser and/or machine. · 2. Check your devices are sending syslog traffic to...
Read more >No log file (Java) - New Relic Documentation
How to ensure your New Relic Java agent has been configured to generate log files, by checking the log file directory, config files,...
Read more >Chapter 23. Viewing and Managing Log Files
However, it is advisable to create a separate configuration file for any specific log file in the /etc/logrotate.d/ directory and define any configuration ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I just ran into this issue. The directory has to exist first. winston will create new files for you, but it doesn’t appear to create new directories for you (e.g., you need to create the “logs” directory if you are trying to log in a file located at logs/app.js)
I fixed this problem my giving the absolute path like that:
winston.add(winston.transports.File, { filename:
${__dirname}/logs/appError.log})