View definition

func ReplaceLogger

Defined in github.com/cihub/seelog/log.go

Description

ReplaceLogger acts as UseLogger but the logger that was previously used is disposed (except Default and Disabled loggers).

Example:

import log "github.com/cihub/seelog"

func main() {
    logger, err := log.LoggerFromConfigAsFile("seelog.xml")

    if err != nil {
        panic(err)
    }

    log.ReplaceLogger(logger)
    defer log.Flush()

    log.Trace("test")
    log.Debugf("var = %s", "abc")
}