Skip to content

Conversation

@vakhov
Copy link

@vakhov vakhov commented Nov 13, 2025

Added

  • Core structured logging library for Go
  • Support for log levels: Trace, Debug, Info, Warn, Error
  • Text and JSON output formats
  • Multiple output destinations: stdout, stderr, file paths, multi-target
  • Automatic timestamp, source file and line number
  • Stacktrace collection for error-level messages
  • Test suite for core functionality
  • Idiomatic Go examples (testable examples)
  • Makefile, GitHub Actions CI workflow, README, LICENSE, lint configuration

@vakhov vakhov requested a review from oleg-jukovec November 13, 2025 12:23
Initial project setup:

- Added logger core (level, format, stacktrace, internal outputs)
- Added tests for core logger functionality
- Added examples (stdout, stderr, file)
- Added GitHub Actions CI workflow
- Added README and LICENSE (BSD 2-Clause)
- Added .golangci.yml and .gitignore
@vakhov vakhov force-pushed the vakhov/initial-version branch from d2eb898 to 6e31ef2 Compare November 13, 2025 12:26

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is better to make testable examples in Golang: https://go.dev/blog/examples

  1. This is an idiomatic approach.
  2. The examples will be showed in the documentation.

README.md Outdated
Comment on lines 2 to 3
[Telegram EN](https://t.me/tarantool)
[Telegram RU](https://t.me/tarantoolru)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some budgets are without images that looks bad. You could copy-paste approach from here:

https://github.com/tarantool/go-tarantool/blob/802aa244d26017a901cf7247119515f346ac8eb6/README.md?plain=1#L5-L10

@vakhov vakhov force-pushed the vakhov/initial-version branch from 148dbe1 to 6c9e010 Compare November 14, 2025 08:06
@vakhov vakhov force-pushed the vakhov/initial-version branch from 6c9e010 to 21269a5 Compare November 14, 2025 08:27
@vakhov vakhov requested a review from oleg-jukovec November 14, 2025 08:29
branches: [ '**' ]
workflow_dispatch:

jobs:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need a linter job too. See go-discovery/go-storage/go-tarantool etc.

Comment on lines 94 to 95

func (o *Outputs) Write(p []byte) (int, error) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A comment is missed.

Comment on lines 27 to 28

func (b *buffer) Free() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same about comment to public calls: missed.

Comment on lines +1 to +3
// Copyright 2022 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use a correct copyright and mention the Go authors in the project's LICENSE file if so.

Makefile Outdated
Comment on lines 34 to 39
## Run all _examples to ensure they compile and run without panic
examples:
$(GO) run ./_examples/stdout
$(GO) run ./_examples/stderr >/dev/null 2>&1 || true
$(GO) run ./_examples/file
$(GO) run ./_examples/multi

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Run all _examples to ensure they compile and run without panic
examples:
$(GO) run ./_examples/stdout
$(GO) run ./_examples/stderr >/dev/null 2>&1 || true
$(GO) run ./_examples/file
$(GO) run ./_examples/multi

vakhov and others added 3 commits November 28, 2025 15:53
Co-authored-by: Oleg Jukovec <[email protected]>
Co-authored-by: Oleg Jukovec <[email protected]>
@vakhov vakhov force-pushed the vakhov/initial-version branch from 7d9aa41 to 38470df Compare November 28, 2025 11:46
@vakhov vakhov force-pushed the vakhov/initial-version branch from 38470df to c67ec38 Compare November 28, 2025 12:05
@vakhov vakhov requested a review from oleg-jukovec November 28, 2025 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants