A fix and a test case for gh-225 "Conventional logging"
If there is no pipe in the logger path, dont' assume it's a process to fork, rather, assume it's a file. Open the file in append mode and set up a signal handler for log rotation. Add log.rotate() function, doing the same as the signal handler, useful when one uses a built-in logger. The function does nothing if the logger is a pipe. Fixes gh-225
Showing
- src/box/box.cc 1 addition, 1 deletionsrc/box/box.cc
- src/box/replication.cc 1 addition, 1 deletionsrc/box/replication.cc
- src/lua/init.cc 3 additions, 1 deletionsrc/lua/init.cc
- src/lua/log.lua 4 additions, 0 deletionssrc/lua/log.lua
- src/say.cc 126 additions, 67 deletionssrc/say.cc
- src/say.h 4 additions, 1 deletionsrc/say.h
- test/app/logger.result 1 addition, 0 deletionstest/app/logger.result
- test/app/logger.test.lua 19 additions, 0 deletionstest/app/logger.test.lua
- test/lib/app_server.py 2 additions, 2 deletionstest/lib/app_server.py
- test/replication/hot_standby.lua 1 addition, 1 deletiontest/replication/hot_standby.lua
- test/replication/master.lua 1 addition, 1 deletiontest/replication/master.lua
- test/replication/replica.lua 1 addition, 1 deletiontest/replication/replica.lua
Loading
Please register or sign in to comment