-
Notifications
You must be signed in to change notification settings - Fork 138
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
CBG-3933 allow console logs to be rotated #7058
Conversation
Redocly previews |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't reviewed the API doc changes yet, but have done a full pass on the code changes.
- change log deletion to use regex to match all patterns of possible log paths - disable compression for console logs - restore stderr log collation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm OK with this approach but just have a few comments around getDeletionDirAndRegexp
Co-authored-by: Ben Brooks <[email protected]>
Co-authored-by: Ben Brooks <[email protected]>
* CBG-3933 allow console logs to be rotated * update log deletion tests - change log deletion to use regex to match all patterns of possible log paths - disable compression for console logs - restore stderr log collation * windows requires no slashes in path names * Apply suggestions from code review Co-authored-by: Ben Brooks <[email protected]> * Update base/logger_console_test.go Co-authored-by: Ben Brooks <[email protected]> * add missing import --------- Co-authored-by: Ben Brooks <[email protected]>
* CBG-3933 allow console logs to be rotated * update log deletion tests - change log deletion to use regex to match all patterns of possible log paths - disable compression for console logs - restore stderr log collation * windows requires no slashes in path names * Apply suggestions from code review Co-authored-by: Ben Brooks <[email protected]> * Update base/logger_console_test.go Co-authored-by: Ben Brooks <[email protected]> * add missing import --------- Co-authored-by: Ben Brooks <[email protected]>
initLumberjackLogger
to initialize a lumberjack logging for fileslogCollationWorker
since we would never exit the go routine. In order to close this gap, I addedFileLogger.closed
channel, since the following events have to happen in order:allOf
to allow for composition of data structures to override the max age parameters.Notes:
max_age=6
is right for the stats logger. It probably doesn't matter since we never hit it.max_age=0
because I wanted to conform to the API. That said, as above our API isn't documented. I don't know what it worse, losing console logs or filing up disks.Pre-review checklist
fmt.Print
,log.Print
, ...)base.UD(docID)
,base.MD(dbName)
)docs/api
Integration Tests
GSI=true,xattrs=true
https://jenkins.sgwdev.com/job/SyncGateway-Integration/2648/