6
6
"github.com/reggiepy/LogBeetle/pkg/config"
7
7
"github.com/reggiepy/LogBeetle/pkg/consumer/logconsumer"
8
8
"github.com/reggiepy/LogBeetle/pkg/consumer/nsqconsumer"
9
+ "github.com/reggiepy/LogBeetle/pkg/convert"
9
10
"github.com/reggiepy/LogBeetle/pkg/logger"
10
11
"github.com/reggiepy/LogBeetle/pkg/producer/nsqproducer"
11
12
"github.com/reggiepy/LogBeetle/pkg/worker"
@@ -58,7 +59,8 @@ var rootCmd = cobra.Command{
58
59
Version : "" ,
59
60
Run : func (cmd * cobra.Command , args []string ) {
60
61
_ = config .ShowConfig ("simple" )
61
- err := logger .InitLogger (config .Instance )
62
+ loggerConfig , err := convert .ConfigToLoggerConfig (config .Instance )
63
+ err = logger .InitLogger (* loggerConfig )
62
64
if err != nil {
63
65
fmt .Println (err .Error ())
64
66
os .Exit (1 )
@@ -183,7 +185,6 @@ func serverStart() {
183
185
Address : nsqConfig .NSQDAddress ,
184
186
AuthSecret : nsqConfig .AuthSecret ,
185
187
Topic : "test" ,
186
- Channel : "test_channel" ,
187
188
}, "test.log" ),
188
189
)
189
190
@@ -196,7 +197,6 @@ func serverStart() {
196
197
Address : nsqConfig .NSQDAddress ,
197
198
AuthSecret : nsqConfig .AuthSecret ,
198
199
Topic : consumerConfig .Topic ,
199
- Channel : consumerConfig .Channel ,
200
200
}, consumerConfig .FileName ),
201
201
)
202
202
}
0 commit comments