Categorygithub.com/d3code/zlog
modulepackage
0.0.0-20230930052759-e8d58c011286
Repository: https://github.com/d3code/zlog.git
Documentation: pkg.go.dev

# README

ZLog: Powerful Logging Made Easy with Zap and GCP Compatibility

Welcome to ZLog, your go-to logging library that combines the power of Zap with seamless compatibility for Google Cloud Platform (GCP). ZLog is designed to make logging in Go a breeze, providing you with a simple yet robust logging solution that integrates flawlessly with GCP and leverages the color capabilities of CLogs.

Features

1. Zap Logger with Ease 🚀

ZLog is built on top of the Zap logging library, which offers lightning-fast performance and a rich set of features. With ZLog, you can quickly set up a powerful logging system without diving into the complexities of configuring Zap directly. Say goodbye to tedious setup and embrace logging efficiency with ZLog.

2. GCP Compatibility 🌐

ZLog understands the needs of developers working in the Google Cloud Platform ecosystem. It comes with default configurations and integrations that make logging in GCP environments seamless. ZLog automatically handles authentication and log structuring, allowing you to focus on your application logic instead of the intricacies of GCP logging.

3. Colored Console Logs with CLogs 🌈

ZLog leverages the color capabilities of CLogs, enabling you to add visual distinction to your console logs. Enjoy colorful and eye-catching logs during development and easily spot important information at a glance. ZLog ensures that your logs not only provide valuable insights but also bring a touch of style to your terminal.

4. Flexibility and Extensibility ⚙️

While ZLog comes with sensible default configurations, it is also highly flexible and customizable. You can fine-tune various aspects of your logging experience, including log levels, output formats, and log destinations. ZLog empowers you to adapt the logging behavior to suit your specific application needs.

Installation

To add ZLog to your Go project, execute the following command:

go get github.com/d3code/zlog

Usage

Using ZLog is straightforward. Here's a quick example to get you started:

package main

import (
	"github.com/d3code/zlog"
)

func main() {
    zlog.Debug("Debug message")
    zlog.Info("Info message")
    zlog.Warn("Warning message")
    zlog.Error("Error message")
}

For more advanced usage and customization options, please refer to the ZLog documentation.

Configuration

ZLog provides sensible default configurations out of the box. However, you can easily customize the logging behavior according to your requirements. The configuration options include log levels, output formats, log destinations, and GCP-specific settings. Refer to the documentation for detailed instructions on configuring ZLog.

Contributing

We welcome contributions to ZLog! If you'd like to contribute, please follow these steps:

  1. Fork the ZLog repository.
  2. Create a new branch: git checkout -b feature/my-awesome-feature
  3. Make your changes and commit them: git commit -m "Add my awesome feature"
  4. Push your changes to your forked repository: git push origin feature/my-awesome-feature
  5. Open a pull request in the ZLog repository. We'll review your changes and merge them if they align with the project's goals.

Support

If you have any questions, encounter issues, or want to share your feedback, please reach out to us:

We're here to help you simplify logging in Go and streamline your development workflow with ZLog

# Packages

No description provided by the author

# Functions

Debug uses fmt.Sprint to construct and log a message.
Debugf uses fmt.Sprintf to log a templated message.
Debugln uses fmt.Sprintln to construct and log a message.
Debugw logs a message with some additional context.
DPanic uses fmt.Sprint to construct and log a message.
DPanicf uses fmt.Sprintf to log a templated message.
DPanicln uses fmt.Sprintln to construct and log a message.
DPanicw logs a message with some additional context.
Error uses fmt.Sprint to construct and log a message.
Errorf uses fmt.Sprintf to log a templated message.
Errorln uses fmt.Sprintln to construct and log a message.
Errorw logs a message with some additional context.
Fatal uses fmt.Sprint to construct and log a message, then calls os.Exit.
Fatalf uses fmt.Sprintf to log a templated message, then calls os.Exit.
Fatalln uses fmt.Sprintln to construct and log a message, then calls os.Exit.
Fatalw logs a message with some additional context, then calls os.Exit.
Info uses fmt.Sprint to construct and log a message.
Infof uses fmt.Sprintf to log a templated message.
Infoln uses fmt.Sprintln to construct and log a message.
Infow logs a message with some additional context.
Panic uses fmt.Sprint to construct and log a message, then panics.
Panicf uses fmt.Sprintf to log a templated message, then panics.
Panicln uses fmt.Sprintln to construct and log a message, then panics.
Panicw logs a message with some additional context, then panics.
Warn uses fmt.Sprint to construct and log a message.
Warnf uses fmt.Sprintf to log a templated message.
Warnln uses fmt.Sprintln to construct and log a message.
Warnw logs a message with some additional context.

# Variables

No description provided by the author