hubbado-log 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ChangeLog.md +6 -0
- data/README.md +13 -1
- data/hubbado-log.gemspec +1 -1
- data/lib/hubbado/log/log.rb +4 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 420feafe971a2416372391df56971288d2a8a6730d5b2a5b010370465fe0eecb
|
|
4
|
+
data.tar.gz: 1755fdec20e188020cc6b55431c5a6ccc5edeaec13d952430663e3eb9397685c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d1195dd74d23e42ab83a6b93daba36cdd53b5311ee2a1dd19399f1090fe9c2fba4a2b9fe660489a2ba8c85816a3995e495979a7ea3b01c83693a5a2a7dfa0292
|
|
7
|
+
data.tar.gz: a4c8a344ae3c7297037890633fbec484f5d45114cbc2b1f76bdf15314d2b48a5b7b17ad35c6601a9f59720b6ea98c41b9c34676a1d01d5953bbba8ba5627271b
|
data/ChangeLog.md
CHANGED
|
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
|
6
6
|
|
|
7
|
+
# [1.2.0 - 2026-08-14]
|
|
8
|
+
## Added
|
|
9
|
+
- A `trace` level, below `debug`. Program flow — a line per iteration of a loop —
|
|
10
|
+
so that turning on the completion of secondary operations does not also turn on
|
|
11
|
+
a line per item in a set.
|
|
12
|
+
|
|
7
13
|
# [1.1.0 - 2026-08-14]
|
|
8
14
|
## Added
|
|
9
15
|
- A level, below which a line reaches no handler. Set it with `config.level`, or
|
data/README.md
CHANGED
|
@@ -33,7 +33,19 @@ Without `config.level`, the level comes from the `LOG_LEVEL` environment variabl
|
|
|
33
33
|
|
|
34
34
|
$ LOG_LEVEL=debug ./my-command
|
|
35
35
|
|
|
36
|
-
It defaults to `info`, so `debug`
|
|
36
|
+
It defaults to `info`, so `debug` and `trace` are off until they are asked for.
|
|
37
|
+
|
|
38
|
+
Levels, lowest first:
|
|
39
|
+
|
|
40
|
+
| Level | What it records |
|
|
41
|
+
|---|---|
|
|
42
|
+
| `trace` | Most detailed tracing of program flow |
|
|
43
|
+
| `debug` | Completion of a secondary operation of a class or utility, or other details |
|
|
44
|
+
| `info` | Completion of the principal operation of a class or utility |
|
|
45
|
+
| `warn` | Unexpected state that is not an error, or is recoverable, and that a developer or operator should examine |
|
|
46
|
+
| `error` | Message logged just prior to raising an error |
|
|
47
|
+
| `fatal` | Message recorded, when possible, as the process is terminating due to an error |
|
|
48
|
+
A single logger can
|
|
37
49
|
name its own with `Hubbado::Log::Logger.new(subject, handlers, level: :debug)`.
|
|
38
50
|
|
|
39
51
|
`LOG_LEVEL` is shared with Eventide's log gem, which writes names this gem does not
|
data/hubbado-log.gemspec
CHANGED
data/lib/hubbado/log/log.rb
CHANGED
|
@@ -2,7 +2,10 @@ module Hubbado
|
|
|
2
2
|
class Log
|
|
3
3
|
include Dependency
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
# Ordered, because the level compares against them. `trace` is program flow, a line per
|
|
6
|
+
# iteration; `debug` is the completion of a secondary operation, or a detail worth keeping;
|
|
7
|
+
# `info` is the completion of the principal operation of a class or utility.
|
|
8
|
+
SEVERITIES = { trace: 0, debug: 1, info: 2, warn: 3, error: 4, fatal: 5, unknown: 6 }.freeze
|
|
6
9
|
STACKTRACE_SEVERITIES = %i[warn error fatal unknown].freeze
|
|
7
10
|
|
|
8
11
|
LEVEL_VARIABLE = "LOG_LEVEL".freeze
|