Avoid opening log output before start &

Replace tracing logs with task monitor
This commit is contained in:
世界
2023-12-04 11:47:25 +08:00
parent f998ccecde
commit abd4d8b367
14 changed files with 231 additions and 266 deletions

View File

@@ -15,6 +15,14 @@ func NewNOPFactory() ObservableFactory {
return (*nopFactory)(nil)
}
func (f *nopFactory) Start() error {
return nil
}
func (f *nopFactory) Close() error {
return nil
}
func (f *nopFactory) Level() Level {
return LevelTrace
}
@@ -72,10 +80,6 @@ func (f *nopFactory) FatalContext(ctx context.Context, args ...any) {
func (f *nopFactory) PanicContext(ctx context.Context, args ...any) {
}
func (f *nopFactory) Close() error {
return nil
}
func (f *nopFactory) Subscribe() (subscription observable.Subscription[Entry], done <-chan struct{}, err error) {
return nil, nil, os.ErrInvalid
}