Skip to content

Commit

Permalink
added v0.1.0 release changes
Browse files Browse the repository at this point in the history
  • Loading branch information
iolave committed Jul 29, 2024
1 parent d97ea8f commit 50e9a6c
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 13 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [v0.1.0] - 2024-07-28

### Added

- LOG_LEVEL environment variable support.
- LOG_LEVEL constants.
- Debug, Info, Warn, Error and Fatal log methods.
- String helper method that converts strings to their snake case version.

[0.1.0]: https://github.com/iolave/go-logger/releases/tag/v0.1.0
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ go get github.com/iolave/go-logger

## Environment variables

| Variable | Description | Default value |
|-----------|-------------|---------------|
| LOG_LEVEL | Accepts any name value of the [log level definition](#log-level-definition). | `info` |
| Variable | Description | Default value |
|-------------|-------------|---------------|
| `LOG_LEVEL` | Accepts any name value of the [log level definition](#log-level-definition). | `info` |

## Usage

Expand Down Expand Up @@ -43,16 +43,16 @@ logger.Fatal("fatal message", map[string]any{})

### Log entry schema

| Field | Description |
|---------------|----------------------------------|
| level | Log entry level |
| name | Name of the app/logger |
| msg | Log message in snake case format |
| time | Unix time |
| pid | Process id |
| hostname | System's hostname |
| schemaVersion | This schema version (v1.0.0) |
| customData | Custom data in any form or shape. Feel free to use this field as you want |
| Field | Description | JSON type |
|---------------|----------------------------------|-----------|
| level | Log entry level | `number` |
| name | Name of the app/logger | `string` |
| msg | Log message in snake case format | `string` |
| time | Unix time | `number` |
| pid | Process id | `number` |
| hostname | System's hostname | `string` |
| schemaVersion | This schema version (v1.0.0) | `string` |
| customData | Custom data in any form or shape. Feel free to use this field as you want | `Record<string, any>` |

### Log level definition
| Level | Name |
Expand Down

0 comments on commit 50e9a6c

Please sign in to comment.