Documentation ¶
Overview ¶
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func NewLoggerBuilder() builder
- type FLogger
- type FLoggerImpl
- func (l *FLoggerImpl) Debug(args ...interface{})
- func (l *FLoggerImpl) Debugf(format string, args ...interface{})
- func (l *FLoggerImpl) Info(args ...interface{})
- func (l *FLoggerImpl) Infof(format string, args ...interface{})
- func (l *FLoggerImpl) SpinnerMessage(msg string)
- func (l *FLoggerImpl) StartSpinner(msg string) error
- func (l *FLoggerImpl) StopSpinner(err error) error
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLoggerBuilder ¶
func NewLoggerBuilder() builder
Types ¶
type FLoggerImpl ¶
type FLoggerImpl struct {
// contains filtered or unexported fields
}
func (*FLoggerImpl) Debug ¶
func (l *FLoggerImpl) Debug(args ...interface{})
Example ¶
logger, _ := NewLoggerBuilder().Build() logger.Debug("test debug log with debug disabled")
Output:
Example (WithDebugEnabled) ¶
logger, _ := NewLoggerBuilder().WithDebug(true).Build() logger.Debug("test debug log with debug enabled")
Output: DEBUG: test debug log with debug enabled
func (*FLoggerImpl) Debugf ¶
func (l *FLoggerImpl) Debugf(format string, args ...interface{})
Example ¶
logger, _ := NewLoggerBuilder().Build() logger.Debugf("test debug log %s with debug disabled", "with format")
Output:
Example (WithDebugEnabled) ¶
logger, _ := NewLoggerBuilder().WithDebug(true).Build() logger.Debugf("test debug log %s with debug enabled", "with format")
Output: DEBUG: test debug log with format with debug enabled
func (*FLoggerImpl) Info ¶
func (l *FLoggerImpl) Info(args ...interface{})
Example ¶
logger, _ := NewLoggerBuilder().Build() logger.Info("test info log")
Output: test info log
func (*FLoggerImpl) Infof ¶
func (l *FLoggerImpl) Infof(format string, args ...interface{})
Example ¶
logger, _ := NewLoggerBuilder().Build() logger.Infof("test info log %s", "with format")
Output: test info log with format
func (*FLoggerImpl) SpinnerMessage ¶
func (l *FLoggerImpl) SpinnerMessage(msg string)
func (*FLoggerImpl) StartSpinner ¶
func (l *FLoggerImpl) StartSpinner(msg string) error
func (*FLoggerImpl) StopSpinner ¶
func (l *FLoggerImpl) StopSpinner(err error) error