// Convenience method to initialize rlog with a single (error-level) gocheck // logger and start rlog. Can be called at the start of your test method or in // your test setup. Remember to put "defer rlog.Flush()" either in your test // method(s) or test teardown method. The test teardown is invoked before the // success/failure of the gocheck test is evaluated. func StartGoCheckLogger(c *gocheck.C) { rlog.ResetState() rlog.EnableModule(NewGoCheckLogger(c)) rlogConf := rlog.GetDefaultConfig() rlogConf.Severity = rlog.SeverityError rlog.Start(rlogConf) }
// Convenience method to initialize rlog with a single (error-level) testing // logger and start rlog. Remember to put "defer rlog.Flush()" somewhere in your // test method(s). func StartTestingLogger(t *testing.T) { rlog.ResetState() rlog.EnableModule(NewTestingLogger(t)) rlogConf := rlog.GetDefaultConfig() rlogConf.Severity = rlog.SeverityError rlog.Start(rlogConf) }