Rotate fails with applicatoin shutdown
See original GitHub issueI see the following in my application’s logs:
events.js:160
throw er; // Unhandled 'error' event
^
Error: write after end
at writeAfterEnd (_stream_writable.js:193:12)
at RotatingFileStream.Writable.write (_stream_writable.js:240:5)
at Array.logRequest (/usr/local/dcos-universe-browser/node_modules/morgan/index.js:130:14)
at listener (/usr/local/dcos-universe-browser/node_modules/on-finished/index.js:169:15)
at onFinish (/usr/local/dcos-universe-browser/node_modules/on-finished/index.js:100:5)
at callback (/usr/local/dcos-universe-browser/node_modules/ee-first/index.js:55:10)
at ServerResponse.onevent (/usr/local/dcos-universe-browser/node_modules/ee-first/index.js:93:5)
at emitNone (events.js:91:20)
at ServerResponse.emit (events.js:185:7)
at finish (_http_outgoing.js:596:10)
This occurs every night at 00:00 UTC. I use it like this:
// Create a rotating write stream
var accessLogStream = rotatingFileStream(function(time, index) {
if (!time) time = new Date();
return 'access-' + time.toISOString().substr(0,10).split('-').join('') + '.log'
}, {
interval: '1d', // rotate daily
path: logDirectory
});
Is there a hint where the problem can arise from? Thanks!
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Unexpected display rotation after you close an application in ...
In this scenario, when you close the application or the volume control, the screen returns to desktop in the native display orientation. Cause....
Read more >Android application stop unexpectedly when rotate
As for the "unexpected" stop, it is because when you rotate, the Activity is reloaded (onCreate is run again, etc), and you probably...
Read more >How to Fix Auto Rotate Not Working on Android
Fix Auto-Rotate Issues by Restarting Your Android Phone · Turn On Screen Rotation From Android Settings · Use the In-App Screen Rotation Option....
Read more >7 ways to fix Android screen rotation not working - Carlcare
7 ways to fix Android screen rotation not working · Restart your phone · Check Auto-rotation settings · Calibrate phone's sensors · Check...
Read more >Prevent Android app from restarting on rotate / hardware ...
Problem. When I rotate the device (change orientation) or pop out the hardware keyboard, my Activity gets paused ( onPause() ), stopped ...
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 Free
Top 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
Your filename generator function does not accept the time parameter. Change this and apply same change I already suggested…
@iccicci everything goes well. many thanks for your help.