You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
214 B

3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
  1. package main
  2. import (
  3. "git.drinkme.beer/yinghe/log"
  4. )
  5. func main() {
  6. spec := "@daily"
  7. log.RegisterRotationWithSpec(`./logs/cmd`, spec)
  8. log.RegisterRotation("./log/cmd")
  9. log.Infof("ping")
  10. log.Infof("pong")
  11. }