mirror of
https://github.com/wassname/catalyst.git
synced 2026-08-18 11:50:11 +08:00
BUG: Logbook 0.10.0 requires explicit handler
As of logbook 0.10.0, logbook no longer installs a default handler, which means that if the application doesn't install one, log messages disappear into the ether. Therefore, all of our scripts with `__main__` endpoints need to push a `logbook.StderrHandler` if they're not already pushing some other handler.
This commit is contained in:
@@ -14,11 +14,13 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import logbook
|
||||
import sys
|
||||
|
||||
from zipline.utils import parse_args, run_pipeline
|
||||
|
||||
if __name__ == "__main__":
|
||||
logbook.StderrHandler().push_application()
|
||||
parsed = parse_args(sys.argv[1:])
|
||||
run_pipeline(print_algo=True, **parsed)
|
||||
sys.exit(0)
|
||||
|
||||
Reference in New Issue
Block a user