Documentation
¶
Overview ¶
Copyright 2023 The acquirecloud Authors
Licensed 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.
Package logging contains an abstract logging interface and methods that may be used with any logging engine. So as logging is extensively used in any application, it may not be easy to switch from one logging solution to another. Another reason is the unified logging approach, which helps to interpret the logs from different applications in the same way.
Copyright 2023 The acquirecloud Authors ¶
Licensed 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.
Copyright 2023 The acquirecloud Authors ¶
Licensed 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 ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { // NewLoggerF points to the function to construct new Logger NewLoggerF func(loggerName string) Logger // SetLevelF points to the function to set specific logger level SetLevelF func(lvl Level) // GetLevelF returns the current log level GetLevelF func() Level }
Config struct allows to set the current logger settings
type Logger ¶
type Logger interface { // Warnf is a function for printing Warn-level messages from the source code Warnf(format string, args ...interface{}) // Infof is a function for printing Info-level messages from the source code Infof(format string, args ...interface{}) // Debugf is a function for printing Debug-level messages from the source code Debugf(format string, args ...interface{}) // Tracef is a function for pretty printing Trace-level messages from the source code Tracef(format string, args ...interface{}) // Errorf is a function for pretty printing Error-level messages from the source code Errorf(format string, args ...interface{}) }
Logger interface exposes some methods for application logging