-
Notifications
You must be signed in to change notification settings - Fork 1.5k
rorate: add eventroratesize, eventroratetime to support file rorate #720 #794
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
Conversation
add param eventroratesize and eventroratetime to support event log rorate
full help info
|
c5e0e01
to
1dc1106
Compare
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.
Please modify it according to the comments, thank you.
61e7889
to
a8bc897
Compare
user/config/iconfig.go
Outdated
LoggerAddr string `json:"logger_addr"` // Address for logger output | ||
LoggerType uint8 `json:"logger_type"` // Logger type (0:stdout, 1:file, 2:tcp) | ||
EventCollectorAddr string `json:"event_collector_addr"` // Address of the event collector server | ||
EventCollectorRorateSize uint16 `json:"event_collector_rate_size"` // Rate size(MB) of the event collector file, 1M~65535M, only works for collector server is file |
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.
This is also redundant. Please restore this file.
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.
These two variables are used by globalConf.EventCollectorAddr and globalConf.EventCollectorRorateSize, cannot be removed
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.
Revert this file.
Add variable life
Please add rorateSize
and rorateTime
after ByteCodeFiles
at line 51 in the cmd/root.go
file, as well as the following changes.
rootCmd.PersistentFlags().Uint16Var(&rorateSize, "eventroratesize", 0, "the rorate size(MB) of the event collector file, 1M~65535M, only works for eventaddr server is file. --eventaddr=tls.log --eventroratesize=1 --eventroratetime=30")
rootCmd.PersistentFlags().Uint16Var(&rorateTime, "eventroratetime", 0, "the rorate time(s) of the event collector file, 1s~65535s, only works for eventaddr server is file. --eventaddr=tls.log --eventroratesize=1 --eventroratetime=30")
Remove code
rorateSize := globalConf.EventCollectorRorateSize
rorateTime := globalConf.EventCollectorRorateTime
a8bc897
to
c19ab03
Compare
1d45bb8
to
c9b3a4b
Compare
user/config/iconfig.go
Outdated
LoggerAddr string `json:"logger_addr"` // Address for logger output | ||
LoggerType uint8 `json:"logger_type"` // Logger type (0:stdout, 1:file, 2:tcp) | ||
EventCollectorAddr string `json:"event_collector_addr"` // Address of the event collector server | ||
EventCollectorRorateSize uint16 `json:"event_collector_rate_size"` // Rate size(MB) of the event collector file, 1M~65535M, only works for collector server is file |
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.
Revert this file.
Add variable life
Please add rorateSize
and rorateTime
after ByteCodeFiles
at line 51 in the cmd/root.go
file, as well as the following changes.
rootCmd.PersistentFlags().Uint16Var(&rorateSize, "eventroratesize", 0, "the rorate size(MB) of the event collector file, 1M~65535M, only works for eventaddr server is file. --eventaddr=tls.log --eventroratesize=1 --eventroratetime=30")
rootCmd.PersistentFlags().Uint16Var(&rorateTime, "eventroratetime", 0, "the rorate time(s) of the event collector file, 1s~65535s, only works for eventaddr server is file. --eventaddr=tls.log --eventroratesize=1 --eventroratetime=30")
Remove code
rorateSize := globalConf.EventCollectorRorateSize
rorateTime := globalConf.EventCollectorRorateTime
c9b3a4b
to
2774e18
Compare
…ojue#720 Signed-off-by: chilli <chilli19890121@gmail.com>
2774e18
to
42fa386
Compare
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.
LGTM, Thanks,
#720