mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-16 05:39:54 +05:00
Add constant for export logger
This commit is contained in:
committed by
Dan Christian Bogos
parent
b55dc3d3a8
commit
45f6730878
@@ -25,14 +25,11 @@ import (
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
|
||||
const WRITE = 8
|
||||
|
||||
func NewLogger(loggerType, tenant, nodeID string, level int, connMgr *ConnManager,
|
||||
eesConns []string) (utils.LoggerInterface, error) {
|
||||
switch loggerType {
|
||||
case "*exporter":
|
||||
case utils.MetaExportLog:
|
||||
return NewExportLogger(nodeID, tenant, level, connMgr, eesConns), nil
|
||||
|
||||
default:
|
||||
return utils.NewLogger(loggerType, nodeID, level)
|
||||
}
|
||||
@@ -76,7 +73,7 @@ func (el *ExportLogger) call(m string, level int) error {
|
||||
|
||||
func (el *ExportLogger) Write(p []byte) (n int, err error) {
|
||||
n = len(p)
|
||||
err = el.call(string(p), WRITE)
|
||||
err = el.call(string(p), 8)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user