Studio Logs: Could not open log file on Studio when error occurred on Windows - #1243
Studio Logs: Could not open log file on Studio when error occurred on Windows#1243gavande1 wants to merge 3 commits into
Conversation
0427c70 to
b972263
Compare
sejas
left a comment
There was a problem hiding this comment.
Thank you for creating this PR. I tested it, and it works as expected on Windows. My only concern is hardcoding the filename to .0.log.
I went ahead and created a PR saving the log file returned by FileStreamRotator, so it will work even if it rotates the file multiple times. Let me know what you think.
| app.setAppLogsPath(); | ||
| } | ||
|
|
||
| const isWindows = platform() === 'win32'; |
There was a problem hiding this comment.
We have a function isWindows but it seems it only works in the front-end. So It's ok to make the comparison here.
| const today = new Date().toISOString().split( 'T' )[ 0 ].replace( /-/g, '' ); | ||
| currentLogFile = path.join( logDir, `studio-${ today }.0.log` ); |
There was a problem hiding this comment.
I know our current log file size is 5MB, and the chances of reaching that limit are very low, but in theory, it's possible, and in those cases, the .0.log will fail. Building the date from scratch seems a bit flaky. What do you think about setting the current log file dynamically?
|
I am closing this PR in favour of #1245. |
Related issues
Proposed Changes
Testing Instructions
Pre-merge Checklist