Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gleich/logoru

🌲 golang port of Delgan's python loguru (just logging)
https://github.com/gleich/logoru

golang logging module package

Last synced: 3 months ago
JSON representation

🌲 golang port of Delgan's python loguru (just logging)

Awesome Lists containing this project

README

        

# logoru

🌲 golang port of [Delgan's python loguru](https://github.com/Delgan/loguru)

![build](https://github.com/gleich/logoru/workflows/build/badge.svg)
![test](https://github.com/gleich/logoru/workflows/test/badge.svg)
![lint](https://github.com/gleich/logoru/workflows/lint/badge.svg)

## 🚀 Install

Run the following command in your terminal:

```txt
go get -u github.com/gleich/logoru
```

## 📝 Documentation [![GoDoc](https://godoc.org/github.com/gleich/logoru?status.svg)](https://godoc.org/github.com/gleich/logoru)

### `func Debug`

```go
func Debug(msg interface{})
```

Output a debugging message

#### Example

```go
package main

import "github.com/gleich/logoru"

func main() {
logoru.Debug("Here is a debug message")
logoru.Debug("Hello", "World")
}
```

Output:

### `func Info`

```go
func Info(msg interface{})
```

Output an info message

#### Example

```go
package main

import "github.com/gleich/logoru"

func main() {
logoru.Info("Here is an info message")
logoru.Info("Hello", "World")
}
```

Output:

### `func Success`

```go
func Success(msg interface{})
```

Output a success message

#### Example

```go
package main

import "github.com/gleich/logoru"

func main() {
logoru.Success("Here is a success message")
logoru.Success("Hello", "World")
}
```

Output:

### `func Warning`

```go
func Warning(msg interface{})
```

Output a warning message

#### Example

```go
package main

import "github.com/gleich/logoru"

func main() {
logoru.Warning("Here is a warning message")
logoru.Warning("Hello", "World")
}
```

Output:

### `func Error`

```go
func Error(msg interface{})
```

Output a error message

#### Example

```go
package main

import "github.com/gleich/logoru"

func main() {
logoru.Error("Here is an error message")
logoru.Error("Hello", "World")
}
```

Output:

### `func Critical`

```go
func Critical(msg interface{})
```

Output a critical message which will panic at the end.

#### Example

```go
package main

import "github.com/gleich/logoru"

func main() {
logoru.Critical("Here is a critical message") // Panic occurs
}
```

Output:

## 🙌 Contributing

Before contributing please read the [CONTRIBUTING.md file](https://github.com/gleich/logoru/blob/master/CONTRIBUTING.md)

## 👥 Contributors

- **[@gleich](https://github.com/gleich)**

- **[@ImgBotApp](https://github.com/ImgBotApp)**

- **[@dependabot-preview[bot]](https://github.com/apps/dependabot-preview)**