mirror of https://bitbucket.org/ausocean/av.git
Merged in change-of-logger-package (pull request #91)
Change of logger package Approved-by: Alan Noble <anoble@gmail.com>
This commit is contained in:
commit
6d61ff7c25
|
@ -33,7 +33,8 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"bitbucket.org/ausocean/av/revid"
|
"bitbucket.org/ausocean/av/revid"
|
||||||
"bitbucket.org/ausocean/utils/smartlogger"
|
"bitbucket.org/ausocean/iot/pi/smartlogger"
|
||||||
|
"bitbucket.org/ausocean/utils/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -61,11 +62,11 @@ func main() {
|
||||||
RtmpMethod: revid.LibRtmp,
|
RtmpMethod: revid.LibRtmp,
|
||||||
RtmpUrl: *rtmpUrlPtr,
|
RtmpUrl: *rtmpUrlPtr,
|
||||||
Packetization: revid.Flv,
|
Packetization: revid.Flv,
|
||||||
Logger: smartlogger.New(logger.Info, logPath),
|
Logger: logger.New(logger.Info, &smartlogger.New(logPath).LogRoller),
|
||||||
}
|
}
|
||||||
revidInst, err := revid.New(config, nil)
|
revidInst, err := revid.New(config, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
config.log.Log(logger.Error, "Should not have got an error!: ", err.Error())
|
config.Logger.Log(logger.Error, "Should not have got an error!: ", err.Error())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
revidInst.Start()
|
revidInst.Start()
|
||||||
|
|
|
@ -31,7 +31,8 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"bitbucket.org/ausocean/av/revid"
|
"bitbucket.org/ausocean/av/revid"
|
||||||
"bitbucket.org/ausocean/utils/smartlogger"
|
"bitbucket.org/ausocean/iot/pi/smartlogger"
|
||||||
|
"bitbucket.org/ausocean/utils/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -52,11 +53,11 @@ func main() {
|
||||||
Output1: revid.File,
|
Output1: revid.File,
|
||||||
OutputFileName: outputFile,
|
OutputFileName: outputFile,
|
||||||
Packetization: revid.Mpegts,
|
Packetization: revid.Mpegts,
|
||||||
Logger: smartlogger.New(logger.Info, logPath),
|
Logger: logger.New(logger.Info, &smartlogger.New(logPath).LogRoller),
|
||||||
}
|
}
|
||||||
revidInst, err := revid.New(config, nil)
|
revidInst, err := revid.New(config, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
config.log.Log(logger.Error, "Should not have got an error!:", err.Error())
|
config.Logger.Log(logger.Error, "Should not have got an error!:", err.Error())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
revidInst.Start()
|
revidInst.Start()
|
||||||
|
|
Loading…
Reference in New Issue