diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml
index 571e146..b67d010 100644
--- a/.github/workflows/deploy-docs.yml
+++ b/.github/workflows/deploy-docs.yml
@@ -49,13 +49,13 @@ jobs:
persist-credentials: false
- name: Setup Ruby
- uses: ruby/setup-ruby@de492cf36cbab201753d720ce4f4e336cd688c94 # v1.336.0
+ uses: ruby/setup-ruby@b3aaceaef7e0ee231b499e7b5f49c03fc1d32199 # v1.338.0
with:
ruby-version: '.ruby-version'
bundler-cache: true
- name: Setup pnpm
- uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
+ uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
with:
version: 10.18.3
diff --git a/.github/workflows/rails-main.yml b/.github/workflows/rails-main.yml
index 6718eb7..cd9116e 100644
--- a/.github/workflows/rails-main.yml
+++ b/.github/workflows/rails-main.yml
@@ -23,7 +23,7 @@ jobs:
run: rm -f Gemfile.lock .ruby-version
- name: Setup Ruby 4.0.1
- uses: ruby/setup-ruby@de492cf36cbab201753d720ce4f4e336cd688c94 # v1.336.0
+ uses: ruby/setup-ruby@b3aaceaef7e0ee231b499e7b5f49c03fc1d32199 # v1.338.0
with:
ruby-version: '4.0.1'
bundler-cache: true
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 2880235..eedefaa 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -114,7 +114,7 @@ jobs:
# No bundler cache in release jobs: a cache is shared with other runs, and gem build needs no bundle
- name: Setup Ruby
- uses: ruby/setup-ruby@de492cf36cbab201753d720ce4f4e336cd688c94 # v1.336.0
+ uses: ruby/setup-ruby@b3aaceaef7e0ee231b499e7b5f49c03fc1d32199 # v1.338.0
with:
ruby-version: '.ruby-version'
@@ -171,7 +171,7 @@ jobs:
name: gem
- name: Setup Ruby
- uses: ruby/setup-ruby@de492cf36cbab201753d720ce4f4e336cd688c94 # v1.336.0
+ uses: ruby/setup-ruby@b3aaceaef7e0ee231b499e7b5f49c03fc1d32199 # v1.338.0
with:
ruby-version: ruby
@@ -196,7 +196,7 @@ jobs:
# No bundler cache in release jobs: a cache is shared with other runs
- name: Setup Ruby
- uses: ruby/setup-ruby@de492cf36cbab201753d720ce4f4e336cd688c94 # v1.336.0
+ uses: ruby/setup-ruby@b3aaceaef7e0ee231b499e7b5f49c03fc1d32199 # v1.338.0
with:
ruby-version: '.ruby-version'
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 1d58924..bd04178 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -20,7 +20,7 @@ jobs:
persist-credentials: false
- name: Setup Ruby
- uses: ruby/setup-ruby@de492cf36cbab201753d720ce4f4e336cd688c94 # v1.336.0
+ uses: ruby/setup-ruby@b3aaceaef7e0ee231b499e7b5f49c03fc1d32199 # v1.338.0
with:
ruby-version: '.ruby-version'
# Install all gems (both test and development)
@@ -32,7 +32,7 @@ jobs:
node-version: 22
- name: Setup pnpm
- uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
+ uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
with:
version: 10.18.3
@@ -107,7 +107,7 @@ jobs:
persist-credentials: false
- name: Setup Ruby
- uses: ruby/setup-ruby@de492cf36cbab201753d720ce4f4e336cd688c94 # v1.336.0
+ uses: ruby/setup-ruby@b3aaceaef7e0ee231b499e7b5f49c03fc1d32199 # v1.338.0
with:
ruby-version: '.ruby-version'
bundler-cache: true
@@ -118,7 +118,7 @@ jobs:
node-version: 22
- name: Setup pnpm
- uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
+ uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
with:
version: 10.18.3
@@ -134,7 +134,7 @@ jobs:
persist-credentials: false
- name: Setup Ruby
- uses: ruby/setup-ruby@de492cf36cbab201753d720ce4f4e336cd688c94 # v1.336.0
+ uses: ruby/setup-ruby@b3aaceaef7e0ee231b499e7b5f49c03fc1d32199 # v1.338.0
with:
ruby-version: '.ruby-version'
bundler-cache: true
@@ -145,7 +145,7 @@ jobs:
node-version: 22
- name: Setup pnpm
- uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
+ uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
with:
version: 10.18.3
@@ -183,13 +183,13 @@ jobs:
persist-credentials: false
- name: Setup Ruby
- uses: ruby/setup-ruby@de492cf36cbab201753d720ce4f4e336cd688c94 # v1.336.0
+ uses: ruby/setup-ruby@b3aaceaef7e0ee231b499e7b5f49c03fc1d32199 # v1.338.0
with:
ruby-version: '.ruby-version'
bundler-cache: true
- name: Setup pnpm
- uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
+ uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
with:
version: 10.18.3
@@ -242,7 +242,7 @@ jobs:
run: rm -f Gemfile.lock
- name: Setup Ruby 4.0.1
- uses: ruby/setup-ruby@de492cf36cbab201753d720ce4f4e336cd688c94 # v1.336.0
+ uses: ruby/setup-ruby@b3aaceaef7e0ee231b499e7b5f49c03fc1d32199 # v1.338.0
with:
ruby-version: '4.0.1'
bundler-cache: true
@@ -325,7 +325,7 @@ jobs:
run: rm -f Gemfile.lock
- name: Setup Ruby ${{ matrix.ruby }}
- uses: ruby/setup-ruby@de492cf36cbab201753d720ce4f4e336cd688c94 # v1.336.0
+ uses: ruby/setup-ruby@b3aaceaef7e0ee231b499e7b5f49c03fc1d32199 # v1.338.0
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
@@ -346,7 +346,7 @@ jobs:
persist-credentials: false
- name: Setup Ruby
- uses: ruby/setup-ruby@de492cf36cbab201753d720ce4f4e336cd688c94 # v1.336.0
+ uses: ruby/setup-ruby@b3aaceaef7e0ee231b499e7b5f49c03fc1d32199 # v1.338.0
with:
ruby-version: '.ruby-version'
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 95f9127..6261340 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,10 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
+## [0.4.1] - 2026-11-20
+
### Changed
+- **SemanticLogger**: Works with SemanticLogger 5 as well as 4.15 and later. SemanticLogger 5 reopens its appenders in a forked child itself, so LogStruct leaves that to it, and `SemanticLogger.reopen_on_fork = false` turns it off.
- **Development**: The tests run against Sentry 7, Honeybadger 6 and Sidekiq 8. Development uses Rails 8.1, and the Rails 8.1 test apps no longer pin `json` below 3, because ActiveSupport 8.1 dropped the `quirks_mode` option that json 3 rejects.
- **Development**: Update SimpleCov to 1.3, jscpd to 5.4, and the docs site to Next.js 16.4.3, TypeScript 6 and lucide-react 1.66.
+- **Development**: Update Minitest to 6 (with `minitest-mock`), Sorbet to 0.6.13672 and CSpell to 10.4.1, and the docs site to lucide-react 1.72, Biome 2.6.7, Playwright 1.65 and Tailwind CSS 4.3.5.
+
+### Fixed
+
+- **Development**: Update the docs site to Next.js 16.4.5, which fixes GHSA-vc7v-qv4w-wrv8 and GHSA-mfr8-8qww-v76h, in `use cache` features the static site doesn't use. Remove the unused test dependency on Dalli, which had GHSA-5wpc-45jc-6ccc.
## [0.4.0] - 2026-11-06
diff --git a/Gemfile b/Gemfile
index 8c4ad40..d48e87c 100644
--- a/Gemfile
+++ b/Gemfile
@@ -25,14 +25,14 @@ gem "openssl" # For tapioca SSL certificate verification
gem "ostruct" # For Ruby 3.5+ compatibility
# Sorbet is needed for development
-gem "sorbet", "~> 0.5"
+gem "sorbet", "~> 0.6"
gem "sorbet-typescript"
# Essential testing gems that don't have Ruby version restrictions
group :test do
- gem "dalli", "~> 3.2.15"
gem "bundler-audit", require: false
- gem "minitest", "~> 5.20"
+ gem "minitest", "~> 6.1"
+ gem "minitest-mock", "~> 5.27"
gem "minitest-reporters", "~> 1.6"
gem "simplecov", "~> 1.3", require: false
gem "simplecov-json", "~> 0.2", require: false
diff --git a/Gemfile.lock b/Gemfile.lock
index 01457bf..c229b92 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,13 +1,13 @@
PATH
remote: .
specs:
- logstruct (0.4.0)
+ logstruct (0.4.1)
actionpack (>= 7.1)
activesupport (>= 7.1)
globalid (>= 1.0)
lograge (>= 0.11)
railties (>= 7.1)
- semantic_logger (~> 4.15)
+ semantic_logger (>= 4.15, < 6.0)
sorbet-runtime (>= 0.6.12698)
GEM
@@ -129,8 +129,6 @@ GEM
connection_pool (3.0.2)
content_disposition (1.0.0)
crass (1.0.8)
- dalli (3.2.15)
- logger
date (3.6.0)
debug (1.11.1)
irb (~> 1.10)
@@ -205,7 +203,10 @@ GEM
net-smtp
marcel (1.2.1)
mini_mime (1.1.5)
- minitest (5.27.0)
+ minitest (6.1.0)
+ drb (~> 2.0)
+ prism (>= 1.5, < 3)
+ minitest-mock (5.27.0)
minitest-reporters (1.8.0)
ansi
builder
@@ -365,8 +366,9 @@ GEM
rubydex (0.4.4-x86_64-linux)
safely_block (1.0.0)
securerandom (0.4.1)
- semantic_logger (4.18.0)
+ semantic_logger (5.2.0)
concurrent-ruby (~> 1.0)
+ logger (~> 1.5)
sentry-ruby (7.2.0)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
@@ -410,15 +412,15 @@ GEM
yard (~> 0.9, >= 0.9.24)
yard-activesupport-concern (~> 0.0)
yard-solargraph (~> 0.1)
- sorbet (0.6.13635)
- sorbet-static (= 0.6.13635)
- sorbet-runtime (0.6.13635)
- sorbet-static (0.6.13635-aarch64-linux)
- sorbet-static (0.6.13635-universal-darwin)
- sorbet-static (0.6.13635-x86_64-linux)
- sorbet-static-and-runtime (0.6.13635)
- sorbet (= 0.6.13635)
- sorbet-runtime (= 0.6.13635)
+ sorbet (0.6.13672)
+ sorbet-static (= 0.6.13672)
+ sorbet-runtime (0.6.13672)
+ sorbet-static (0.6.13672-aarch64-linux)
+ sorbet-static (0.6.13672-universal-darwin)
+ sorbet-static (0.6.13672-x86_64-linux)
+ sorbet-static-and-runtime (0.6.13672)
+ sorbet (= 0.6.13672)
+ sorbet-runtime (= 0.6.13672)
sorbet-typescript (0.1.1)
sorbet-runtime (>= 0.5)
thor (>= 1.3)
@@ -508,7 +510,6 @@ DEPENDENCIES
bundler-audit
carrierwave (~> 3.0)
climate_control (~> 1.2)
- dalli (~> 3.2.15)
debug
dotenv-rails (~> 3.1)
drb
@@ -516,7 +517,8 @@ DEPENDENCIES
json_schemer
listen
logstruct!
- minitest (~> 5.20)
+ minitest (~> 6.1)
+ minitest-mock (~> 5.27)
minitest-reporters (~> 1.6)
mutex_m
openssl
@@ -535,7 +537,7 @@ DEPENDENCIES
simplecov (~> 1.3)
simplecov-json (~> 0.2)
solargraph
- sorbet (~> 0.5)
+ sorbet (~> 0.6)
sorbet-typescript
standard (>= 1.35.1)
tapioca
diff --git a/docs/biome.json b/docs/biome.json
index 604526c..b1101b3 100644
--- a/docs/biome.json
+++ b/docs/biome.json
@@ -1,5 +1,5 @@
{
- "$schema": "https://biomejs.dev/schemas/2.6.4/schema.json",
+ "$schema": "https://biomejs.dev/schemas/2.6.7/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
diff --git a/docs/package.json b/docs/package.json
index 91e48b4..f8222fd 100644
--- a/docs/package.json
+++ b/docs/package.json
@@ -29,8 +29,8 @@
"@types/react-syntax-highlighter": "^15.5.13",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
- "lucide-react": "^1.66.0",
- "next": "16.4.3",
+ "lucide-react": "^1.72.0",
+ "next": "16.4.5",
"next-themes": "^0.4.6",
"react": "^19.3.1",
"react-dom": "^19.3.1",
@@ -41,9 +41,9 @@
"use-interval": "^1.4.0"
},
"devDependencies": {
- "@biomejs/biome": "^2.6.4",
- "@playwright/test": "^1.64.1",
- "@tailwindcss/postcss": "^4.3.3",
+ "@biomejs/biome": "^2.6.7",
+ "@playwright/test": "^1.65.0",
+ "@tailwindcss/postcss": "^4.3.5",
"@types/jest": "^30.0.0",
"@types/node": "^22.20.5",
"@types/react": "^19.3.0",
@@ -51,7 +51,7 @@
"jest": "^30.5.2",
"jest-environment-jsdom": "^30.5.2",
"sharp": "^0.35.5",
- "tailwindcss": "^4.3.3",
+ "tailwindcss": "^4.3.5",
"ts-jest": "^29.4.15",
"ts-node": "^10.9.2",
"typescript": "^6.0.3"
diff --git a/docs/pnpm-lock.yaml b/docs/pnpm-lock.yaml
index b1ae495..47ed937 100644
--- a/docs/pnpm-lock.yaml
+++ b/docs/pnpm-lock.yaml
@@ -41,11 +41,11 @@ importers:
specifier: ^2.1.1
version: 2.1.1
lucide-react:
- specifier: ^1.66.0
- version: 1.66.0(@types/react@19.3.0)(react@19.3.1)
+ specifier: ^1.72.0
+ version: 1.72.0(@types/react@19.3.0)(react@19.3.1)
next:
- specifier: 16.4.3
- version: 16.4.3(@babel/core@7.29.7)(@playwright/test@1.64.1)(@types/node@22.20.5)(react-dom@19.3.1(react@19.3.1))(react@19.3.1)
+ specifier: 16.4.5
+ version: 16.4.5(@babel/core@7.29.7)(@playwright/test@1.65.0)(@types/node@22.20.5)(react-dom@19.3.1(react@19.3.1))(react@19.3.1)
next-themes:
specifier: ^0.4.6
version: 0.4.6(react-dom@19.3.1(react@19.3.1))(react@19.3.1)
@@ -66,20 +66,20 @@ importers:
version: 3.7.0
tailwindcss-animate:
specifier: ^1.0.7
- version: 1.0.7(tailwindcss@4.3.3)
+ version: 1.0.7(tailwindcss@4.3.5)
use-interval:
specifier: ^1.4.0
version: 1.4.0(react@19.3.1)
devDependencies:
'@biomejs/biome':
- specifier: ^2.6.4
- version: 2.6.4
+ specifier: ^2.6.7
+ version: 2.6.7
'@playwright/test':
- specifier: ^1.64.1
- version: 1.64.1
+ specifier: ^1.65.0
+ version: 1.65.0
'@tailwindcss/postcss':
- specifier: ^4.3.3
- version: 4.3.3
+ specifier: ^4.3.5
+ version: 4.3.5
'@types/jest':
specifier: ^30.0.0
version: 30.0.0
@@ -102,8 +102,8 @@ importers:
specifier: ^0.35.5
version: 0.35.5(@types/node@22.20.5)
tailwindcss:
- specifier: ^4.3.3
- version: 4.3.3
+ specifier: ^4.3.5
+ version: 4.3.5
ts-jest:
specifier: ^29.4.15
version: 29.4.15(@babel/core@7.29.7)(@jest/transform@30.5.2)(@jest/types@30.5.1)(babel-jest@30.5.2(@babel/core@7.29.7))(jest-util@30.5.1)(jest@30.5.2(@types/node@22.20.5)(ts-node@10.9.2(@types/node@22.20.5)(typescript@6.0.3)))(typescript@6.0.3)
@@ -292,71 +292,71 @@ packages:
'@bcoe/v8-coverage@0.2.3':
resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==}
- '@biomejs/biome@2.6.4':
- resolution: {integrity: sha512-8sKKwaNW4ot22awZ3lBjwWLHnUFXgXnrBPYS2gNlBAXRbDC++7kqjK2H7dR/FgCDtPvO1xfKpgEhJkGxAKYkxA==}
+ '@biomejs/biome@2.6.7':
+ resolution: {integrity: sha512-2bT1FE6FvZZgPLFw4BjcDyRwG8Ry9zYla4X+Lw8oj2SxvqiXHiYkkEpjcrsWQrik6iYHygAa/D67YxLbVz9P1Q==}
engines: {node: '>=14.21.3'}
hasBin: true
- '@biomejs/cli-android-arm64@2.6.4':
- resolution: {integrity: sha512-jwrwigP4tBcHxzuV8izioX/BOUhJL/4e2rNSOE5nCjBkVC018LQAQUGiH+CNkFYvLtQ1dcZo5/xXERmaAGc7JQ==}
+ '@biomejs/cli-android-arm64@2.6.7':
+ resolution: {integrity: sha512-f4fyRTl+rW6QZp+iHdZrKAKptG/xmIDijTnxWhpC1Hnzr8yvjaBm/aJ98JiMv5mMx7jL1MOu4+zwmQUzfcoKBg==}
engines: {node: '>=14.21.3'}
cpu: [arm64]
os: [android]
- '@biomejs/cli-android-x64@2.6.4':
- resolution: {integrity: sha512-HdGInPJ4nZFwHxzvEtcp2nmSBtUyJrurmtIK43upFckuS3+ZqVM05HtsxQWnqGsuy/pxckIAjyKWlEKRlBXUyA==}
+ '@biomejs/cli-android-x64@2.6.7':
+ resolution: {integrity: sha512-eUdeN+mh2bwen+By1feKzpFkFGAfLG3Pxi6tbwpzMvePBwFGMd4mnE6gaxDRMiWJ1eMuc+Xhtg3ErbLLbtL5wQ==}
engines: {node: '>=14.21.3'}
cpu: [x64]
os: [android]
- '@biomejs/cli-darwin-arm64@2.6.4':
- resolution: {integrity: sha512-0VvcUz46wbg59Q4TZ59KkIjDJrxEyu4Eoe79+F4SChxoWe+W7AEyIp6F5r72C9+p6MsB6dIovnZt1D30lGM3XA==}
+ '@biomejs/cli-darwin-arm64@2.6.7':
+ resolution: {integrity: sha512-GewLcsnCsVblgnWYw5QRz5ydy9xphCtlFP37TpLKarezqwZMrH2qxrYblhY6DPOir4gnKyaqDnS/xZWIGVjaKw==}
engines: {node: '>=14.21.3'}
cpu: [arm64]
os: [darwin]
- '@biomejs/cli-darwin-x64@2.6.4':
- resolution: {integrity: sha512-fxmvkF81srlS3DiMyfm+aG3J0eG+6/BjaxRyjy57KbLSafnq0PO+hHfVWmtH2ty0S7nm6yDXBRwySfFeaRJKRQ==}
+ '@biomejs/cli-darwin-x64@2.6.7':
+ resolution: {integrity: sha512-AMPl+Q+bHjRcNUBn8gwBl+dJAnKRUWGZ7ZiJo2U8tQtdpqJ32OqvIg4cwTH+xv0jrcNVkUSE69nj57zsHZ1WBA==}
engines: {node: '>=14.21.3'}
cpu: [x64]
os: [darwin]
- '@biomejs/cli-linux-arm64-musl@2.6.4':
- resolution: {integrity: sha512-31ZaH/MHqPX+O+evRwRrCHQ8W5/9adY+/eMytGGWZnRx1T41QsWIF09+/WujynLBhWZUxNGS5CtsWLwgOFTAyg==}
+ '@biomejs/cli-linux-arm64-musl@2.6.7':
+ resolution: {integrity: sha512-BIA7qVO1O15D2wVKxLTcvEWszgOqJVZRUhlksg1KQ9N0VtYCbvknV1vyjFiSrzuBT57+z59gbzhYQCinw9lRSQ==}
engines: {node: '>=14.21.3'}
cpu: [arm64]
os: [linux]
libc: [musl]
- '@biomejs/cli-linux-arm64@2.6.4':
- resolution: {integrity: sha512-6+bK1Y/evmIUiJr7auertuMbiaYVicJhqA1bZyL47lCMWugv8l0gFQCqvR/gN1vZMHYm+HwoTKgeMxdNFCoQTg==}
+ '@biomejs/cli-linux-arm64@2.6.7':
+ resolution: {integrity: sha512-Qa2edxQClKn17y1ASWkOOuT96K2si1nTLiPbXMOMilNJ79eNsa1as1kaSbgxOXy1kRUENw76sp4pAddneq3l8Q==}
engines: {node: '>=14.21.3'}
cpu: [arm64]
os: [linux]
libc: [glibc]
- '@biomejs/cli-linux-x64-musl@2.6.4':
- resolution: {integrity: sha512-bomSa2XdQAGGj6Cwdm4M13qE+lN9+AOlW8KtI4hdyVyRRF/Z71qPAi95T4wtdZK0QpBbkTW8hgbZZCwPi4xzIw==}
+ '@biomejs/cli-linux-x64-musl@2.6.7':
+ resolution: {integrity: sha512-+AOQyCsPR4nH5L4Hjzp8T0iaHm4UxY3unjL/KUJKc/8ziLnbkbmL3adtWmQW5ERB1zi6LRA1fsjaSuf/xGnLaQ==}
engines: {node: '>=14.21.3'}
cpu: [x64]
os: [linux]
libc: [musl]
- '@biomejs/cli-linux-x64@2.6.4':
- resolution: {integrity: sha512-tbFZMdL6dP/ws4edXxYG9WhvaVa1ZDzL4G5DzahnWW7Psib9H+VTdyU4XXVxpJk5j/nYZroSbvSNyYlpW3yCIw==}
+ '@biomejs/cli-linux-x64@2.6.7':
+ resolution: {integrity: sha512-VpHQ33CPNYrlIn0vyDdRS1KUlS3AiM17FiyEE2gwU000NwzyY4MgjzVHEv2KrmMb5D9Ksm3gFkwg+IOx/ULJNQ==}
engines: {node: '>=14.21.3'}
cpu: [x64]
os: [linux]
libc: [glibc]
- '@biomejs/cli-win32-arm64@2.6.4':
- resolution: {integrity: sha512-eCsqt8Ma3eVap+oyJCDnJZH60SIU464B66n3y38EUTJdM1T/HfZol1FJC9vb+sHToX0ix8XzqPcwJnOzyAJz0g==}
+ '@biomejs/cli-win32-arm64@2.6.7':
+ resolution: {integrity: sha512-2nLivZfgcGMIXP/bI8w1FZP5JE2MetP+XZInyMQ7SvJBKlDoGrm/nRjN7uUi9dOaaSlpbRWkHSfb7PqcQR3nXg==}
engines: {node: '>=14.21.3'}
cpu: [arm64]
os: [win32]
- '@biomejs/cli-win32-x64@2.6.4':
- resolution: {integrity: sha512-pYsMy5AThiHFOZAsngg8qN4PurM6nInKBhVX7sbj3eNpRQqo1Hb0MgCwPL7VqVMrmcEEMj9Ks3qbkallR65e8g==}
+ '@biomejs/cli-win32-x64@2.6.7':
+ resolution: {integrity: sha512-uYfH+n+IAtVz3lh7m6JxdjxfJ3WCvAJDE3spHIUbU955V42oKymlhiQiu92fAhXZb7KOjvRcrfImySQbc1MFFg==}
engines: {node: '>=14.21.3'}
cpu: [x64]
os: [win32]
@@ -712,57 +712,57 @@ packages:
'@emnapi/core': ^1.7.1 || 2.0.0-beta.2
'@emnapi/runtime': ^1.7.1 || 2.0.0-beta.2
- '@next/env@16.4.3':
- resolution: {integrity: sha512-a7tz1QCcWWkwC/rPJcPMJk/UNRu9CFhDd3OHYE5hddbJrs8BqRTalxI6GlKCWEGzRLHN+S/B7a4PAHCtm25aBQ==}
+ '@next/env@16.4.5':
+ resolution: {integrity: sha512-JwSPwpdkZL5VMl2jA/q+JI8MZdweAL3xmw5/tb9y/TLtmS0YXZnmYDzSihwk8xTj1OL+WM53gTqaj96yuLp6Xw==}
- '@next/swc-darwin-arm64@16.4.3':
- resolution: {integrity: sha512-4yq5EXBt+VDtAZwTyfijaFp5D2C5oz3Ikw5a2kiX2K9nw72vrZX2q5UuAlkPtUMO1tQz6JTKpaKWjS7OOefTDQ==}
+ '@next/swc-darwin-arm64@16.4.5':
+ resolution: {integrity: sha512-W5TniBzWKASbNNwHZ/S/f1MxQUXU/LdjklVMWA0Ujbfl7SZnUzFls45hO0i/sF7Bx1jJBWp7WWmoQajXtX/O8A==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [darwin]
- '@next/swc-darwin-x64@16.4.3':
- resolution: {integrity: sha512-1Rvkn/LUhnEF8WxnRkOrqGhbwXui1bkWFxONKIbN+r7C+9KHDSZ+iUoj4CzymVMWUyZIyx9szcb9+kbKhD500A==}
+ '@next/swc-darwin-x64@16.4.5':
+ resolution: {integrity: sha512-uWq4qkHapBDS1oFltWS4YxTb9pLHAtLNcpbuK6SmRsebLYZqpBML/j/C0op+50JYGTpZgVL/DWNt/6oWlamrrw==}
engines: {node: '>= 10'}
cpu: [x64]
os: [darwin]
- '@next/swc-linux-arm64-gnu@16.4.3':
- resolution: {integrity: sha512-dCKpXErGg3abUM6t5JTJV/ottVBTStJB5lRJTbgdUdQaQ+jNHiK56Hsc0YAEg/rinSh42hYG3HWiYmEMdilnxg==}
+ '@next/swc-linux-arm64-gnu@16.4.5':
+ resolution: {integrity: sha512-FdRcyOx5u5P51mlAqLB9EXdd8jZO5fsdHtk4BAQSkqOywCsbTNN/rmw+jO7pnmjNdAtu2AG46NzbCL2FPDrrgw==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [linux]
libc: [glibc]
- '@next/swc-linux-arm64-musl@16.4.3':
- resolution: {integrity: sha512-WwYbhWkhYBvBtib1K4W0kL8MW2snBD2A5b3SN4vPpqalZbZs5+bQ1yzAdepVoOqrFfEW3dmREy4Zs1MrWcrFbw==}
+ '@next/swc-linux-arm64-musl@16.4.5':
+ resolution: {integrity: sha512-cyvmmgtRXR8aGVT86wi9Py53IlfyCx7P2fZxuAXAoTummDnhKtUyjrMeXfapqp4qgD+gT5RqyGD/VfA16jEK7Q==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [linux]
libc: [musl]
- '@next/swc-linux-x64-gnu@16.4.3':
- resolution: {integrity: sha512-QymWvfUwDEC5/lpJOsxX5VAbyoR2D13+2Jsjz4be7gT4LPqEgdpkeLIR/HFfCLgKzoMhpJbp6I/JnogyNZHcaA==}
+ '@next/swc-linux-x64-gnu@16.4.5':
+ resolution: {integrity: sha512-hPc+Fl+N22DAvqZHq559NmamXboOX5Lu8I5Wl0DezfrhTk1Zz21NQeYoZDmNI/NjTcrdsVxM72Fzn2lI+Q+vAw==}
engines: {node: '>= 10'}
cpu: [x64]
os: [linux]
libc: [glibc]
- '@next/swc-linux-x64-musl@16.4.3':
- resolution: {integrity: sha512-Vmjd9D7DpA4Vv3cUlr82QWgJD/BQZmns801vtC5VWHg6jCIA4a5vMKpQnfrM2pyCrp2eV0ENdUg4PlN3bAc2Yw==}
+ '@next/swc-linux-x64-musl@16.4.5':
+ resolution: {integrity: sha512-gbACYE8IP/jlprNTpiWXHb8N9CofOzpnEwH2SrIz1dUbiJf1FbDssDupCAPeP1Taxe8mgG20sGZamJI7KFOdZw==}
engines: {node: '>= 10'}
cpu: [x64]
os: [linux]
libc: [musl]
- '@next/swc-win32-arm64-msvc@16.4.3':
- resolution: {integrity: sha512-lG1pPdPLk7gTyGb00n5JIMLdBJgjb+UEhSdZvFbhUMg0DyC6z4B7RnpSKF9VCd4imkLObVbXOFA0kFCpw7yFow==}
+ '@next/swc-win32-arm64-msvc@16.4.5':
+ resolution: {integrity: sha512-+8gj++ZMo8H20Xh2ijjNqyFk5LPLw0AC4Fs4Tq/G94rjjQXhOjN4jgSWsWKPFsyY26hfIeemJIwKtMxOsp5GBA==}
engines: {node: '>= 10'}
cpu: [arm64]
os: [win32]
- '@next/swc-win32-x64-msvc@16.4.3':
- resolution: {integrity: sha512-NmQC9RkJdnPXRaMxtkCzobB3teVjqF33oSOnwDfi+XYGWWYpt+xlGK3mtktSKLbdjwaWbJu2OkkMiRFGUUncKg==}
+ '@next/swc-win32-x64-msvc@16.4.5':
+ resolution: {integrity: sha512-qNZj66pYXnaWLiF9R9GUbfBdrCv7kC6TaZfIwB2KH5WPc/8pEM3nVOj8hpQhWJU8S94rlH5MPDcX15+RrgUhiw==}
engines: {node: '>= 10'}
cpu: [x64]
os: [win32]
@@ -853,8 +853,8 @@ packages:
resolution: {integrity: sha512-SEeaJLb3qBNF/OaXnaR1NmmBbFYk1zC0ZH/52fATcRPLFg/p791YrcyFFy44Bo9sLaGuSuLp5Q6axbb/O+v/RA==}
engines: {node: ^14.18.0 || >=16.0.0}
- '@playwright/test@1.64.1':
- resolution: {integrity: sha512-IaYGml/nSOiZWROfPtuIL7neuu9qDOZ3TNvNljUIrhDMxiGTgPjzj/g9p9RxpS2tSepPDRY+UwAaEeiKtUvIAg==}
+ '@playwright/test@1.65.0':
+ resolution: {integrity: sha512-iGURLGuKDLakSEl7Pgfv8h7f+XLT+V861Wfhz0zlEl5nyFuKUopdkFBPKqTllTUp06aOwPuH8iuUEb3yp3MpbQ==}
engines: {node: '>=20'}
hasBin: true
@@ -1240,71 +1240,70 @@ packages:
'@swc/helpers@0.5.23':
resolution: {integrity: sha512-5lSsMOTXURePglDfvuAQUqkGek9Hg2kksOYay2m0+XR++b2NWYL/4sWyuvVBIs8oKnJaxkdi9whaL/sqN13afw==}
- '@tailwindcss/node@4.3.3':
- resolution: {integrity: sha512-/T8IKEsf9VTU6tLjgC7+sv2mOPtQxzE2jMw7u4Tt40Tx+QSZxpzh95/H6cMKoja9XuW7iMdLJYBB0o9G1CaAgg==}
+ '@tailwindcss/node@4.3.5':
+ resolution: {integrity: sha512-yT53FzV4ke0cr/BguDxhWMpm5MJu1O2muzk+tKw6lKHjODAsYArBbWwFbJiaksfzFv1tpkO9QHGzmfs1hJT66g==}
- '@tailwindcss/oxide-android-arm64@4.3.3':
- resolution: {integrity: sha512-Y85A2gmPSkl5Ve5qR86GL4HT509cFqQh1aes9p3sSkyTPwt0Pppf3GkwGe4JPACcRYjgJIEhQgM6dBClnr0NYw==}
+ '@tailwindcss/oxide-android-arm64@4.3.5':
+ resolution: {integrity: sha512-Se0z5xMqcSQanJD1IYmO0cGpK3iv0fp3ZsIT7xRJZ1Da5PghvNoc46zz4jIQn+aan3dV9T8AermFNN9QPmsh0Q==}
engines: {node: '>= 20'}
cpu: [arm64]
os: [android]
- '@tailwindcss/oxide-darwin-arm64@4.3.3':
- resolution: {integrity: sha512-BiaWatpBcERQFDlOjRDpIVXuFK5PJez5SA4JMg6VYZdBYU+qKfV/vqjcIs+IYmtitf1xYQZTwXvU/8y4lfZUGw==}
+ '@tailwindcss/oxide-darwin-arm64@4.3.5':
+ resolution: {integrity: sha512-UPrgTDuUbvmqGMZuCnmI3FKee/tYKzKdp00/kuB4oSGB213VYg8QTdF7lVhnPoBXq/mIfJ+ILoBFqNOboWcMwQ==}
engines: {node: '>= 20'}
cpu: [arm64]
os: [darwin]
- '@tailwindcss/oxide-darwin-x64@4.3.3':
- resolution: {integrity: sha512-fAeUqfV5ndhxRwai8cXGzdLvul9utWOmeTkv69unv4ZXixjn61Z+p9lCWdwOwA3TYboG3BwdVuN/RDjhBRl0mw==}
+ '@tailwindcss/oxide-darwin-x64@4.3.5':
+ resolution: {integrity: sha512-E+p7HEtjI0b8D7kbbWxH067cGui6d4c79COGko9fAPVE3rwc1E7ld2HFCbaG86AOGWS5VKQYqZOaf38ya4uxTQ==}
engines: {node: '>= 20'}
cpu: [x64]
os: [darwin]
- '@tailwindcss/oxide-freebsd-x64@4.3.3':
- resolution: {integrity: sha512-iyf5bV6+wnAlflVeEy7R25dupxTNECZN5QMI0qNT6eT+EgaGdZcKhGkr5SdoaWiLJ3spLqIY9VCeSGrwmtg4kw==}
+ '@tailwindcss/oxide-freebsd-x64@4.3.5':
+ resolution: {integrity: sha512-yWEWcWyAG7rWOcTpJTjdhQ3pcaFY2h+0bqTRfgU3G2fz87ZU3AKdvdZKhslD+kyHnjBUWKvNdRYwIYC5dI1tIg==}
engines: {node: '>= 20'}
cpu: [x64]
os: [freebsd]
- '@tailwindcss/oxide-linux-arm-gnueabihf@4.3.3':
- resolution: {integrity: sha512-aAYUprJAJQWWbRrPvtjdroZ56Md+JM8pMiopS6xGEwDfLhqj+2ver2p4nU4Mb3CRqcMmNBjo8KkUgcxhkzVQGQ==}
+ '@tailwindcss/oxide-linux-arm-gnueabihf@4.3.5':
+ resolution: {integrity: sha512-WmeVjtJhZlr+smpqcdR2kQkkn6arHIJnUIBxTO2EJcTLGY1ecVXNo2hbSn8xc0IH2aEtys936iMWKGyj0GaKnA==}
engines: {node: '>= 20'}
cpu: [arm]
os: [linux]
- '@tailwindcss/oxide-linux-arm64-gnu@4.3.3':
- resolution: {integrity: sha512-nDxldcEENOxZRzC2uu9jrutZdAAQtb+8WWDCSnWL1zvBk1+FN+x6MtDViPB5AJMfttVCUhehGWus3XBPgatM/w==}
+ '@tailwindcss/oxide-linux-arm64-gnu@4.3.5':
+ resolution: {integrity: sha512-DTCSyucc6ShMp1QMqV5R94Z7xlgNgUzkGmFF1rL5HH2Qjy4eSmEqy+YLGkqqYvWa4sILtgrBt1JjRKbneQtiFQ==}
engines: {node: '>= 20'}
cpu: [arm64]
os: [linux]
libc: [glibc]
- '@tailwindcss/oxide-linux-arm64-musl@4.3.3':
- resolution: {integrity: sha512-Md44bD6veX/PC5iyF8cDVnw4HBIANZepRZZ7a8DQOvkfo5WUBwcp6iAuCUz23u+4SUkhJlD3eL7hNdW8ezd/kA==}
+ '@tailwindcss/oxide-linux-arm64-musl@4.3.5':
+ resolution: {integrity: sha512-H9lsvO4x9E4nE4Hi8h7NHHw0O/kcVSu+iOyFHNGdYzazGgDjFHZbE6S3hQ8kMcbNXSBlMdNi67LV5EVqtpaJtw==}
engines: {node: '>= 20'}
cpu: [arm64]
os: [linux]
libc: [musl]
- '@tailwindcss/oxide-linux-x64-gnu@4.3.3':
- resolution: {integrity: sha512-tx7us1muwOKAKWao2v/GaafFeQboE6aj88vC6ziN2NCGcRm8gWUhwjzg+YdVB1e4boAtdtma4L43onunI6NS4w==}
+ '@tailwindcss/oxide-linux-x64-gnu@4.3.5':
+ resolution: {integrity: sha512-4uxQvtBvPuIdl13WfUBj9xMZHH14PtHZ8OZdtLmdyDtG66sCa1t599NZT+jagkUzRtWhuul1qRZQ1nAJscXN5g==}
engines: {node: '>= 20'}
cpu: [x64]
os: [linux]
libc: [glibc]
- '@tailwindcss/oxide-linux-x64-musl@4.3.3':
- resolution: {integrity: sha512-SJxX60smvHgasZoBy11dX6YRjXJFovwWBoedhbQPOBzgFWBHGB+TVPWB9BxzR7TTxU8FQZAI2AyiNCMzFm8Img==}
+ '@tailwindcss/oxide-linux-x64-musl@4.3.5':
+ resolution: {integrity: sha512-0JQAzs7jwbA7O6+z/adU+Jk3AXwsu3npAhtr5escXS7TqEqWcaDV7qHuI+0Vy/KQRuVGnLQREcSJWYauyV3oqg==}
engines: {node: '>= 20'}
cpu: [x64]
os: [linux]
libc: [musl]
- '@tailwindcss/oxide-wasm32-wasi@4.3.3':
- resolution: {integrity: sha512-jx1+rPhY/5Ympkktd656HBWEBLxP7dH06losBLjjf5vgCODXvi9KhtftWcMIwTFIDqBr7cRnQkdLnAG+IOlGvQ==}
- engines: {node: '>=14.0.0'}
- cpu: [wasm32]
+ '@tailwindcss/oxide-wasm32-wasi@4.3.5':
+ resolution: {integrity: sha512-OJhFmlEfdzMr+avACdi40RPtnkW0B6hXyxL/8r+tnEHBWZji36CYRjEXrrvgBmaYsD3oEOBqwYFRKsYvzFe7Bw==}
+ engines: {node: ^20.19.0 || ^22.13.0 || >=23.5.0}
bundledDependencies:
- '@napi-rs/wasm-runtime'
- '@emnapi/core'
@@ -1313,24 +1312,24 @@ packages:
- '@emnapi/wasi-threads'
- tslib
- '@tailwindcss/oxide-win32-arm64-msvc@4.3.3':
- resolution: {integrity: sha512-3rc292Ca2ceK6Ulcc/bAVnTs/3nDtoPhyEKlgPv+yQJQi/JS/AMJlqzxvlDacL1nekbrcf6bTqp/jV4qgnPxNQ==}
+ '@tailwindcss/oxide-win32-arm64-msvc@4.3.5':
+ resolution: {integrity: sha512-9o8jgthi+QE5eandnboiJT64VQfnIArfZzSTdgbhEK5aafdiu2jTW9Honi/mwYHxBZuH1vAC57IFyrh+0iK5Gg==}
engines: {node: '>= 20'}
cpu: [arm64]
os: [win32]
- '@tailwindcss/oxide-win32-x64-msvc@4.3.3':
- resolution: {integrity: sha512-yJ0pwIVc/nYeGoV02WtsN8KYyLQv7kyI2wDnkezyJlGGjkd4QLwDGAwl47YpPJeuI0M0ObaXGSPjvWDPeTPggw==}
+ '@tailwindcss/oxide-win32-x64-msvc@4.3.5':
+ resolution: {integrity: sha512-XiKFfIy1RWe7qK4WqByxNW7Oz1/nkOy8o/BWhHminyV1PmpUd8Eedj5v2A8h2kpqeVlz6xRnwk9Fr/ZXNLcZfg==}
engines: {node: '>= 20'}
cpu: [x64]
os: [win32]
- '@tailwindcss/oxide@4.3.3':
- resolution: {integrity: sha512-krXjAikiaFSPaK/FkAQT5UTx3VormQaiZ5hBFlJZ9UFQGB/rwg1MZIhHAG9smMQRTdyJxP6Qt5MwMtdyU5FWrA==}
+ '@tailwindcss/oxide@4.3.5':
+ resolution: {integrity: sha512-PynqGLZsZvwM9tqD/CUxkOIfyd6K5elZ2MooauzJryP/UqXYgi3yYbtt3N0Xe+MHV/eFKPFQCEfIKAqlAS1CBg==}
engines: {node: '>= 20'}
- '@tailwindcss/postcss@4.3.3':
- resolution: {integrity: sha512-JTSZZGQi1AyKirbLN3azmjVzef92tcX7h+iSqPdaeStyFpGpDlKvvpxeOE8njhbUanbRwr3z8DyzhICWnMtQeg==}
+ '@tailwindcss/postcss@4.3.5':
+ resolution: {integrity: sha512-FAV37Tlx9wBiT/hkfgVD0Q6CWsP2oUX3lf28nrfjW8+ksILjnpuFulUqWDfNR4/ZiEHHDRBX8DUTzD1Rys687A==}
'@tsconfig/node10@1.0.13':
resolution: {integrity: sha512-gcLdvR9HO1ZJBypsOGqaP6TFEzb6vIta0KSTLt9NAQ6pXQO3cRgSVyCN6pzYqI9DlJgY71XKO0dpDhCf08b3pg==}
@@ -2232,78 +2231,78 @@ packages:
resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==}
engines: {node: '>=6'}
- lightningcss-android-arm64@1.32.0:
- resolution: {integrity: sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==}
+ lightningcss-android-arm64@1.33.0:
+ resolution: {integrity: sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==}
engines: {node: '>= 12.0.0'}
cpu: [arm64]
os: [android]
- lightningcss-darwin-arm64@1.32.0:
- resolution: {integrity: sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==}
+ lightningcss-darwin-arm64@1.33.0:
+ resolution: {integrity: sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==}
engines: {node: '>= 12.0.0'}
cpu: [arm64]
os: [darwin]
- lightningcss-darwin-x64@1.32.0:
- resolution: {integrity: sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==}
+ lightningcss-darwin-x64@1.33.0:
+ resolution: {integrity: sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==}
engines: {node: '>= 12.0.0'}
cpu: [x64]
os: [darwin]
- lightningcss-freebsd-x64@1.32.0:
- resolution: {integrity: sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==}
+ lightningcss-freebsd-x64@1.33.0:
+ resolution: {integrity: sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==}
engines: {node: '>= 12.0.0'}
cpu: [x64]
os: [freebsd]
- lightningcss-linux-arm-gnueabihf@1.32.0:
- resolution: {integrity: sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==}
+ lightningcss-linux-arm-gnueabihf@1.33.0:
+ resolution: {integrity: sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==}
engines: {node: '>= 12.0.0'}
cpu: [arm]
os: [linux]
- lightningcss-linux-arm64-gnu@1.32.0:
- resolution: {integrity: sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==}
+ lightningcss-linux-arm64-gnu@1.33.0:
+ resolution: {integrity: sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==}
engines: {node: '>= 12.0.0'}
cpu: [arm64]
os: [linux]
libc: [glibc]
- lightningcss-linux-arm64-musl@1.32.0:
- resolution: {integrity: sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==}
+ lightningcss-linux-arm64-musl@1.33.0:
+ resolution: {integrity: sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==}
engines: {node: '>= 12.0.0'}
cpu: [arm64]
os: [linux]
libc: [musl]
- lightningcss-linux-x64-gnu@1.32.0:
- resolution: {integrity: sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==}
+ lightningcss-linux-x64-gnu@1.33.0:
+ resolution: {integrity: sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==}
engines: {node: '>= 12.0.0'}
cpu: [x64]
os: [linux]
libc: [glibc]
- lightningcss-linux-x64-musl@1.32.0:
- resolution: {integrity: sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==}
+ lightningcss-linux-x64-musl@1.33.0:
+ resolution: {integrity: sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==}
engines: {node: '>= 12.0.0'}
cpu: [x64]
os: [linux]
libc: [musl]
- lightningcss-win32-arm64-msvc@1.32.0:
- resolution: {integrity: sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==}
+ lightningcss-win32-arm64-msvc@1.33.0:
+ resolution: {integrity: sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==}
engines: {node: '>= 12.0.0'}
cpu: [arm64]
os: [win32]
- lightningcss-win32-x64-msvc@1.32.0:
- resolution: {integrity: sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==}
+ lightningcss-win32-x64-msvc@1.33.0:
+ resolution: {integrity: sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==}
engines: {node: '>= 12.0.0'}
cpu: [x64]
os: [win32]
- lightningcss@1.32.0:
- resolution: {integrity: sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==}
+ lightningcss@1.33.0:
+ resolution: {integrity: sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==}
engines: {node: '>= 12.0.0'}
lines-and-columns@1.2.4:
@@ -2329,8 +2328,8 @@ packages:
lru-cache@5.1.1:
resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==}
- lucide-react@1.66.0:
- resolution: {integrity: sha512-8zjbi/Us+ETXqfBwmXF/FHrWGIqOdE6zT1yUdRJLQVoptomSkB0zdFWVIM667t9K8djWDaXdkBkqi2qVTuDNiw==}
+ lucide-react@1.72.0:
+ resolution: {integrity: sha512-fbF5i1GU8GODETa3Q7rXqrJrcx3iPYrQtxthom103zGx+Z0BGwKYAW9s+9435ohYJ7hQm0av0PoZcqI1CRwNrg==}
peerDependencies:
'@types/react': '*'
react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0
@@ -2338,8 +2337,8 @@ packages:
'@types/react':
optional: true
- magic-string@0.30.21:
- resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==}
+ magic-string@1.4.5:
+ resolution: {integrity: sha512-oLLC2+YvQUfAa+vxoufE/yc1icb87M9iXIRqAoR/2EhE/8cb3SF/+Gi0c2By1B+5Vz2e2vQtUvHiu1+63Znh+w==}
make-dir@4.0.0:
resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==}
@@ -2391,8 +2390,8 @@ packages:
react: ^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc
react-dom: ^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc
- next@16.4.3:
- resolution: {integrity: sha512-OqxKTGi9u80FydydsMNYNjnuje9Au+kvHlt2GZ//ftdpDHm1dxKqAaENoOOTX5wKzn+9vaKUNIfZeyZUuLhCnA==}
+ next@16.4.5:
+ resolution: {integrity: sha512-rmdfsWosjTUO+6R0S3KokoIk6Kj0sWDRTe86tZHdqaWH/oXq/udX3/4xb+YQi7aWbyEFoglDU54kaifLCdXbBw==}
engines: {node: '>=20.9.0'}
hasBin: true
peerDependencies:
@@ -2494,13 +2493,13 @@ packages:
resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==}
engines: {node: '>=8'}
- playwright-core@1.64.1:
- resolution: {integrity: sha512-BC4s8y6SEVA6Q1rSxZTto8hI1KUI3xXlHGZgvGqP4IqPdI/a6FX9H29IDNz7vKo9l21b6LfYosScPL6M3xxyDQ==}
+ playwright-core@1.65.0:
+ resolution: {integrity: sha512-vNSKgH6YqtN7cdT/L334zo0a+YwkrpicyrHJlWWPIm/Q+Nn2SWInil01oT0mbu96U4GgoRtCYQD9CzJQgju+lA==}
engines: {node: '>=20'}
hasBin: true
- playwright@1.64.1:
- resolution: {integrity: sha512-HCrVhHr5QQuwYoswEUGTb7gGp522yflbv/ST8nF4sFWGuLjQCt17Q/EubpGGSNKYn1tsTCPZxqHhHCfVURu7UA==}
+ playwright@1.65.0:
+ resolution: {integrity: sha512-F3AMWcR44qMBt4kq+6Kb6mX7bjGXshktKFOPULd7reED6ZJWevjbNRqysP7q+AATE9kdPEZBibex1BYsvpVoeA==}
engines: {node: '>=20'}
hasBin: true
@@ -2751,8 +2750,8 @@ packages:
peerDependencies:
tailwindcss: '>=3.0.0 || insiders'
- tailwindcss@4.3.3:
- resolution: {integrity: sha512-gOhV3P7ufE62QDGg1zVaTgCR+EtPv92k2nIhVcVKcLmxT1sUBsQGhnZj175j+MqRt4zLF7ic+sCYjfhxMxj7YQ==}
+ tailwindcss@4.3.5:
+ resolution: {integrity: sha512-FcQk9BuffmEHJP2G0XmB2SplU1aLTI7j07Kunk+U74Ny+XiWOtzXz9aujFZ/avntw1e2cOv/3PkgzflQ7gX2vQ==}
tapable@2.3.3:
resolution: {integrity: sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==}
@@ -3181,47 +3180,47 @@ snapshots:
'@bcoe/v8-coverage@0.2.3': {}
- '@biomejs/biome@2.6.4':
+ '@biomejs/biome@2.6.7':
optionalDependencies:
- '@biomejs/cli-android-arm64': 2.6.4
- '@biomejs/cli-android-x64': 2.6.4
- '@biomejs/cli-darwin-arm64': 2.6.4
- '@biomejs/cli-darwin-x64': 2.6.4
- '@biomejs/cli-linux-arm64': 2.6.4
- '@biomejs/cli-linux-arm64-musl': 2.6.4
- '@biomejs/cli-linux-x64': 2.6.4
- '@biomejs/cli-linux-x64-musl': 2.6.4
- '@biomejs/cli-win32-arm64': 2.6.4
- '@biomejs/cli-win32-x64': 2.6.4
-
- '@biomejs/cli-android-arm64@2.6.4':
+ '@biomejs/cli-android-arm64': 2.6.7
+ '@biomejs/cli-android-x64': 2.6.7
+ '@biomejs/cli-darwin-arm64': 2.6.7
+ '@biomejs/cli-darwin-x64': 2.6.7
+ '@biomejs/cli-linux-arm64': 2.6.7
+ '@biomejs/cli-linux-arm64-musl': 2.6.7
+ '@biomejs/cli-linux-x64': 2.6.7
+ '@biomejs/cli-linux-x64-musl': 2.6.7
+ '@biomejs/cli-win32-arm64': 2.6.7
+ '@biomejs/cli-win32-x64': 2.6.7
+
+ '@biomejs/cli-android-arm64@2.6.7':
optional: true
- '@biomejs/cli-android-x64@2.6.4':
+ '@biomejs/cli-android-x64@2.6.7':
optional: true
- '@biomejs/cli-darwin-arm64@2.6.4':
+ '@biomejs/cli-darwin-arm64@2.6.7':
optional: true
- '@biomejs/cli-darwin-x64@2.6.4':
+ '@biomejs/cli-darwin-x64@2.6.7':
optional: true
- '@biomejs/cli-linux-arm64-musl@2.6.4':
+ '@biomejs/cli-linux-arm64-musl@2.6.7':
optional: true
- '@biomejs/cli-linux-arm64@2.6.4':
+ '@biomejs/cli-linux-arm64@2.6.7':
optional: true
- '@biomejs/cli-linux-x64-musl@2.6.4':
+ '@biomejs/cli-linux-x64-musl@2.6.7':
optional: true
- '@biomejs/cli-linux-x64@2.6.4':
+ '@biomejs/cli-linux-x64@2.6.7':
optional: true
- '@biomejs/cli-win32-arm64@2.6.4':
+ '@biomejs/cli-win32-arm64@2.6.7':
optional: true
- '@biomejs/cli-win32-x64@2.6.4':
+ '@biomejs/cli-win32-x64@2.6.7':
optional: true
'@cspotcode/source-map-support@0.8.1':
@@ -3625,30 +3624,30 @@ snapshots:
'@tybys/wasm-util': 0.10.4
optional: true
- '@next/env@16.4.3': {}
+ '@next/env@16.4.5': {}
- '@next/swc-darwin-arm64@16.4.3':
+ '@next/swc-darwin-arm64@16.4.5':
optional: true
- '@next/swc-darwin-x64@16.4.3':
+ '@next/swc-darwin-x64@16.4.5':
optional: true
- '@next/swc-linux-arm64-gnu@16.4.3':
+ '@next/swc-linux-arm64-gnu@16.4.5':
optional: true
- '@next/swc-linux-arm64-musl@16.4.3':
+ '@next/swc-linux-arm64-musl@16.4.5':
optional: true
- '@next/swc-linux-x64-gnu@16.4.3':
+ '@next/swc-linux-x64-gnu@16.4.5':
optional: true
- '@next/swc-linux-x64-musl@16.4.3':
+ '@next/swc-linux-x64-musl@16.4.5':
optional: true
- '@next/swc-win32-arm64-msvc@16.4.3':
+ '@next/swc-win32-arm64-msvc@16.4.5':
optional: true
- '@next/swc-win32-x64-msvc@16.4.3':
+ '@next/swc-win32-x64-msvc@16.4.5':
optional: true
'@parcel/watcher-android-arm64@2.6.0':
@@ -3709,9 +3708,9 @@ snapshots:
'@pkgr/core@0.3.6': {}
- '@playwright/test@1.64.1':
+ '@playwright/test@1.65.0':
dependencies:
- playwright: 1.64.1
+ playwright: 1.65.0
'@radix-ui/primitive@1.2.0': {}
@@ -4096,74 +4095,74 @@ snapshots:
dependencies:
tslib: 2.8.1
- '@tailwindcss/node@4.3.3':
+ '@tailwindcss/node@4.3.5':
dependencies:
'@jridgewell/remapping': 2.3.5
enhanced-resolve: 5.26.0
jiti: 2.7.0
- lightningcss: 1.32.0
- magic-string: 0.30.21
+ lightningcss: 1.33.0
+ magic-string: 1.4.5
source-map-js: 1.2.2
- tailwindcss: 4.3.3
+ tailwindcss: 4.3.5
- '@tailwindcss/oxide-android-arm64@4.3.3':
+ '@tailwindcss/oxide-android-arm64@4.3.5':
optional: true
- '@tailwindcss/oxide-darwin-arm64@4.3.3':
+ '@tailwindcss/oxide-darwin-arm64@4.3.5':
optional: true
- '@tailwindcss/oxide-darwin-x64@4.3.3':
+ '@tailwindcss/oxide-darwin-x64@4.3.5':
optional: true
- '@tailwindcss/oxide-freebsd-x64@4.3.3':
+ '@tailwindcss/oxide-freebsd-x64@4.3.5':
optional: true
- '@tailwindcss/oxide-linux-arm-gnueabihf@4.3.3':
+ '@tailwindcss/oxide-linux-arm-gnueabihf@4.3.5':
optional: true
- '@tailwindcss/oxide-linux-arm64-gnu@4.3.3':
+ '@tailwindcss/oxide-linux-arm64-gnu@4.3.5':
optional: true
- '@tailwindcss/oxide-linux-arm64-musl@4.3.3':
+ '@tailwindcss/oxide-linux-arm64-musl@4.3.5':
optional: true
- '@tailwindcss/oxide-linux-x64-gnu@4.3.3':
+ '@tailwindcss/oxide-linux-x64-gnu@4.3.5':
optional: true
- '@tailwindcss/oxide-linux-x64-musl@4.3.3':
+ '@tailwindcss/oxide-linux-x64-musl@4.3.5':
optional: true
- '@tailwindcss/oxide-wasm32-wasi@4.3.3':
+ '@tailwindcss/oxide-wasm32-wasi@4.3.5':
optional: true
- '@tailwindcss/oxide-win32-arm64-msvc@4.3.3':
+ '@tailwindcss/oxide-win32-arm64-msvc@4.3.5':
optional: true
- '@tailwindcss/oxide-win32-x64-msvc@4.3.3':
+ '@tailwindcss/oxide-win32-x64-msvc@4.3.5':
optional: true
- '@tailwindcss/oxide@4.3.3':
+ '@tailwindcss/oxide@4.3.5':
optionalDependencies:
- '@tailwindcss/oxide-android-arm64': 4.3.3
- '@tailwindcss/oxide-darwin-arm64': 4.3.3
- '@tailwindcss/oxide-darwin-x64': 4.3.3
- '@tailwindcss/oxide-freebsd-x64': 4.3.3
- '@tailwindcss/oxide-linux-arm-gnueabihf': 4.3.3
- '@tailwindcss/oxide-linux-arm64-gnu': 4.3.3
- '@tailwindcss/oxide-linux-arm64-musl': 4.3.3
- '@tailwindcss/oxide-linux-x64-gnu': 4.3.3
- '@tailwindcss/oxide-linux-x64-musl': 4.3.3
- '@tailwindcss/oxide-wasm32-wasi': 4.3.3
- '@tailwindcss/oxide-win32-arm64-msvc': 4.3.3
- '@tailwindcss/oxide-win32-x64-msvc': 4.3.3
-
- '@tailwindcss/postcss@4.3.3':
+ '@tailwindcss/oxide-android-arm64': 4.3.5
+ '@tailwindcss/oxide-darwin-arm64': 4.3.5
+ '@tailwindcss/oxide-darwin-x64': 4.3.5
+ '@tailwindcss/oxide-freebsd-x64': 4.3.5
+ '@tailwindcss/oxide-linux-arm-gnueabihf': 4.3.5
+ '@tailwindcss/oxide-linux-arm64-gnu': 4.3.5
+ '@tailwindcss/oxide-linux-arm64-musl': 4.3.5
+ '@tailwindcss/oxide-linux-x64-gnu': 4.3.5
+ '@tailwindcss/oxide-linux-x64-musl': 4.3.5
+ '@tailwindcss/oxide-wasm32-wasi': 4.3.5
+ '@tailwindcss/oxide-win32-arm64-msvc': 4.3.5
+ '@tailwindcss/oxide-win32-x64-msvc': 4.3.5
+
+ '@tailwindcss/postcss@4.3.5':
dependencies:
'@alloc/quick-lru': 5.3.0
- '@tailwindcss/node': 4.3.3
- '@tailwindcss/oxide': 4.3.3
+ '@tailwindcss/node': 4.3.5
+ '@tailwindcss/oxide': 4.3.5
postcss: 8.5.32
- tailwindcss: 4.3.3
+ tailwindcss: 4.3.5
'@tsconfig/node10@1.0.13': {}
@@ -5179,54 +5178,54 @@ snapshots:
leven@3.1.0: {}
- lightningcss-android-arm64@1.32.0:
+ lightningcss-android-arm64@1.33.0:
optional: true
- lightningcss-darwin-arm64@1.32.0:
+ lightningcss-darwin-arm64@1.33.0:
optional: true
- lightningcss-darwin-x64@1.32.0:
+ lightningcss-darwin-x64@1.33.0:
optional: true
- lightningcss-freebsd-x64@1.32.0:
+ lightningcss-freebsd-x64@1.33.0:
optional: true
- lightningcss-linux-arm-gnueabihf@1.32.0:
+ lightningcss-linux-arm-gnueabihf@1.33.0:
optional: true
- lightningcss-linux-arm64-gnu@1.32.0:
+ lightningcss-linux-arm64-gnu@1.33.0:
optional: true
- lightningcss-linux-arm64-musl@1.32.0:
+ lightningcss-linux-arm64-musl@1.33.0:
optional: true
- lightningcss-linux-x64-gnu@1.32.0:
+ lightningcss-linux-x64-gnu@1.33.0:
optional: true
- lightningcss-linux-x64-musl@1.32.0:
+ lightningcss-linux-x64-musl@1.33.0:
optional: true
- lightningcss-win32-arm64-msvc@1.32.0:
+ lightningcss-win32-arm64-msvc@1.33.0:
optional: true
- lightningcss-win32-x64-msvc@1.32.0:
+ lightningcss-win32-x64-msvc@1.33.0:
optional: true
- lightningcss@1.32.0:
+ lightningcss@1.33.0:
dependencies:
detect-libc: 2.1.2
optionalDependencies:
- lightningcss-android-arm64: 1.32.0
- lightningcss-darwin-arm64: 1.32.0
- lightningcss-darwin-x64: 1.32.0
- lightningcss-freebsd-x64: 1.32.0
- lightningcss-linux-arm-gnueabihf: 1.32.0
- lightningcss-linux-arm64-gnu: 1.32.0
- lightningcss-linux-arm64-musl: 1.32.0
- lightningcss-linux-x64-gnu: 1.32.0
- lightningcss-linux-x64-musl: 1.32.0
- lightningcss-win32-arm64-msvc: 1.32.0
- lightningcss-win32-x64-msvc: 1.32.0
+ lightningcss-android-arm64: 1.33.0
+ lightningcss-darwin-arm64: 1.33.0
+ lightningcss-darwin-x64: 1.33.0
+ lightningcss-freebsd-x64: 1.33.0
+ lightningcss-linux-arm-gnueabihf: 1.33.0
+ lightningcss-linux-arm64-gnu: 1.33.0
+ lightningcss-linux-arm64-musl: 1.33.0
+ lightningcss-linux-x64-gnu: 1.33.0
+ lightningcss-linux-x64-musl: 1.33.0
+ lightningcss-win32-arm64-msvc: 1.33.0
+ lightningcss-win32-x64-msvc: 1.33.0
lines-and-columns@1.2.4: {}
@@ -5249,13 +5248,13 @@ snapshots:
dependencies:
yallist: 3.1.1
- lucide-react@1.66.0(@types/react@19.3.0)(react@19.3.1):
+ lucide-react@1.72.0(@types/react@19.3.0)(react@19.3.1):
dependencies:
react: 19.3.1
optionalDependencies:
'@types/react': 19.3.0
- magic-string@0.30.21:
+ magic-string@1.4.5:
dependencies:
'@jridgewell/sourcemap-codec': 1.6.0
@@ -5293,9 +5292,9 @@ snapshots:
react: 19.3.1
react-dom: 19.3.1(react@19.3.1)
- next@16.4.3(@babel/core@7.29.7)(@playwright/test@1.64.1)(@types/node@22.20.5)(react-dom@19.3.1(react@19.3.1))(react@19.3.1):
+ next@16.4.5(@babel/core@7.29.7)(@playwright/test@1.65.0)(@types/node@22.20.5)(react-dom@19.3.1(react@19.3.1))(react@19.3.1):
dependencies:
- '@next/env': 16.4.3
+ '@next/env': 16.4.5
'@swc/helpers': 0.5.23
baseline-browser-mapping: 2.11.34
caniuse-lite: 1.0.30001820
@@ -5304,15 +5303,15 @@ snapshots:
react-dom: 19.3.1(react@19.3.1)
styled-jsx: 5.1.6(@babel/core@7.29.7)(react@19.3.1)
optionalDependencies:
- '@next/swc-darwin-arm64': 16.4.3
- '@next/swc-darwin-x64': 16.4.3
- '@next/swc-linux-arm64-gnu': 16.4.3
- '@next/swc-linux-arm64-musl': 16.4.3
- '@next/swc-linux-x64-gnu': 16.4.3
- '@next/swc-linux-x64-musl': 16.4.3
- '@next/swc-win32-arm64-msvc': 16.4.3
- '@next/swc-win32-x64-msvc': 16.4.3
- '@playwright/test': 1.64.1
+ '@next/swc-darwin-arm64': 16.4.5
+ '@next/swc-darwin-x64': 16.4.5
+ '@next/swc-linux-arm64-gnu': 16.4.5
+ '@next/swc-linux-arm64-musl': 16.4.5
+ '@next/swc-linux-x64-gnu': 16.4.5
+ '@next/swc-linux-x64-musl': 16.4.5
+ '@next/swc-win32-arm64-msvc': 16.4.5
+ '@next/swc-win32-x64-msvc': 16.4.5
+ '@playwright/test': 1.65.0
sharp: 0.35.5(@types/node@22.20.5)
transitivePeerDependencies:
- '@babel/core'
@@ -5393,11 +5392,11 @@ snapshots:
dependencies:
find-up: 4.1.0
- playwright-core@1.64.1: {}
+ playwright-core@1.65.0: {}
- playwright@1.64.1:
+ playwright@1.65.0:
dependencies:
- playwright-core: 1.64.1
+ playwright-core: 1.65.0
postcss@8.5.32:
dependencies:
@@ -5635,11 +5634,11 @@ snapshots:
tailwind-merge@3.7.0: {}
- tailwindcss-animate@1.0.7(tailwindcss@4.3.3):
+ tailwindcss-animate@1.0.7(tailwindcss@4.3.5):
dependencies:
- tailwindcss: 4.3.3
+ tailwindcss: 4.3.5
- tailwindcss@4.3.3: {}
+ tailwindcss@4.3.5: {}
tapable@2.3.3: {}
diff --git a/lib/log_struct/semantic_logger/reopen_after_fork.rb b/lib/log_struct/semantic_logger/reopen_after_fork.rb
index 48a88c5..7f481c1 100644
--- a/lib/log_struct/semantic_logger/reopen_after_fork.rb
+++ b/lib/log_struct/semantic_logger/reopen_after_fork.rb
@@ -15,6 +15,8 @@ module ReopenAfterFork
def self.install!
return if @installed
@installed = true
+ # SemanticLogger 5 reopens after a fork itself, and an app can turn that off with reopen_on_fork = false
+ return if ::SemanticLogger.respond_to?(:reopen_on_fork?)
Process.singleton_class.prepend(ForkHook)
end
diff --git a/lib/log_struct/version.rb b/lib/log_struct/version.rb
index 676adfb..eb6ac99 100644
--- a/lib/log_struct/version.rb
+++ b/lib/log_struct/version.rb
@@ -2,5 +2,5 @@
# frozen_string_literal: true
module LogStruct
- VERSION = "0.4.0"
+ VERSION = "0.4.1"
end
diff --git a/logstruct.gemspec b/logstruct.gemspec
index cbaf548..753f3f6 100644
--- a/logstruct.gemspec
+++ b/logstruct.gemspec
@@ -44,7 +44,7 @@ Gem::Specification.new do |spec|
spec.add_dependency "globalid", ">= 1.0"
spec.add_dependency "lograge", ">= 0.11"
spec.add_dependency "railties", ">= 7.1"
- spec.add_dependency "semantic_logger", "~> 4.15"
+ spec.add_dependency "semantic_logger", ">= 4.15", "< 6.0"
spec.add_dependency "sorbet-runtime", ">= 0.6.12698"
# Optional integrations
@@ -55,7 +55,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "sentry-ruby", "~> 7.2"
spec.add_development_dependency "shrine", "~> 3.5"
spec.add_development_dependency "sidekiq", "~> 8.1"
- spec.add_development_dependency "sorbet", "~> 0.5"
+ spec.add_development_dependency "sorbet", "~> 0.6"
spec.add_development_dependency "ahoy_matey", ">= 4.1", "< 6.0"
spec.add_development_dependency "active_model_serializers", "~> 0.10.13"
spec.add_development_dependency "dotenv-rails", "~> 3.1"
diff --git a/package.json b/package.json
index a6719df..e6ca910 100644
--- a/package.json
+++ b/package.json
@@ -23,7 +23,7 @@
"homepage": "https://github.com/docspring/logstruct#readme",
"devDependencies": {
"@docspring/cspell-lockfile-dicts": "^1.2.0",
- "cspell": "^10.4.0",
+ "cspell": "^10.4.1",
"jscpd": "^5.4.2",
"prettier": "^3.9.10"
},
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 925ab65..6fcb085 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -16,8 +16,8 @@ importers:
specifier: ^1.2.0
version: 1.2.0
cspell:
- specifier: ^10.4.0
- version: 10.4.0
+ specifier: ^10.4.1
+ version: 10.4.1
jscpd:
specifier: ^5.4.2
version: 5.4.2
@@ -27,40 +27,40 @@ importers:
packages:
- '@cspell/cspell-bundled-dicts@10.4.0':
- resolution: {integrity: sha512-ey23dut7NdnOsQQinQhROFZUh4LvLhJnnZCiq7y+KXMngdqXnIAZuEnnwXk3IfdOX+tycDC8OuMssLXDJ3Fnxw==}
+ '@cspell/cspell-bundled-dicts@10.4.1':
+ resolution: {integrity: sha512-QkDsQSUa6qK/2/AF43YYTrN1rpsJN3Yn1ckA3qH9zmBn0N/tkCWaJ675wo8j1CguPjZdPBF1t4J5tLcjiQv/Dg==}
engines: {node: '>=22.18.0'}
- '@cspell/cspell-json-reporter@10.4.0':
- resolution: {integrity: sha512-P4v7z0QbOaM7UiKvhws+/Vn5XSEtJLv9DyJCvPXoAn5it4U76hme646DvM/ChMlSG23BnrYGuryqufdxqQPuZQ==}
+ '@cspell/cspell-json-reporter@10.4.1':
+ resolution: {integrity: sha512-PV0fshBdl78839JMs0H8rpq6766TTdZQPdT+tiZ1+atarso+gZLxM4DXMqePdCBbhgV46jbW91DoN4KZIYUysA==}
engines: {node: '>=22.18.0'}
- '@cspell/cspell-performance-monitor@10.4.0':
- resolution: {integrity: sha512-0hCqI8pR0waFKKOR3SZ4VtWddx7HZTr0v7MPCPG0IpaqMzzaibrXn9AtFCe+9T1+UDQrM109YKS+yr0c6xVvMQ==}
+ '@cspell/cspell-performance-monitor@10.4.1':
+ resolution: {integrity: sha512-hVYcJ3i8vnuo+8lK+awOsuYHIA2rlFS/DIW/ZIjKmCcVjgdNTVAWtx/EQs3mqGZGegJTOPaSv1uGvLpLgtLTHw==}
engines: {node: '>=22.18.0'}
- '@cspell/cspell-pipe@10.4.0':
- resolution: {integrity: sha512-cXHgST9ySpECyiE5ZK7TcwBqrCb3h9X49j/lSDcWNAVp7GkwnPfcdylH+Zq/VfYMlHad24z8CNXd5H91O9DhEA==}
+ '@cspell/cspell-pipe@10.4.1':
+ resolution: {integrity: sha512-7P4srvEo/LUyoGTwwsnijCZzUKTyC39N9seYyk7/u4DHmww4cQpKW3ktWdZu90hOP1hV+zdAptUMnHTHxa5NmQ==}
engines: {node: '>=22.18.0'}
- '@cspell/cspell-resolver@10.4.0':
- resolution: {integrity: sha512-uyI9qX8hagtcFtRTElYGXXyVhhnVxPBSf1Ltds9AlU9cktPOFYeTXQOfBR+Dpt9dCruzX29ZJbd3hR1i5yryZg==}
+ '@cspell/cspell-resolver@10.4.1':
+ resolution: {integrity: sha512-7aKxe59PqwVHUIQQJaN//RiiooCudG4sU+ycKUUUcEKN04vxQuo582Desa1WQQsKMH4VjCLZF1XD5lCmnpS0rw==}
engines: {node: '>=22.18.0'}
- '@cspell/cspell-service-bus@10.4.0':
- resolution: {integrity: sha512-IZzx+EWADkN5xbFrW+VS+JQ52+w5tWaZNxDgGa+0Mv79hks6wNa2Vcnce+9vGcBJYgA24VcuAfekI38tYzcDtw==}
+ '@cspell/cspell-service-bus@10.4.1':
+ resolution: {integrity: sha512-sC7dR3kfGIugcAjVjIfKKfI1T/r+2E1ps9a7aXqAJRmfLZAKXbnKGO5aeVGHKmtxGw/odZEDDOis2uwq2tdUfQ==}
engines: {node: '>=22.18.0'}
- '@cspell/cspell-types@10.4.0':
- resolution: {integrity: sha512-LTOrZcDSHj5BkeNSvimuV3AMF7gWjxzXUdQ7zYT/h/57/5flHuE6NPKSXS69ty8vJM0WrVh35L5aDxnCPfDzXA==}
+ '@cspell/cspell-types@10.4.1':
+ resolution: {integrity: sha512-FfaRrnrZ3xD09Tq6C49BdAZSx+tLM38Z60vFR/1+qQMQejUOHhv/lQ3UNN4I9z+P3BhmKutcLf8M8IOwlMfOtQ==}
engines: {node: '>=22.18.0'}
'@cspell/cspell-types@8.19.4':
resolution: {integrity: sha512-ekMWuNlFiVGfsKhfj4nmc8JCA+1ZltwJgxiKgDuwYtR09ie340RfXFF6YRd2VTW5zN7l4F1PfaAaPklVz6utSg==}
engines: {node: '>=18'}
- '@cspell/cspell-worker@10.4.0':
- resolution: {integrity: sha512-3Y1+nF1Wyyh4kwlpooNhfGSbYXK4LIYLa5xOusig2X/LmCznfN2g5wIqh8K2zSDsmjrm9PLq11MUDDXJ4ZjMKw==}
+ '@cspell/cspell-worker@10.4.1':
+ resolution: {integrity: sha512-H6+jTNdXsb5NYRG0g29axVVVS3VHvtXCeggD3p0tRVnBF/SBJZVdsHkQJPFSSAjgMNXPq8S1zhEJzmQECG9G6A==}
engines: {node: '>=22.18.0'}
'@cspell/dict-ada@4.1.1':
@@ -75,8 +75,8 @@ packages:
'@cspell/dict-bash@4.2.3':
resolution: {integrity: sha512-ljUZoKHbDqw5Sx0qpL2qTUlmkmr+vhZH/sCNrNaBZKTbdgiswErSnIF1jRbGmEitJNxHRHWsuZyVgnTGfVO1Yw==}
- '@cspell/dict-companies@3.2.13':
- resolution: {integrity: sha512-mBJeYzCkiiWgNQxKg7zyQOpFPwcXO4IAzXGbOEFfcQ4Q0G5Fa7Kqd8z+gvnvSK7NPWKJaFmiApC6I0cka02qmQ==}
+ '@cspell/dict-companies@3.2.14':
+ resolution: {integrity: sha512-3EeCXEjd6ocbKNEHsPHViHJrDduJsVo9ixr0EMrzUO6OVCXlLSCLosDUzeANQidu/u6WA1ln63uRJ9fAGAKHzw==}
'@cspell/dict-cpp@7.2.0':
resolution: {integrity: sha512-hxz+OyQKV96/Bk2JYGsDuSOheYA5gd8KybXnoZMMu/mhZPnwhPi+qiS0Kjc0gLNbXjJ6wbBuXIQWi1UWpQBU/g==}
@@ -93,8 +93,8 @@ packages:
'@cspell/dict-dart@2.3.2':
resolution: {integrity: sha512-sUiLW56t9gfZcu8iR/5EUg+KYyRD83Cjl3yjDEA2ApVuJvK1HhX+vn4e4k4YfjpUQMag8XO2AaRhARE09+/rqw==}
- '@cspell/dict-data-science@2.0.16':
- resolution: {integrity: sha512-M72mxv5asuAnORurz4iXRJ+Tw9XBq6eu7D2Ne7biP0Z1RciKGNxXWu9JycA/KlVvK1hAlKj/fANlXhuEWpXKFg==}
+ '@cspell/dict-data-science@2.0.17':
+ resolution: {integrity: sha512-6KuM1tXc1PROGu2VJjRMIkFI3lf/1c3ReFqbjV148m5w8SwNVej4Jp6nJa2f64xyaR5Z+LSRTr5RvDDJVovP8A==}
'@cspell/dict-django@4.1.7':
resolution: {integrity: sha512-94LIxiF/StBTxDkmBhi1eoOX9D/B7gk6pabBvIZFh0gmREAU6ESqU2Wv/RfGARdueMQMPfOJka+vbtL4yKv0oA==}
@@ -108,8 +108,8 @@ packages:
'@cspell/dict-elixir@4.0.8':
resolution: {integrity: sha512-CyfphrbMyl4Ms55Vzuj+mNmd693HjBFr9hvU+B2YbFEZprE5AG+EXLYTMRWrXbpds4AuZcvN3deM2XVB80BN/Q==}
- '@cspell/dict-en-common-misspellings@2.2.5':
- resolution: {integrity: sha512-c1bj+HXT8fafxrBT/nmVLwr7ILVomgVSGlWsb2wjJYanqvLJHXkCVmr0sM97F9FJeWQFIgwrRi5MWSYbNQAQ6A==}
+ '@cspell/dict-en-common-misspellings@2.2.6':
+ resolution: {integrity: sha512-RMOmCPOJuBfcC8IVLKjs9aqssjLKmhwVI8Yw/xgEnO9trWAiUzESassDATE229xqi1sdtRIIMGHyuxlkL75Xjg==}
'@cspell/dict-en-gb-mit@3.1.32':
resolution: {integrity: sha512-bEASyTAzXLowmFWrZIJjeAeCpY9g3jcYDO3tVyFDL/UaAuz0UvCVgOEyg+Ym7bclijqvXmj0xXOD/cW2XWG8iw==}
@@ -191,8 +191,8 @@ packages:
'@cspell/dict-node@5.0.9':
resolution: {integrity: sha512-hO+ga+uYZ/WA4OtiMEyKt5rDUlUyu3nXMf8KVEeqq2msYvAPdldKBGH7lGONg6R/rPhv53Rb+0Y1SLdoK1+7wQ==}
- '@cspell/dict-npm@5.2.55':
- resolution: {integrity: sha512-5xD2h3kn9ZRVbA6JFfO4VQu8VXwXsJQf7mpn099LgfaL66JnXE+wzR5dysipsren3Apdb3HlUzVqRTtnQMoVGQ==}
+ '@cspell/dict-npm@5.2.56':
+ resolution: {integrity: sha512-VqN/f97X64gYR7zVXLu2PN6t5Sm6EljZEFp4htmbOL9tGqs0XVErl9B9kwfaLlKJqfLU6vYcupjRBjqTQ6rQ4Q==}
'@cspell/dict-php@4.1.3':
resolution: {integrity: sha512-41oKzl7rLVrrVZA/Gs0ESnP6KliEX7c+IwaaNmOL3PAoHasFDVEmIFeENIzuDdM12UcHT+MlLkAm3Qw/lS/ERA==}
@@ -203,8 +203,8 @@ packages:
'@cspell/dict-public-licenses@2.0.17':
resolution: {integrity: sha512-Asdumgg3oZ4ki//b2a+beiVIsNZA5thim4t4v3lTDLY/6a8VAPmTjzC3Y2t0x7ywC/bzAhi1KW/fg8JlwHDgig==}
- '@cspell/dict-python@4.5.2':
- resolution: {integrity: sha512-CFcTDGN/ycn45WXC5ZZ06pG09WbGKMpPm1rkMuqMP98/jwjw3iiK8c0izWRd8x027n1rOZ9kJ8f9Sd+bQ22HJg==}
+ '@cspell/dict-python@4.5.3':
+ resolution: {integrity: sha512-I226HEEJW4fleE0HMxRaecnzcJICFK6TOqIjqVkOJZzaVZTTjE7fojM+f5XECAwhf4BImW7HVOKMu4rMtza6ZA==}
'@cspell/dict-r@2.1.1':
resolution: {integrity: sha512-71Ka+yKfG4ZHEMEmDxc6+blFkeTTvgKbKAbwiwQAuKl3zpqs1Y0vUtwW2N4b3LgmSPhV3ODVY0y4m5ofqDuKMw==}
@@ -221,8 +221,8 @@ packages:
'@cspell/dict-shell@1.2.0':
resolution: {integrity: sha512-PVctvT22lJ49niMiakO8xieY7ELCAzjSqhejWR7bAMb5AZ9F4WDEs+XdGMnoVHWeXq7K5rcepLPmEJb+37zzIw==}
- '@cspell/dict-software-terms@5.4.8':
- resolution: {integrity: sha512-7Fv/jgRghpcEcvpmrRR54gPp1l85pPLmlMua74hjhMJoWklAp905V742XR6u5HwvGRH7aBTW9euNsJULav1E6A==}
+ '@cspell/dict-software-terms@5.4.9':
+ resolution: {integrity: sha512-bB5L+OGW0F8Vt83j0XFcMEWCbCNqquLgjlQjm/iCp1jcYi/pQbqDLkXIPbINgbeG0vRqiu5yCPDFCsv4Qb6miQ==}
'@cspell/dict-sql@2.2.1':
resolution: {integrity: sha512-qDHF8MpAYCf4pWU8NKbnVGzkoxMNrFqBHyG/dgrlic5EQiKANCLELYtGlX5auIMDLmTf1inA0eNtv74tyRJ/vg==}
@@ -245,24 +245,24 @@ packages:
'@cspell/dict-zig@1.0.0':
resolution: {integrity: sha512-XibBIxBlVosU06+M6uHWkFeT0/pW5WajDRYdXG2CgHnq85b0TI/Ks0FuBJykmsgi2CAD3Qtx8UHFEtl/DSFnAQ==}
- '@cspell/dynamic-import@10.4.0':
- resolution: {integrity: sha512-scSwtJDqpRT/Kqzo64XR8OWzXYfdpp9Yneq99Drhqm5gXXI2BAlgjzhBnMGKa+x7eIJZVM2+D2uFeDI2xQYM2w==}
+ '@cspell/dynamic-import@10.4.1':
+ resolution: {integrity: sha512-0TlwRH0VHL3atb2QC7l8PK0CRGNmVqRPCqL84rqWlEHrh1bOqvK+2EvMRnf9nSSx5IdS2rXZYibrSfcEY0cUqQ==}
engines: {node: '>=22.18.0'}
- '@cspell/filetypes@10.4.0':
- resolution: {integrity: sha512-ez0MyFxnpYN9eMkH8vGGseQPsCRwD7ZlsR+ivQ2rPx04CX7ctp015nWv71P7m+T6V05AsyAwyEGZP9vrTlB4Ig==}
+ '@cspell/filetypes@10.4.1':
+ resolution: {integrity: sha512-ztHYeAA/cKAJdX90xjVY+RjJN9im2POkY2wAztDQjOUtP+8qztWHtdk5mOBcRXv7Q93ivBY9N0ZmctakE3+A7Q==}
engines: {node: '>=22.18.0'}
- '@cspell/rpc@10.4.0':
- resolution: {integrity: sha512-tX1YLQYPQz+p73U5OTLmOxIrsmRkpaaKrPnfrVIpK5yv3erWE8ELVZD0zK01rursbL1rW3gyOv0ShHlmoE5VNA==}
+ '@cspell/rpc@10.4.1':
+ resolution: {integrity: sha512-rkNS7F1q+aofcex3lun2YzxMybx2pUXgVB1mFRC7LOQhrFOqs85FYg0Absc2sKr2QmedckgWj3Du91ZJn0eChA==}
engines: {node: '>=22.18.0'}
- '@cspell/strong-weak-map@10.4.0':
- resolution: {integrity: sha512-y8+Hk90mA3UY4HYEWBJokvNcixQOKkRDLEr+yXSYyOJnt6MhAu8D7N567HjEVNj0e7oirXl62wpNglPfo7qAcQ==}
+ '@cspell/strong-weak-map@10.4.1':
+ resolution: {integrity: sha512-Bap/Gs0/G4NE6KQtT+dNvyGBC2iHws+5il/nvFUuZ1D5dLEK/SYeOuLCX/hdCvcPEF02kr8NxJfY7oK/w8YFiQ==}
engines: {node: '>=22.18.0'}
- '@cspell/url@10.4.0':
- resolution: {integrity: sha512-8NvDv8h3eaxejAvD+crMsSEgGq6LiunfS6iD2TBAcDqskNsIpN43AMHNNRf7T7Fd/3Y413nQDBH4RmsHcNsiqg==}
+ '@cspell/url@10.4.1':
+ resolution: {integrity: sha512-QoFi7+fMsBMz9l1wULNcVfyih2DarTv9Z+QKkQGuC/a1Xq70Veoh/JRtczDoOXCAsgutX12VHlHtu9nPRhahoQ==}
engines: {node: '>=22.18.0'}
'@docspring/cspell-lockfile-dicts@1.2.0':
@@ -273,6 +273,10 @@ packages:
'@isaacs/nonrecursive-glob-match@1.0.3':
resolution: {integrity: sha512-SI7kyKHq4XXDRozw+r9GlRZkia1ZkFrpLW98r2IC2Bpr8YkFGE3fvjzmxCG0x78A++69HmDNrDvSMYBZmHGpKA==}
+ '@streetsidesoftware/unindent@1.0.1':
+ resolution: {integrity: sha512-ZXfg7MT3AT9ZOq/hgzbqNc01zVPG+PFkr+kbB2OHlMcNrtvK10ZPkNgy38MqTErjNeajh4VG1sSSv5zIyjOXxg==}
+ engines: {node: '>=22.18.0'}
+
ansi-regex@6.5.0:
resolution: {integrity: sha512-zhvbbbdt1kbw7EJ9OQoxmQcuaNR9P5kTj7e/YdmOSU10aHWbycofJxA6jKfoEy3vlLdctOF9ZHaxLtmSm998wQ==}
engines: {node: '>=12'}
@@ -312,44 +316,44 @@ packages:
resolution: {integrity: sha512-uiqLcOiVDJtBP8WGkZHEP+FZIhTzP1dxvn59EfoYUi9gqupjrBWVQkO2atDrbnKPwLeotFYDsuNb26uBMqB+hw==}
engines: {node: '>= 6'}
- cspell-config-lib@10.4.0:
- resolution: {integrity: sha512-1P0xmWIlGqwsHf8he9BWNdqV2bvRBkxCv5ctj3oHBraRFS6CPjdJBptyjuM0dgTwxmxPFcuWhTG8miTvFMje5g==}
+ cspell-config-lib@10.4.1:
+ resolution: {integrity: sha512-g6XYIdwwIlvakGsIaBtddakSXe35DIwREDptBxLhf0rcIdMv0n4Ii9BluaX+RgzMzRavkBlLS19quNLl80g+LA==}
engines: {node: '>=22.18.0'}
- cspell-dictionary@10.4.0:
- resolution: {integrity: sha512-FwCQBzqOxjAg+GhymrY288As9DmJqHVrkAr++0tCQ1wWFVw2Nt1W3cCKn9W987Dr+giSuNREdQFpGbQ/cHluTg==}
+ cspell-dictionary@10.4.1:
+ resolution: {integrity: sha512-o9aIAsY0R+MMBbhFEF7aP77NaNETdp1YbZTRN0Xt4JsXQzjX9CMSXOm7WepRVk4Cf9DSSBdyhOYVbECu+2T0wg==}
engines: {node: '>=22.18.0'}
- cspell-gitignore@10.4.0:
- resolution: {integrity: sha512-2jwooVHqRvWYr21V8lOASOYGnf8wEMXiy5ifob1oqotVZ3PfucuWAYpVaeTm3bFz6uU4yqFUU/HdizAEKWt6zg==}
+ cspell-gitignore@10.4.1:
+ resolution: {integrity: sha512-YGX9WrxBOma0zNbR8RrVQWmtVJzHMy71ouljbJ/iC8HHTFwaVUlKEFMzvpSYLTAMSMVpa1Cc+9HpUjCcxiyOaA==}
engines: {node: '>=22.18.0'}
hasBin: true
- cspell-glob@10.4.0:
- resolution: {integrity: sha512-XnctlpRbhln7dTmJyISw7HdsXM38CW+S7Ygm5kkAEixSyceim8RJfRj2rhtofL7B6Ra6YdRmJnm2/PWDOIVzLw==}
+ cspell-glob@10.4.1:
+ resolution: {integrity: sha512-bgLVOtD1sDSE0NxTXva6A9HSoxPhet4y709czloJ2bEDb0FNLl+kKJl2hEX0GtMztaNuLWK8nmb9y4RiJbON1Q==}
engines: {node: '>=22.18.0'}
- cspell-grammar@10.4.0:
- resolution: {integrity: sha512-zWxN9g0oh2tzJDM3C11prpsqF2nTw5AHpXtOslTm3D5d4ZL4BfBHRj5PFxbz3Px4fKz/KptPhxSP5yGDCNtjJg==}
+ cspell-grammar@10.4.1:
+ resolution: {integrity: sha512-LqXg57TQp/7UPH2XJC6WZTfTLvV0iP+8Ox0Gkyo0tFr+ijBWBB2KnPGEX1udtzZqaRpGokT2xi5rB3zO/lAxgg==}
engines: {node: '>=22.18.0'}
hasBin: true
- cspell-io@10.4.0:
- resolution: {integrity: sha512-EunMcHZbgA7PYj6172t2nPFVVWo0L7xi4awIhMay27c3vYGiA+ajowIBtIdy2MLOTSqL+XOfcjkuahXh8L8BzQ==}
+ cspell-io@10.4.1:
+ resolution: {integrity: sha512-4AtNoBOFDHKDul2teL+PsmvZlIM+U1uWxFVGmzCtP4xVENKm1WlgwOoSSsQVvZDBlMRLjkWbsHJAKIR3f97wfg==}
engines: {node: '>=22.18.0'}
- cspell-lib@10.4.0:
- resolution: {integrity: sha512-wfqmn19pfEUjWy7UJ4xPeRwyb/LFXHxFVJ6maX87OLRuSE9fTP+cr74VANpKycd/rieuB2ffKta7l38n+Xhj/Q==}
+ cspell-lib@10.4.1:
+ resolution: {integrity: sha512-mX9UfN3hpcfdbqLWYIzLiJ81W2dhcgJfBDo3H1YAPK+yXZobSxtHeyQQBBapJ6Ca84U2R6AWNjuSjCneeISogg==}
engines: {node: '>=22.18.0'}
- cspell-trie-lib@10.4.0:
- resolution: {integrity: sha512-3APfmYOrYEcoiDjupm3JsxLWvqa6IbJ76CqUTuIgXQH2EK0nOJ5SRKSTNP6AplDtalCs0o6VllbiRX6S81g8yw==}
+ cspell-trie-lib@10.4.1:
+ resolution: {integrity: sha512-MOxZ3b2MLNfRWXz1Seh6xXGvUclMxA9h11tCBj6+Y0pd+7KtNk7YMlzmHIGOnbF9W5YZNtA2bMuYbVlefcOa1w==}
engines: {node: '>=22.18.0'}
peerDependencies:
- '@cspell/cspell-types': 10.4.0
+ '@cspell/cspell-types': 10.4.1
- cspell@10.4.0:
- resolution: {integrity: sha512-fr7PD9nDXtOwJmW8vk2MOXBuc+oGsYF9uLgUtg+1pWiPo2TwxJVLePfCIKmL6x4AAYSYqaRTrNGppYCDKcHOYw==}
+ cspell@10.4.1:
+ resolution: {integrity: sha512-/6r9R7Pv78VFuD4uKogu2g6SG+Lms78sLBesgEPR8YJ/VEbEYAz6cbXv86m3FMlqWJdccvnG6WiPNt2Ce8SZAw==}
engines: {node: '>=22.18.0'}
hasBin: true
@@ -362,8 +366,8 @@ packages:
engines: {node: '>=4'}
hasBin: true
- fast-equals@6.2.1:
- resolution: {integrity: sha512-s7KFkLPAAbIDGTh+nVYhjTiwKGvgMXAUG5vwzg8vQKj7NSRZ4eEGExBQ4rq9V90fTYVWd1cb/Wr4ffCNBmLQMQ==}
+ fast-equals@6.2.2:
+ resolution: {integrity: sha512-n+XqoarWCgcar0O3om3DeNYx6xTuLWGTUF1bRZ9iuO00tsPepzP1L4V7rqtxxZ4PEya34UCESReimFvxmEVwIA==}
engines: {node: '>=6.0.0'}
fdir@6.5.0:
@@ -483,8 +487,8 @@ packages:
resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==}
engines: {node: '>=8'}
- semver@7.8.5:
- resolution: {integrity: sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==}
+ semver@7.8.6:
+ resolution: {integrity: sha512-9lpSSU4Mly3mrtruwLs1eLK6+gzbzqeBFwRNjIjE+9LuDpWdYctrQlQ3ej1Ilgi7gknpsTRnPoLP8DpCHqHIJw==}
engines: {node: '>=10'}
hasBin: true
@@ -513,24 +517,24 @@ packages:
snapshots:
- '@cspell/cspell-bundled-dicts@10.4.0':
+ '@cspell/cspell-bundled-dicts@10.4.1':
dependencies:
'@cspell/dict-ada': 4.1.1
'@cspell/dict-al': 1.1.1
'@cspell/dict-aws': 4.0.17
'@cspell/dict-bash': 4.2.3
- '@cspell/dict-companies': 3.2.13
+ '@cspell/dict-companies': 3.2.14
'@cspell/dict-cpp': 7.2.0
'@cspell/dict-cryptocurrencies': 5.0.5
'@cspell/dict-csharp': 4.0.8
'@cspell/dict-css': 4.1.2
'@cspell/dict-dart': 2.3.2
- '@cspell/dict-data-science': 2.0.16
+ '@cspell/dict-data-science': 2.0.17
'@cspell/dict-django': 4.1.7
'@cspell/dict-docker': 1.1.17
'@cspell/dict-dotnet': 5.0.15
'@cspell/dict-elixir': 4.0.8
- '@cspell/dict-en-common-misspellings': 2.2.5
+ '@cspell/dict-en-common-misspellings': 2.2.6
'@cspell/dict-en-gb-mit': 3.1.32
'@cspell/dict-en_us': 4.4.43
'@cspell/dict-filetypes': 3.0.18
@@ -556,17 +560,17 @@ snapshots:
'@cspell/dict-markdown': 2.0.18(@cspell/dict-css@4.1.2)(@cspell/dict-html-symbol-entities@4.0.5)(@cspell/dict-html@4.0.16)(@cspell/dict-typescript@3.2.3)
'@cspell/dict-monkeyc': 1.1.2
'@cspell/dict-node': 5.0.9
- '@cspell/dict-npm': 5.2.55
+ '@cspell/dict-npm': 5.2.56
'@cspell/dict-php': 4.1.3
'@cspell/dict-powershell': 5.0.17
'@cspell/dict-public-licenses': 2.0.17
- '@cspell/dict-python': 4.5.2
+ '@cspell/dict-python': 4.5.3
'@cspell/dict-r': 2.1.1
'@cspell/dict-ruby': 5.1.4
'@cspell/dict-rust': 4.1.2
'@cspell/dict-scala': 5.0.11
'@cspell/dict-shell': 1.2.0
- '@cspell/dict-software-terms': 5.4.8
+ '@cspell/dict-software-terms': 5.4.9
'@cspell/dict-sql': 2.2.1
'@cspell/dict-svelte': 1.0.7
'@cspell/dict-swift': 2.0.6
@@ -575,27 +579,27 @@ snapshots:
'@cspell/dict-vue': 3.0.5
'@cspell/dict-zig': 1.0.0
- '@cspell/cspell-json-reporter@10.4.0':
+ '@cspell/cspell-json-reporter@10.4.1':
dependencies:
- '@cspell/cspell-types': 10.4.0
+ '@cspell/cspell-types': 10.4.1
- '@cspell/cspell-performance-monitor@10.4.0': {}
+ '@cspell/cspell-performance-monitor@10.4.1': {}
- '@cspell/cspell-pipe@10.4.0': {}
+ '@cspell/cspell-pipe@10.4.1': {}
- '@cspell/cspell-resolver@10.4.0':
+ '@cspell/cspell-resolver@10.4.1':
dependencies:
global-directory: 5.0.0
- '@cspell/cspell-service-bus@10.4.0': {}
+ '@cspell/cspell-service-bus@10.4.1': {}
- '@cspell/cspell-types@10.4.0': {}
+ '@cspell/cspell-types@10.4.1': {}
'@cspell/cspell-types@8.19.4': {}
- '@cspell/cspell-worker@10.4.0':
+ '@cspell/cspell-worker@10.4.1':
dependencies:
- cspell-lib: 10.4.0
+ cspell-lib: 10.4.1
'@cspell/dict-ada@4.1.1': {}
@@ -607,7 +611,7 @@ snapshots:
dependencies:
'@cspell/dict-shell': 1.2.0
- '@cspell/dict-companies@3.2.13': {}
+ '@cspell/dict-companies@3.2.14': {}
'@cspell/dict-cpp@7.2.0': {}
@@ -619,7 +623,7 @@ snapshots:
'@cspell/dict-dart@2.3.2': {}
- '@cspell/dict-data-science@2.0.16': {}
+ '@cspell/dict-data-science@2.0.17': {}
'@cspell/dict-django@4.1.7': {}
@@ -629,7 +633,7 @@ snapshots:
'@cspell/dict-elixir@4.0.8': {}
- '@cspell/dict-en-common-misspellings@2.2.5': {}
+ '@cspell/dict-en-common-misspellings@2.2.6': {}
'@cspell/dict-en-gb-mit@3.1.32': {}
@@ -686,7 +690,7 @@ snapshots:
'@cspell/dict-node@5.0.9': {}
- '@cspell/dict-npm@5.2.55': {}
+ '@cspell/dict-npm@5.2.56': {}
'@cspell/dict-php@4.1.3': {}
@@ -694,9 +698,9 @@ snapshots:
'@cspell/dict-public-licenses@2.0.17': {}
- '@cspell/dict-python@4.5.2':
+ '@cspell/dict-python@4.5.3':
dependencies:
- '@cspell/dict-data-science': 2.0.16
+ '@cspell/dict-data-science': 2.0.17
'@cspell/dict-r@2.1.1': {}
@@ -708,7 +712,7 @@ snapshots:
'@cspell/dict-shell@1.2.0': {}
- '@cspell/dict-software-terms@5.4.8': {}
+ '@cspell/dict-software-terms@5.4.9': {}
'@cspell/dict-sql@2.2.1': {}
@@ -724,18 +728,18 @@ snapshots:
'@cspell/dict-zig@1.0.0': {}
- '@cspell/dynamic-import@10.4.0':
+ '@cspell/dynamic-import@10.4.1':
dependencies:
- '@cspell/url': 10.4.0
+ '@cspell/url': 10.4.1
import-meta-resolve: 4.2.0
- '@cspell/filetypes@10.4.0': {}
+ '@cspell/filetypes@10.4.1': {}
- '@cspell/rpc@10.4.0': {}
+ '@cspell/rpc@10.4.1': {}
- '@cspell/strong-weak-map@10.4.0': {}
+ '@cspell/strong-weak-map@10.4.1': {}
- '@cspell/url@10.4.0': {}
+ '@cspell/url@10.4.1': {}
'@docspring/cspell-lockfile-dicts@1.2.0':
dependencies:
@@ -746,6 +750,8 @@ snapshots:
'@isaacs/nonrecursive-glob-match@1.0.3': {}
+ '@streetsidesoftware/unindent@1.0.1': {}
+
ansi-regex@6.5.0: {}
array-timsort@1.0.3: {}
@@ -773,60 +779,60 @@ snapshots:
array-timsort: 1.0.3
esprima: 4.0.1
- cspell-config-lib@10.4.0:
+ cspell-config-lib@10.4.1:
dependencies:
- '@cspell/cspell-types': 10.4.0
+ '@cspell/cspell-types': 10.4.1
comment-json: 5.0.0
smol-toml: 1.9.1
yaml: 2.9.1
- cspell-dictionary@10.4.0:
+ cspell-dictionary@10.4.1:
dependencies:
- '@cspell/cspell-performance-monitor': 10.4.0
- '@cspell/cspell-pipe': 10.4.0
- '@cspell/cspell-types': 10.4.0
- cspell-trie-lib: 10.4.0(@cspell/cspell-types@10.4.0)
- fast-equals: 6.2.1
+ '@cspell/cspell-performance-monitor': 10.4.1
+ '@cspell/cspell-pipe': 10.4.1
+ '@cspell/cspell-types': 10.4.1
+ cspell-trie-lib: 10.4.1(@cspell/cspell-types@10.4.1)
+ fast-equals: 6.2.2
- cspell-gitignore@10.4.0:
+ cspell-gitignore@10.4.1:
dependencies:
- '@cspell/url': 10.4.0
- cspell-glob: 10.4.0
- cspell-io: 10.4.0
+ '@cspell/url': 10.4.1
+ cspell-glob: 10.4.1
+ cspell-io: 10.4.1
- cspell-glob@10.4.0:
+ cspell-glob@10.4.1:
dependencies:
- '@cspell/url': 10.4.0
+ '@cspell/url': 10.4.1
picomatch: 4.0.7
- cspell-grammar@10.4.0:
+ cspell-grammar@10.4.1:
dependencies:
- '@cspell/cspell-pipe': 10.4.0
- '@cspell/cspell-types': 10.4.0
+ '@cspell/cspell-pipe': 10.4.1
+ '@cspell/cspell-types': 10.4.1
- cspell-io@10.4.0:
+ cspell-io@10.4.1:
dependencies:
- '@cspell/cspell-service-bus': 10.4.0
- '@cspell/url': 10.4.0
+ '@cspell/cspell-service-bus': 10.4.1
+ '@cspell/url': 10.4.1
- cspell-lib@10.4.0:
+ cspell-lib@10.4.1:
dependencies:
- '@cspell/cspell-bundled-dicts': 10.4.0
- '@cspell/cspell-performance-monitor': 10.4.0
- '@cspell/cspell-pipe': 10.4.0
- '@cspell/cspell-resolver': 10.4.0
- '@cspell/cspell-types': 10.4.0
- '@cspell/dynamic-import': 10.4.0
- '@cspell/filetypes': 10.4.0
- '@cspell/rpc': 10.4.0
- '@cspell/strong-weak-map': 10.4.0
- '@cspell/url': 10.4.0
- cspell-config-lib: 10.4.0
- cspell-dictionary: 10.4.0
- cspell-glob: 10.4.0
- cspell-grammar: 10.4.0
- cspell-io: 10.4.0
- cspell-trie-lib: 10.4.0(@cspell/cspell-types@10.4.0)
+ '@cspell/cspell-bundled-dicts': 10.4.1
+ '@cspell/cspell-performance-monitor': 10.4.1
+ '@cspell/cspell-pipe': 10.4.1
+ '@cspell/cspell-resolver': 10.4.1
+ '@cspell/cspell-types': 10.4.1
+ '@cspell/dynamic-import': 10.4.1
+ '@cspell/filetypes': 10.4.1
+ '@cspell/rpc': 10.4.1
+ '@cspell/strong-weak-map': 10.4.1
+ '@cspell/url': 10.4.1
+ cspell-config-lib: 10.4.1
+ cspell-dictionary: 10.4.1
+ cspell-glob: 10.4.1
+ cspell-grammar: 10.4.1
+ cspell-io: 10.4.1
+ cspell-trie-lib: 10.4.1(@cspell/cspell-types@10.4.1)
env-paths: 4.0.0
gensequence: 8.0.8
import-fresh: 4.0.1
@@ -835,31 +841,32 @@ snapshots:
vscode-uri: 3.2.0
xdg-basedir: 5.1.0
- cspell-trie-lib@10.4.0(@cspell/cspell-types@10.4.0):
+ cspell-trie-lib@10.4.1(@cspell/cspell-types@10.4.1):
dependencies:
- '@cspell/cspell-types': 10.4.0
+ '@cspell/cspell-types': 10.4.1
- cspell@10.4.0:
+ cspell@10.4.1:
dependencies:
- '@cspell/cspell-json-reporter': 10.4.0
- '@cspell/cspell-performance-monitor': 10.4.0
- '@cspell/cspell-pipe': 10.4.0
- '@cspell/cspell-types': 10.4.0
- '@cspell/cspell-worker': 10.4.0
- '@cspell/dynamic-import': 10.4.0
- '@cspell/url': 10.4.0
+ '@cspell/cspell-json-reporter': 10.4.1
+ '@cspell/cspell-performance-monitor': 10.4.1
+ '@cspell/cspell-pipe': 10.4.1
+ '@cspell/cspell-types': 10.4.1
+ '@cspell/cspell-worker': 10.4.1
+ '@cspell/dynamic-import': 10.4.1
+ '@cspell/url': 10.4.1
+ '@streetsidesoftware/unindent': 1.0.1
ansi-regex: 6.5.0
chalk: 6.0.1
chalk-template: 1.1.3
commander: 15.0.0
- cspell-config-lib: 10.4.0
- cspell-dictionary: 10.4.0
- cspell-gitignore: 10.4.0
- cspell-glob: 10.4.0
- cspell-io: 10.4.0
- cspell-lib: 10.4.0
+ cspell-config-lib: 10.4.1
+ cspell-dictionary: 10.4.1
+ cspell-gitignore: 10.4.1
+ cspell-glob: 10.4.1
+ cspell-io: 10.4.1
+ cspell-lib: 10.4.1
flatted: 3.4.4
- semver: 7.8.5
+ semver: 7.8.6
tinyglobby: 0.2.17
env-paths@4.0.0:
@@ -868,7 +875,7 @@ snapshots:
esprima@4.0.1: {}
- fast-equals@6.2.1: {}
+ fast-equals@6.2.2: {}
fdir@6.5.0(picomatch@4.0.7):
optionalDependencies:
@@ -951,7 +958,7 @@ snapshots:
resolve-from@5.0.0: {}
- semver@7.8.5: {}
+ semver@7.8.6: {}
smol-toml@1.9.1: {}
diff --git a/sorbet/rbi/annotations/minitest.rbi b/sorbet/rbi/annotations/minitest.rbi
index a7059f0..6404733 100644
--- a/sorbet/rbi/annotations/minitest.rbi
+++ b/sorbet/rbi/annotations/minitest.rbi
@@ -60,10 +60,6 @@ module Minitest::Assertions
sig { params(exp: T.anything, act: T.anything, msg: T.anything).returns(TrueClass) }
def assert_same(exp, act, msg = nil); end
- # @version < 6.0.0
- sig { params(send_ary: T::Array[T.anything], m: T.anything).returns(T::Boolean) }
- def assert_send(send_ary, m = nil); end
-
sig { params(block: T.proc.void).returns(T::Boolean) }
def assert_silent(&block); end
diff --git a/sorbet/rbi/gems/actionpack@8.1.4.1.rbi b/sorbet/rbi/gems/actionpack@8.1.4.1.rbi
index d43b049..4ecae56 100644
--- a/sorbet/rbi/gems/actionpack@8.1.4.1.rbi
+++ b/sorbet/rbi/gems/actionpack@8.1.4.1.rbi
@@ -19891,24 +19891,6 @@ class ActionDispatch::Session::CookieStore::SessionId
def cookie_value; end
end
-# # Action Dispatch Session MemCacheStore
-#
-# A session store that uses MemCache to implement storage.
-#
-# #### Options
-# * `expire_after` - The length of time a session will be stored before
-# automatically expiring.
-#
-# pkg:gem/actionpack#lib/action_dispatch/middleware/session/mem_cache_store.rb:23
-class ActionDispatch::Session::MemCacheStore < ::Rack::Session::Dalli
- include ::ActionDispatch::Session::Compatibility
- include ::ActionDispatch::Session::StaleSessionCheck
- include ::ActionDispatch::Session::SessionObject
-
- # pkg:gem/actionpack#lib/action_dispatch/middleware/session/mem_cache_store.rb:28
- def initialize(app, options = T.unsafe(nil)); end
-end
-
# pkg:gem/actionpack#lib/action_dispatch/middleware/session/abstract_store.rb:76
module ActionDispatch::Session::SessionObject
# pkg:gem/actionpack#lib/action_dispatch/middleware/session/abstract_store.rb:77
diff --git a/sorbet/rbi/gems/activesupport@8.1.4.1.rbi b/sorbet/rbi/gems/activesupport@8.1.4.1.rbi
index 3d03290..f450298 100644
--- a/sorbet/rbi/gems/activesupport@8.1.4.1.rbi
+++ b/sorbet/rbi/gems/activesupport@8.1.4.1.rbi
@@ -1138,173 +1138,6 @@ ActiveSupport::Cache::FileStore::FILEPATH_MAX_SIZE = T.let(T.unsafe(nil), Intege
# pkg:gem/activesupport#lib/active_support/cache/file_store.rb:19
ActiveSupport::Cache::FileStore::GITKEEP_FILES = T.let(T.unsafe(nil), Array)
-# = Memcached \Cache \Store
-#
-# A cache store implementation which stores data in Memcached:
-# https://memcached.org
-#
-# This is currently the most popular cache store for production websites.
-#
-# Special features:
-# - Clustering and load balancing. One can specify multiple memcached servers,
-# and +MemCacheStore+ will load balance between all available servers. If a
-# server goes down, then +MemCacheStore+ will ignore it until it comes back up.
-#
-# +MemCacheStore+ implements the Strategy::LocalCache strategy which
-# implements an in-memory cache inside of a block.
-#
-# pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:32
-class ActiveSupport::Cache::MemCacheStore < ::ActiveSupport::Cache::Store
- include ::ActiveSupport::Cache::Strategy::LocalCache
-
- # Creates a new +MemCacheStore+ object, with the given memcached server
- # addresses. Each address is either a host name, or a host-with-port string
- # in the form of "host_name:port". For example:
- #
- # ActiveSupport::Cache::MemCacheStore.new("localhost", "server-downstairs.localnetwork:8229")
- #
- # If no addresses are provided, but ENV['MEMCACHE_SERVERS'] is defined, it will be used instead. Otherwise,
- # +MemCacheStore+ will connect to localhost:11211 (the default memcached port).
- #
- # pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:76
- def initialize(*addresses); end
-
- # Clear the entire cache on all memcached servers. This method should
- # be used with care when shared cache is being used.
- #
- # pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:181
- def clear(options = T.unsafe(nil)); end
-
- # Decrement a cached integer value using the memcached decr atomic operator.
- # Returns the updated value.
- #
- # If the key is unset or has expired, it will be set to 0. Memcached
- # does not support negative counters.
- #
- # cache.decrement("foo") # => 0
- #
- # To set a specific value, call #write passing raw: true:
- #
- # cache.write("baz", 5, raw: true)
- # cache.decrement("baz") # => 4
- #
- # Decrementing a non-numeric value, or a value written without
- # raw: true, will fail and return +nil+.
- #
- # To read the value later, call #read_counter:
- #
- # cache.decrement("baz") # => 3
- # cache.read_counter("baz") # 3
- #
- # pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:168
- def decrement(name, amount = T.unsafe(nil), **options); end
-
- # Increment a cached integer value using the memcached incr atomic operator.
- # Returns the updated value.
- #
- # If the key is unset or has expired, it will be set to +amount+:
- #
- # cache.increment("foo") # => 1
- # cache.increment("bar", 100) # => 100
- #
- # To set a specific value, call #write passing raw: true:
- #
- # cache.write("baz", 5, raw: true)
- # cache.increment("baz") # => 6
- #
- # Incrementing a non-numeric value, or a value written without
- # raw: true, will fail and return +nil+.
- #
- # To read the value later, call #read_counter:
- #
- # cache.increment("baz") # => 7
- # cache.read_counter("baz") # 7
- #
- # pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:137
- def increment(name, amount = T.unsafe(nil), **options); end
-
- # pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:99
- def inspect; end
-
- # Get the statistics from the memcached servers.
- #
- # pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:186
- def stats; end
-
- private
-
- # Delete an entry from the cache.
- #
- # pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:246
- def delete_entry(key, **); end
-
- # pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:270
- def deserialize_entry(payload, raw: T.unsafe(nil), **); end
-
- # Memcache keys are binaries. So we need to force their encoding to binary
- # before applying the regular expression to ensure we are escaping all
- # characters properly.
- #
- # pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:261
- def normalize_key(key, options); end
-
- # Read an entry from the cache.
- #
- # pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:192
- def read_entry(key, **options); end
-
- # Reads multiple entries from the cache implementation.
- #
- # pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:222
- def read_multi_entries(names, **options); end
-
- # pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:196
- def read_serialized_entry(key, raw: T.unsafe(nil), **options); end
-
- # pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:278
- def rescue_error_with(fallback); end
-
- # pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:250
- def serialize_entry(entry, raw: T.unsafe(nil), **options); end
-
- # Write an entry to the cache.
- #
- # pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:203
- def write_entry(key, entry, **options); end
-
- # pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:207
- def write_serialized_entry(key, payload, **); end
-
- class << self
- # Creates a new Dalli::Client instance with specified addresses and options.
- # If no addresses are provided, we give nil to Dalli::Client, so it uses its fallbacks:
- # - ENV["MEMCACHE_SERVERS"] (if defined)
- # - "127.0.0.1:11211" (otherwise)
- #
- # ActiveSupport::Cache::MemCacheStore.build_mem_cache
- # # => #
- # ActiveSupport::Cache::MemCacheStore.build_mem_cache('localhost:10290')
- # # => #
- #
- # pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:55
- def build_mem_cache(*addresses); end
-
- # Advertise cache versioning support.
- #
- # pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:38
- def supports_cache_versioning?; end
- end
-end
-
-# pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:44
-ActiveSupport::Cache::MemCacheStore::ESCAPE_KEY_CHARS = T.let(T.unsafe(nil), Regexp)
-
-# These options represent behavior overridden by this implementation and should
-# not be allowed to get down to the Dalli client
-#
-# pkg:gem/activesupport#lib/active_support/cache/mem_cache_store.rb:35
-ActiveSupport::Cache::MemCacheStore::OVERRIDDEN_OPTIONS = T.let(T.unsafe(nil), Array)
-
# = Memory \Cache \Store
#
# A cache store implementation which stores everything into memory in the
@@ -12883,7 +12716,7 @@ class ActiveSupport::TestCase < ::Minitest::Test
def assert_not_in_epsilon(exp, act, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end
# pkg:gem/activesupport#lib/active_support/test_case.rb:269
- def assert_not_includes(collection, obj, msg = T.unsafe(nil)); end
+ def assert_not_includes(obj, sub, msg = T.unsafe(nil)); end
# pkg:gem/activesupport#lib/active_support/test_case.rb:280
def assert_not_instance_of(cls, obj, msg = T.unsafe(nil)); end
@@ -13056,6 +12889,11 @@ class ActiveSupport::TestCase < ::Minitest::Test
# pkg:gem/activesupport#lib/active_support/test_case.rb:172
def parallelize_teardown(&block); end
+ # MT6 API change
+ #
+ # pkg:gem/activesupport#lib/active_support/test_case.rb:66
+ def run_order; end
+
# Returns the order in which test cases are run.
#
# ActiveSupport::TestCase.test_order # => :random
@@ -19679,7 +19517,7 @@ end
module Process
extend ::ConnectionPool::ForkTracker
extend ::RedisClient::PIDCache::CoreExt
- extend ::Dalli::PIDCache::CoreExt
+ extend ::SemanticLogger::CoreExt::Process
extend ::ActiveSupport::ForkTracker::CoreExt
class << self
diff --git a/sorbet/rbi/gems/connection_pool@3.0.2.rbi b/sorbet/rbi/gems/connection_pool@3.0.2.rbi
index e556389..0e13178 100644
--- a/sorbet/rbi/gems/connection_pool@3.0.2.rbi
+++ b/sorbet/rbi/gems/connection_pool@3.0.2.rbi
@@ -337,6 +337,6 @@ ConnectionPool::Wrapper::METHODS = T.let(T.unsafe(nil), Array)
module Process
extend ::ConnectionPool::ForkTracker
extend ::RedisClient::PIDCache::CoreExt
- extend ::Dalli::PIDCache::CoreExt
+ extend ::SemanticLogger::CoreExt::Process
extend ::ActiveSupport::ForkTracker::CoreExt
end
diff --git a/sorbet/rbi/gems/dalli@3.2.15.rbi b/sorbet/rbi/gems/dalli@3.2.15.rbi
deleted file mode 100644
index a14209a..0000000
--- a/sorbet/rbi/gems/dalli@3.2.15.rbi
+++ /dev/null
@@ -1,2511 +0,0 @@
-# typed: true
-
-# DO NOT EDIT MANUALLY
-# This is an autogenerated file for types exported from the `dalli` gem.
-# Please instead update this file by running `bin/tapioca gem dalli`.
-
-
-# Namespace for all Dalli code.
-#
-# pkg:gem/dalli#lib/dalli.rb:6
-module Dalli
- class << self
- # pkg:gem/dalli#lib/dalli.rb:45
- def default_logger; end
-
- # pkg:gem/dalli#lib/dalli.rb:36
- def logger; end
-
- # pkg:gem/dalli#lib/dalli.rb:52
- def logger=(logger); end
-
- # pkg:gem/dalli#lib/dalli.rb:40
- def rails_logger; end
- end
-end
-
-# Dalli::Client is the main class which developers will use to interact with
-# Memcached.
-#
-# pkg:gem/dalli#lib/dalli/client.rb:12
-class Dalli::Client
- # Dalli::Client is the main class which developers will use to interact with
- # the memcached server. Usage:
- #
- # Dalli::Client.new(['localhost:11211:10',
- # 'cache-2.example.com:11211:5',
- # '192.168.0.1:22122:5',
- # '/var/run/memcached/socket'],
- # failover: true, expires_in: 300)
- #
- # servers is an Array of "host:port:weight" where weight allows you to distribute cache unevenly.
- # Both weight and port are optional. If you pass in nil, Dalli will use the MEMCACHE_SERVERS
- # environment variable or default to 'localhost:11211' if it is not present. Dalli also supports
- # the ability to connect to Memcached on localhost through a UNIX socket. To use this functionality,
- # use a full pathname (beginning with a slash character '/') in place of the "host:port" pair in
- # the server configuration.
- #
- # Options:
- # - :namespace - prepend each key with this value to provide simple namespacing.
- # - :failover - if a server is down, look for and store values on another server in the ring. Default: true.
- # - :threadsafe - ensure that only one thread is actively using a socket at a time. Default: true.
- # - :expires_in - default TTL in seconds if you do not pass TTL as a parameter to an individual operation, defaults
- # to 0 or forever.
- # - :compress - if true Dalli will compress values larger than compression_min_size bytes before sending them
- # to memcached. Default: true.
- # - :compression_min_size - the minimum size (in bytes) for which Dalli will compress values sent to Memcached.
- # Defaults to 4K.
- # - :serializer - defaults to Marshal
- # - :compressor - defaults to Dalli::Compressor, a Zlib-based implementation
- # - :cache_nils - defaults to false, if true Dalli will not treat cached nil values as 'not found' for
- # #fetch operations.
- # - :digest_class - defaults to Digest::MD5, allows you to pass in an object that responds to the hexdigest method,
- # useful for injecting a FIPS compliant hash object.
- # - :protocol - one of either :binary or :meta, defaulting to :binary. This sets the protocol that Dalli uses
- # to communicate with memcached.
- # - :verify_reply_keys - defaults to false. When true, get_multi only accepts replies for the keys it requested;
- # after a reply naming another key, the rest of that server's replies are treated as misses.
- # With the meta protocol, memcached can name an item by its raw key bytes when the item was
- # created by auto-create from a base64-encoded key, which Dalli no longer does. Costs a
- # multi-get about 15%.
- #
- # pkg:gem/dalli#lib/dalli/client.rb:54
- def initialize(servers = T.unsafe(nil), options = T.unsafe(nil)); end
-
- # Conditionally add a key/value pair, if the key does not already exist
- # on the server. Returns truthy if the operation succeeded.
- #
- # pkg:gem/dalli#lib/dalli/client.rb:224
- def add(key, value, ttl = T.unsafe(nil), req_options = T.unsafe(nil)); end
-
- # Make sure memcache servers are alive, or raise an Dalli::RingError
- #
- # pkg:gem/dalli#lib/dalli/client.rb:358
- def alive!; end
-
- # Append value to the value already stored on the server for 'key'.
- # Appending only works for values stored with :raw => true.
- #
- # pkg:gem/dalli#lib/dalli/client.rb:256
- def append(key, value); end
-
- # pkg:gem/dalli#lib/dalli/client.rb:377
- def cache_nils; end
-
- # compare and swap values using optimistic locking.
- # Fetch the existing value for key.
- # If it exists, yield the value to the block.
- # Add the block's return value as the new value for the key.
- # Add will fail if someone else changed the value.
- #
- # Returns:
- # - nil if the key did not exist.
- # - false if the value was changed by someone else.
- # - true if the value was successfully updated.
- #
- # pkg:gem/dalli#lib/dalli/client.rb:163
- def cas(key, ttl = T.unsafe(nil), req_options = T.unsafe(nil), &block); end
-
- # like #cas, but will yield to the block whether or not the value
- # already exists.
- #
- # Returns:
- # - false if the value was changed by someone else.
- # - true if the value was successfully updated.
- #
- # pkg:gem/dalli#lib/dalli/client.rb:174
- def cas!(key, ttl = T.unsafe(nil), req_options = T.unsafe(nil), &block); end
-
- # Close our connection to each server.
- # If you perform another operation after this, the connections will be re-established.
- #
- # pkg:gem/dalli#lib/dalli/client.rb:365
- def close; end
-
- # Decr subtracts the given amount from the counter on the memcached server.
- # Amt must be a positive integer value.
- # Default, if given, must be an Integer (or a String of decimal digits);
- # anything else raises ArgumentError.
- #
- # memcached counters are unsigned and cannot hold negative values. Calling
- # decr on a counter which is 0 will just return 0.
- #
- # If default is nil, the counter must already exist or the operation
- # will fail and will return nil. Otherwise this method will return
- # the new value for the counter.
- #
- # Note that the ttl will only apply if the counter does not already
- # exist. To decrease an existing counter and update its TTL, use
- # #cas.
- #
- # If the value already exists, it must have been set with raw: true
- #
- # pkg:gem/dalli#lib/dalli/client.rb:307
- def decr(key, amt = T.unsafe(nil), ttl = T.unsafe(nil), default = T.unsafe(nil)); end
-
- # pkg:gem/dalli#lib/dalli/client.rb:249
- def delete(key); end
-
- # Delete a key/value pair, verifying existing CAS.
- # Returns true if succeeded, and falsy otherwise.
- #
- # pkg:gem/dalli#lib/dalli/client.rb:245
- def delete_cas(key, cas = T.unsafe(nil)); end
-
- # Fetch the value associated with the key.
- # If a value is found, then it is returned.
- #
- # If a value is not found and no block is given, then nil is returned.
- #
- # If a value is not found (or if the found value is nil and :cache_nils is false)
- # and a block is given, the block will be invoked and its return value
- # written to the cache and returned.
- #
- # pkg:gem/dalli#lib/dalli/client.rb:142
- def fetch(key, ttl = T.unsafe(nil), req_options = T.unsafe(nil)); end
-
- # Flush the memcached server, at 'delay' seconds in the future.
- # Delay defaults to zero seconds, which means an immediate flush.
- #
- # pkg:gem/dalli#lib/dalli/client.rb:318
- def flush(delay = T.unsafe(nil)); end
-
- # pkg:gem/dalli#lib/dalli/client.rb:321
- def flush_all(delay = T.unsafe(nil)); end
-
- # Gat (get and touch) fetch an item and simultaneously update its expiration time.
- #
- # If a value is not found, then +nil+ is returned.
- #
- # pkg:gem/dalli#lib/dalli/client.rb:76
- def gat(key, ttl = T.unsafe(nil)); end
-
- # Get the value associated with the key.
- # If a value is not found, then +nil+ is returned.
- #
- # pkg:gem/dalli#lib/dalli/client.rb:68
- def get(key, req_options = T.unsafe(nil)); end
-
- # Get the value and CAS ID associated with the key. If a block is provided,
- # value and CAS will be passed to the block.
- #
- # pkg:gem/dalli#lib/dalli/client.rb:92
- def get_cas(key); end
-
- # Fetch multiple keys efficiently.
- # If a block is given, yields key/value pairs one at a time.
- # Otherwise returns a hash of { 'key' => 'value', 'key2' => 'value1' }
- #
- # pkg:gem/dalli#lib/dalli/client.rb:103
- def get_multi(*keys); end
-
- # Fetch multiple keys efficiently, including available metadata such as CAS.
- # If a block is given, yields key/data pairs one a time. Data is an array:
- # [value, cas_id]
- # If no block is given, returns a hash of
- # { 'key' => [value, cas_id] }
- #
- # pkg:gem/dalli#lib/dalli/client.rb:124
- def get_multi_cas(*keys); end
-
- # Incr adds the given amount to the counter on the memcached server.
- # Amt must be a positive integer value.
- # Default, if given, must be an Integer (or a String of decimal digits);
- # anything else raises ArgumentError.
- #
- # If default is nil, the counter must already exist or the operation
- # will fail and will return nil. Otherwise this method will return
- # the new value for the counter.
- #
- # Note that the ttl will only apply if the counter does not already
- # exist. To increase an existing counter and update its TTL, use
- # #cas.
- #
- # If the value already exists, it must have been set with raw: true
- #
- # pkg:gem/dalli#lib/dalli/client.rb:282
- def incr(key, amt = T.unsafe(nil), ttl = T.unsafe(nil), default = T.unsafe(nil)); end
-
- # pkg:gem/dalli#lib/dalli/client.rb:208
- def multi; end
-
- # pkg:gem/dalli#lib/dalli/client.rb:373
- def not_found?(val); end
-
- # Prepend value to the value already stored on the server for 'key'.
- # Prepending only works for values stored with :raw => true.
- #
- # pkg:gem/dalli#lib/dalli/client.rb:263
- def prepend(key, value); end
-
- # Turn on quiet aka noreply support for a number of
- # memcached operations.
- #
- # All relevant operations within this block will be effectively
- # pipelined as Dalli will use 'quiet' versions. The invoked methods
- # will all return nil, rather than their usual response. Method
- # latency will be substantially lower, as the caller will not be
- # blocking on responses.
- #
- # Currently supports storage (set, add, replace, append, prepend),
- # arithmetic (incr, decr), flush and delete operations. Use of
- # unsupported operations inside a block will raise an error.
- #
- # Any error replies will be discarded at the end of the block, and
- # Dalli client methods invoked inside the block will not
- # have return values
- #
- # The block is quiet only for the thread or fiber that runs it. Another
- # thread or fiber sharing this client can make requests meanwhile; a
- # non-quiet one first reads the block's pending replies with a noop and
- # discards them, so it reads only its own.
- #
- # pkg:gem/dalli#lib/dalli/client.rb:200
- def quiet; end
-
- # Conditionally add a key/value pair, only if the key already exists
- # on the server. Returns truthy if the operation succeeded.
- #
- # pkg:gem/dalli#lib/dalli/client.rb:231
- def replace(key, value, ttl = T.unsafe(nil), req_options = T.unsafe(nil)); end
-
- # Conditionally add a key/value pair, verifying existing CAS, only if the
- # key already exists on the server. Returns the new CAS value if the
- # operation succeeded, or falsy otherwise.
- #
- # pkg:gem/dalli#lib/dalli/client.rb:239
- def replace_cas(key, value, cas, ttl = T.unsafe(nil), req_options = T.unsafe(nil)); end
-
- # pkg:gem/dalli#lib/dalli/client.rb:369
- def reset; end
-
- # Reset stats for each server.
- #
- # pkg:gem/dalli#lib/dalli/client.rb:340
- def reset_stats; end
-
- # pkg:gem/dalli#lib/dalli/client.rb:210
- def set(key, value, ttl = T.unsafe(nil), req_options = T.unsafe(nil)); end
-
- # Set the key-value pair, verifying existing CAS.
- # Returns the resulting CAS value if succeeded, and falsy otherwise.
- #
- # pkg:gem/dalli#lib/dalli/client.rb:217
- def set_cas(key, value, cas, ttl = T.unsafe(nil), req_options = T.unsafe(nil)); end
-
- # Collect the stats for each server.
- # You can optionally pass a type including :items, :slabs or :settings to get specific stats
- # Returns a hash like { 'hostname:port' => { 'stat1' => 'value1', ... }, 'hostname2:port' => { ... } }
- #
- # pkg:gem/dalli#lib/dalli/client.rb:329
- def stats(type = T.unsafe(nil)); end
-
- # Touch updates expiration time for a given key.
- #
- # Returns true if key exists, otherwise nil.
- #
- # pkg:gem/dalli#lib/dalli/client.rb:84
- def touch(key, ttl = T.unsafe(nil)); end
-
- # Version of the memcache servers.
- #
- # pkg:gem/dalli#lib/dalli/client.rb:348
- def version; end
-
- # Stub method so a bare Dalli client can pretend to be a connection pool.
- #
- # pkg:gem/dalli#lib/dalli/client.rb:382
- def with; end
-
- private
-
- # pkg:gem/dalli#lib/dalli/client.rb:400
- def cas_core(key, always_set, ttl = T.unsafe(nil), req_options = T.unsafe(nil)); end
-
- # pkg:gem/dalli#lib/dalli/client.rb:388
- def check_positive!(amt); end
-
- # pkg:gem/dalli#lib/dalli/client.rb:458
- def normalize_options(opts); end
-
- # Chokepoint method for memcached methods with a key argument.
- # Validates the key, resolves the key to the appropriate server
- # instance, and invokes the memcached method on the appropriate
- # server.
- #
- # This method also forces retries on network errors - when
- # a particular memcached instance becomes unreachable, or the
- # operational times out.
- #
- # pkg:gem/dalli#lib/dalli/client.rb:442
- def perform(*all_args); end
-
- # pkg:gem/dalli#lib/dalli/client.rb:465
- def pipelined_getter; end
-
- # pkg:gem/dalli#lib/dalli/client.rb:423
- def protocol_implementation; end
-
- # pkg:gem/dalli#lib/dalli/client.rb:419
- def ring; end
-
- # Uses the argument TTL or the client-wide default. Ensures
- # that the value is an integer
- #
- # pkg:gem/dalli#lib/dalli/client.rb:413
- def ttl_or_default(ttl); end
-
- # Numeric arguments that become meta protocol flags (GHSA-6wmv-xq9m-fmp7).
- # Checked before the request starts so a bad value raises a clean
- # ArgumentError, instead of Protocol::Base#request logging it as
- # unexpected and closing the connection.
- #
- # pkg:gem/dalli#lib/dalli/client.rb:396
- def validate_integer!(name, value); end
-end
-
-# pkg:gem/dalli#lib/dalli/client.rb:323
-Dalli::Client::ALLOWED_STAT_KEYS = T.let(T.unsafe(nil), Array)
-
-# pkg:gem/dalli#lib/dalli/client.rb:371
-Dalli::Client::CACHE_NILS = T.let(T.unsafe(nil), Hash)
-
-# Default compressor used by Dalli, that uses
-# Zlib DEFLATE to compress data.
-#
-# pkg:gem/dalli#lib/dalli/compressor.rb:11
-class Dalli::Compressor
- class << self
- # pkg:gem/dalli#lib/dalli/compressor.rb:59
- def append_within_limit(out, chunk, max_bytes); end
-
- # pkg:gem/dalli#lib/dalli/compressor.rb:12
- def compress(data); end
-
- # max_bytes caps the decompressed size; inflating stops and raises as soon
- # as the output passes it, so a small compressed value can't expand into
- # gigabytes of memory.
- #
- # pkg:gem/dalli#lib/dalli/compressor.rb:26
- def decompress(data, max_bytes: T.unsafe(nil)); end
-
- # Both yielded and returned output count toward the limit
- #
- # pkg:gem/dalli#lib/dalli/compressor.rb:54
- def inflate_slice(inflater, slice, out, max_bytes); end
-
- # pkg:gem/dalli#lib/dalli/compressor.rb:38
- def inflate_within_limit(inflater, data, max_bytes); end
-
- # False when even the largest possible expansion stays within max_bytes,
- # so the value can be inflated in one step
- #
- # pkg:gem/dalli#lib/dalli/compressor.rb:34
- def may_exceed?(data, max_bytes); end
- end
-end
-
-# Compressed input is fed to zlib this many bytes at a time. MRI's zlib
-# yields the output in small chunks; one that returns it instead still
-# produces at most MAX_EXPANSION times this per step.
-#
-# pkg:gem/dalli#lib/dalli/compressor.rb:21
-Dalli::Compressor::INFLATE_SLICE_BYTES = T.let(T.unsafe(nil), Integer)
-
-# DEFLATE can't expand data by more than about 1032:1
-#
-# pkg:gem/dalli#lib/dalli/compressor.rb:17
-Dalli::Compressor::MAX_EXPANSION = T.let(T.unsafe(nil), Integer)
-
-# generic error
-#
-# pkg:gem/dalli#lib/dalli.rb:10
-class Dalli::DalliError < ::RuntimeError; end
-
-# Alternate compressor for Dalli, that uses
-# Gzip. Gzip adds a checksum to each compressed
-# entry.
-#
-# pkg:gem/dalli#lib/dalli/compressor.rb:72
-class Dalli::GzipCompressor
- class << self
- # pkg:gem/dalli#lib/dalli/compressor.rb:73
- def compress(data); end
-
- # pkg:gem/dalli#lib/dalli/compressor.rb:81
- def decompress(data, max_bytes: T.unsafe(nil)); end
- end
-end
-
-# A serializer that stores values as JSON and never creates Ruby objects
-# from what it reads.
-#
-# Passing the JSON module itself as the serializer (serializer: JSON) reads
-# values back with JSON.load, which on json gem versions before 3.0 honors
-# "json_class" and instantiates other classes when the json gem's additions
-# are loaded. This serializer reads with JSON.parse, so a value written to
-# memcached by someone else can only come back as plain hashes, arrays,
-# strings, numbers, booleans and nil.
-#
-# Dalli::Client.new(servers, serializer: Dalli::JSONSerializer)
-#
-# pkg:gem/dalli#lib/dalli/json_serializer.rb:19
-module Dalli::JSONSerializer
- class << self
- # pkg:gem/dalli#lib/dalli/json_serializer.rb:20
- def dump(value); end
-
- # pkg:gem/dalli#lib/dalli/json_serializer.rb:24
- def load(data); end
- end
-end
-
-# This class manages and validates keys sent to Memcached, ensuring
-# that they meet Memcached key length requirements, and supporting
-# the implementation of optional namespaces on a per-Dalli client
-# basis.
-#
-# pkg:gem/dalli#lib/dalli/key_manager.rb:12
-class Dalli::KeyManager
- # pkg:gem/dalli#lib/dalli/key_manager.rb:31
- def initialize(client_options); end
-
- # pkg:gem/dalli#lib/dalli/key_manager.rb:76
- def digest_class; end
-
- # pkg:gem/dalli#lib/dalli/key_manager.rb:100
- def evaluate_namespace; end
-
- # Returns the key with the namespace prefixed, if a namespace is
- # defined. Otherwise just returns the key
- #
- # pkg:gem/dalli#lib/dalli/key_manager.rb:64
- def key_with_namespace(key); end
-
- # pkg:gem/dalli#lib/dalli/key_manager.rb:70
- def key_without_namespace(key); end
-
- # pkg:gem/dalli#lib/dalli/key_manager.rb:29
- def namespace; end
-
- # pkg:gem/dalli#lib/dalli/key_manager.rb:92
- def namespace_from_options; end
-
- # pkg:gem/dalli#lib/dalli/key_manager.rb:80
- def namespace_regexp; end
-
- # pkg:gem/dalli#lib/dalli/key_manager.rb:139
- def prefix_length(digest); end
-
- # Produces a truncated key, if the raw key is longer than the maximum allowed
- # length. The truncated key is produced by generating a hex digest
- # of the key, and appending that to a truncated section of the key.
- #
- # pkg:gem/dalli#lib/dalli/key_manager.rb:111
- def truncated_key(key); end
-
- # pkg:gem/dalli#lib/dalli/key_manager.rb:86
- def validate_digest_class_option(opts); end
-
- # Validates the key, and transforms as needed.
- #
- # If the key is nil or empty, raises ArgumentError. Whitespace
- # characters are allowed for historical reasons, but likely shouldn't
- # be used.
- # If the key (with namespace) is shorter than the memcached maximum
- # allowed key length, just returns the argument key
- # Otherwise computes a "truncated" key that uses a truncated prefix
- # combined with a 32-byte hex digest of the whole key.
- #
- # pkg:gem/dalli#lib/dalli/key_manager.rb:53
- def validate_key(key); end
-
- # memcached's key limit applies to the key as sent: in bytes, and, with
- # the meta protocol, after base64 encoding when the key needs it. A key
- # within the limit in characters can still be too long. With the meta
- # protocol memcached rejects it with a CLIENT_ERROR that must never reach
- # a pipelined get; with the binary protocol it drops the connection.
- #
- # pkg:gem/dalli#lib/dalli/key_manager.rb:132
- def wire_length(key); end
-end
-
-# pkg:gem/dalli#lib/dalli/key_manager.rb:23
-Dalli::KeyManager::DEFAULTS = T.let(T.unsafe(nil), Hash)
-
-# pkg:gem/dalli#lib/dalli/key_manager.rb:13
-Dalli::KeyManager::MAX_KEY_LENGTH = T.let(T.unsafe(nil), Integer)
-
-# pkg:gem/dalli#lib/dalli/key_manager.rb:15
-Dalli::KeyManager::NAMESPACE_SEPARATOR = T.let(T.unsafe(nil), String)
-
-# pkg:gem/dalli#lib/dalli/key_manager.rb:27
-Dalli::KeyManager::OPTIONS = T.let(T.unsafe(nil), Array)
-
-# This is a hard coded md5 for historical reasons
-#
-# pkg:gem/dalli#lib/dalli/key_manager.rb:18
-Dalli::KeyManager::TRUNCATED_KEY_SEPARATOR = T.let(T.unsafe(nil), String)
-
-# This is 249 for historical reasons
-#
-# pkg:gem/dalli#lib/dalli/key_manager.rb:21
-Dalli::KeyManager::TRUNCATED_KEY_TARGET_SIZE = T.let(T.unsafe(nil), Integer)
-
-# pkg:gem/dalli#lib/dalli/version.rb:6
-Dalli::MIN_SUPPORTED_MEMCACHED_VERSION = T.let(T.unsafe(nil), String)
-
-# application error in marshalling serialization
-#
-# pkg:gem/dalli#lib/dalli.rb:19
-class Dalli::MarshalError < ::Dalli::DalliError; end
-
-# pkg:gem/dalli#lib/dalli.rb:32
-Dalli::NOT_FOUND = T.let(T.unsafe(nil), Dalli::NilObject)
-
-# socket/server communication error
-#
-# pkg:gem/dalli#lib/dalli.rb:13
-class Dalli::NetworkError < ::Dalli::DalliError; end
-
-# Implements the NullObject pattern to store an application-defined value for 'Key not found' responses.
-#
-# pkg:gem/dalli#lib/dalli.rb:31
-class Dalli::NilObject; end
-
-# operation is not permitted in a multi block
-#
-# pkg:gem/dalli#lib/dalli.rb:28
-class Dalli::NotPermittedMultiOpError < ::Dalli::DalliError; end
-
-# Dalli::PIDCache is a wrapper class for PID checking to avoid system calls when checking the PID.
-#
-# pkg:gem/dalli#lib/dalli/pid_cache.rb:7
-module Dalli::PIDCache
- class << self
- # pkg:gem/dalli#lib/dalli/pid_cache.rb:13
- def pid; end
-
- # pkg:gem/dalli#lib/dalli/pid_cache.rb:15
- def update!; end
- end
-end
-
-# Dalli::PIDCache::CoreExt hooks into Process to be able to reset the PID cache after fork
-#
-# pkg:gem/dalli#lib/dalli/pid_cache.rb:24
-module Dalli::PIDCache::CoreExt
- # pkg:gem/dalli#lib/dalli/pid_cache.rb:25
- def _fork; end
-end
-
-# Contains logic for the pipelined gets implemented by the client.
-#
-# pkg:gem/dalli#lib/dalli/pipelined_getter.rb:7
-class Dalli::PipelinedGetter
- # pkg:gem/dalli#lib/dalli/pipelined_getter.rb:8
- def initialize(ring, key_manager); end
-
- # Swallows Dalli::NetworkError
- #
- # pkg:gem/dalli#lib/dalli/pipelined_getter.rb:128
- def abort_with_timeout(servers); end
-
- # Swallows Dalli::NetworkError
- #
- # pkg:gem/dalli#lib/dalli/pipelined_getter.rb:91
- def abort_without_timeout(servers); end
-
- # pkg:gem/dalli#lib/dalli/pipelined_getter.rb:95
- def fetch_responses(servers, start_time, timeout, &block); end
-
- # This loops through the servers that have keys in
- # our set, sending the noop to terminate the set of queries.
- #
- # pkg:gem/dalli#lib/dalli/pipelined_getter.rb:59
- def finish_queries(servers); end
-
- # pkg:gem/dalli#lib/dalli/pipelined_getter.rb:80
- def finish_query_for_server(server); end
-
- # pkg:gem/dalli#lib/dalli/pipelined_getter.rb:164
- def groups_for_keys(*keys); end
-
- # Loop through the server-grouped sets of keys, writing
- # the corresponding getkq requests to the appropriate servers
- #
- # It's worth noting that we could potentially reduce bytes
- # on the wire by switching from getkq to getq, and using
- # the opaque value to match requests to responses.
- #
- # pkg:gem/dalli#lib/dalli/pipelined_getter.rb:46
- def make_getkq_requests(groups); end
-
- # Yields, one at a time, keys and their values+attributes.
- #
- # pkg:gem/dalli#lib/dalli/pipelined_getter.rb:16
- def process(keys, &block); end
-
- # Processes responses from a server. Returns true if there are no
- # additional responses from this server.
- #
- # pkg:gem/dalli#lib/dalli/pipelined_getter.rb:139
- def process_server(server); end
-
- # pkg:gem/dalli#lib/dalli/pipelined_getter.rb:120
- def remaining_time(start, timeout); end
-
- # pkg:gem/dalli#lib/dalli/pipelined_getter.rb:147
- def servers_with_response(servers, timeout); end
-
- # pkg:gem/dalli#lib/dalli/pipelined_getter.rb:30
- def setup_requests(keys); end
-end
-
-# pkg:gem/dalli#lib/dalli/protocol.rb:7
-module Dalli::Protocol; end
-
-# Base class for a single Memcached server, containing logic common to all
-# protocols. Contains logic for managing connection state to the server and value
-# handling.
-#
-# pkg:gem/dalli#lib/dalli/protocol/base.rb:15
-class Dalli::Protocol::Base
- extend ::Forwardable
-
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:24
- def initialize(attribs, client_options = T.unsafe(nil)); end
-
- # Boolean method used by clients of this class to determine if this
- # particular memcached instance is available for use.
- #
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:69
- def alive?; end
-
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:21
- def close(*args, **, &block); end
-
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:20
- def compress_by_default?(*args, **, &block); end
-
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:20
- def compression_min_size(*args, **, &block); end
-
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:20
- def compressor(*args, **, &block); end
-
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:21
- def connected?(*args, **, &block); end
-
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:21
- def down!(*args, **, &block); end
-
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:21
- def hostname(*args, **, &block); end
-
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:77
- def lock!; end
-
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:165
- def multi?; end
-
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:21
- def name(*args, **, &block); end
-
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:18
- def options; end
-
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:18
- def options=(_arg0); end
-
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:154
- def password; end
-
- # Abort current pipelined get. Generally used to signal an external
- # timeout during pipelined get. The underlying socket is
- # disconnected, and the exception is swallowed.
- #
- # Returns nothing.
- #
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:130
- def pipeline_abort; end
-
- # Did the last call to #pipeline_response_setup complete successfully?
- #
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:146
- def pipeline_complete?; end
-
- # Attempt to receive and parse as many key/value pairs as possible
- # from this server. After #pipeline_response_setup, this should be invoked
- # repeatedly whenever this server's socket is readable until
- # #pipeline_complete?.
- #
- # Returns a Hash of kv pairs received.
- #
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:98
- def pipeline_next_responses; end
-
- # Start reading key/value pairs from this connection. This is usually called
- # after a series of GETKQ commands. A NOOP is sent, and the server begins
- # flushing responses for kv pairs that were found.
- #
- # Returns nothing.
- #
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:86
- def pipeline_response_setup; end
-
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:21
- def port(*args, **, &block); end
-
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:162
- def quiet?; end
-
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:21
- def raise_down_error(*args, **, &block); end
-
- # True when this request passed raw: true. A stored value is then
- # returned as stored, never deserialized or decompressed.
- #
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:34
- def raw_request?(options); end
-
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:21
- def reconnect_down_server?(*args, **, &block); end
-
- # Chokepoint method for error handling and ensuring liveness
- #
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:39
- def request(opkey, *args); end
-
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:158
- def require_auth?; end
-
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:20
- def serializer(*args, **, &block); end
-
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:21
- def sock(*args, **, &block); end
-
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:21
- def socket_timeout(*args, **, &block); end
-
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:21
- def socket_type(*args, **, &block); end
-
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:79
- def unlock!; end
-
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:21
- def up!(*args, **, &block); end
-
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:150
- def username; end
-
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:18
- def weight; end
-
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:18
- def weight=(_arg0); end
-
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:21
- def write(*args, **, &block); end
-
- private
-
- # Drops the rest of this server's replies and closes the connection so
- # nothing unread is left on it. Not a socket failure, so it doesn't count
- # toward socket_max_failures; the keys not read are simply missing.
- #
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:292
- def abandon_pipeline; end
-
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:227
- def cache_nils?(opts); end
-
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:233
- def connect; end
-
- # Reads the replies still pending from quiet requests before any
- # non-quiet request, which reads a reply of its own. A quiet block reads
- # them at its end, but the connection is shared: another thread or fiber
- # (quiet? is fiber-local) can make a request while the block is still
- # open, and would otherwise read the block's replies as its own.
- #
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:178
- def drain_pending_quiet_responses(opkey); end
-
- # The socket connection to the underlying server is initialized as a side
- # effect of this call. In fact, this is the ONLY place where that
- # socket connection is initialized.
- #
- # Both this method and connect need to be in this class so we can do auth
- # as required
- #
- # Since this is invoked exclusively in verify_state!, we don't need to worry about
- # thread safety. Using it elsewhere may require revisiting that assumption.
- #
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:219
- def ensure_connected!; end
-
- # A multi-get only accepts replies for the keys it asked for. With the
- # meta protocol, memcached names an item created by auto-create (ma or mg
- # with N) for a base64-encoded key by its raw bytes, without the b flag;
- # such a key can contain spaces or CR/LF, which split the reply header and
- # make the replies after it parse as different ones. A key that wasn't
- # requested is how that shows up. Only with the verify_reply_keys option,
- # since building the set costs a multi-get about 15%.
- #
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:261
- def expect_reply_keys(keys); end
-
- # Called after the noop response is received at the end of a set
- # of pipelined gets
- #
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:300
- def finish_pipeline; end
-
- # Stores a getkq reply's value and returns true, unless its key wasn't
- # requested: then the replies are out of step, so what was read so far is
- # kept, the rest dropped, and false returned to stop reading
- #
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:268
- def keep_reading?(values, key, value, cas); end
-
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:311
- def log_marshal_err(key, err); end
-
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:316
- def log_unexpected_err(err); end
-
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:240
- def pipelined_get(keys); end
-
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:307
- def reconnect_on_pipeline_complete!; end
-
- # Keys compared as bytes; ASCII keys compare equal in any encoding as is
- #
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:285
- def reply_key_form(key); end
-
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:250
- def response_buffer; end
-
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:280
- def unexpected_reply_key?(key); end
-
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:184
- def verify_allowed_quiet!(opkey); end
-
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:205
- def verify_pipelined_state(_opkey); end
-
- # Checks to see if we can execute the specified operation. Checks
- # whether the connection is in use, and whether the command is allowed
- #
- # pkg:gem/dalli#lib/dalli/protocol/base.rb:194
- def verify_state(opkey); end
-end
-
-# pkg:gem/dalli#lib/dalli/protocol/base.rb:171
-Dalli::Protocol::Base::ALLOWED_QUIET_OPS = T.let(T.unsafe(nil), Array)
-
-# Access point for a single Memcached server, accessed via Memcached's binary
-# protocol. Contains logic for managing connection state to the server (retries, etc),
-# formatting requests to the server, and unpacking responses.
-#
-# pkg:gem/dalli#lib/dalli/protocol/binary.rb:14
-class Dalli::Protocol::Binary < ::Dalli::Protocol::Base
- include ::Dalli::Protocol::Binary::SaslAuthentication
-
- # pkg:gem/dalli#lib/dalli/protocol/binary.rb:15
- def response_processor; end
-
- private
-
- # pkg:gem/dalli#lib/dalli/protocol/binary.rb:59
- def add(key, value, ttl, options); end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary.rb:82
- def append(key, value); end
-
- # TODO: This is confusing, as there's a cas command in memcached
- # and this isn't it. Maybe rename? Maybe eliminate?
- #
- # pkg:gem/dalli#lib/dalli/protocol/binary.rb:47
- def cas(key, options = T.unsafe(nil)); end
-
- # Arithmetic Commands
- #
- # pkg:gem/dalli#lib/dalli/protocol/binary.rb:106
- def decr(key, count, ttl, initial); end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary.rb:123
- def decr_incr(opkey, key, count, ttl, initial); end
-
- # Delete Commands
- #
- # pkg:gem/dalli#lib/dalli/protocol/binary.rb:98
- def delete(key, cas); end
-
- # Other Commands
- #
- # pkg:gem/dalli#lib/dalli/protocol/binary.rb:132
- def flush(ttl = T.unsafe(nil)); end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary.rb:32
- def gat(key, ttl, options = T.unsafe(nil)); end
-
- # Retrieval Commands
- #
- # pkg:gem/dalli#lib/dalli/protocol/binary.rb:22
- def get(key, options = T.unsafe(nil)); end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary.rb:111
- def incr(key, count, ttl, initial); end
-
- # Noop is a keepalive operation but also used to demarcate the end of a set of pipelined commands.
- # We need to read all the responses at once.
- #
- # pkg:gem/dalli#lib/dalli/protocol/binary.rb:140
- def noop; end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary.rb:87
- def prepend(key, value); end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary.rb:28
- def quiet_get_request(key); end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary.rb:64
- def replace(key, value, ttl, cas, options); end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary.rb:154
- def reset_stats; end
-
- # Storage Commands
- #
- # pkg:gem/dalli#lib/dalli/protocol/binary.rb:54
- def set(key, value, ttl, cas, options); end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary.rb:148
- def stats(info = T.unsafe(nil)); end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary.rb:70
- def storage_req(opkey, key, value, ttl, cas, options); end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary.rb:39
- def touch(key, ttl); end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary.rb:159
- def version; end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary.rb:92
- def write_append_prepend(opkey, key, value); end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary.rb:164
- def write_noop; end
-end
-
-# This allows us to special case a nil initial value, and
-# handle it differently than a zero. This special value
-# for expiry causes memcached to return a not found
-# if the key doesn't already exist, rather than
-# setting the initial value
-#
-# pkg:gem/dalli#lib/dalli/protocol/binary.rb:121
-Dalli::Protocol::Binary::NOT_FOUND_EXPIRY = T.let(T.unsafe(nil), Integer)
-
-# Class that encapsulates logic for formatting binary protocol requests
-# to memcached.
-#
-# pkg:gem/dalli#lib/dalli/protocol/binary/request_formatter.rb:10
-class Dalli::Protocol::Binary::RequestFormatter
- class << self
- # pkg:gem/dalli#lib/dalli/protocol/binary/request_formatter.rb:111
- def as_8byte_uint(val); end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary/request_formatter.rb:102
- def decr_incr_request(opkey:, key: T.unsafe(nil), count: T.unsafe(nil), initial: T.unsafe(nil), expiry: T.unsafe(nil)); end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary/request_formatter.rb:92
- def standard_request(opkey:, key: T.unsafe(nil), value: T.unsafe(nil), opaque: T.unsafe(nil), cas: T.unsafe(nil), bitflags: T.unsafe(nil), ttl: T.unsafe(nil)); end
- end
-end
-
-# pkg:gem/dalli#lib/dalli/protocol/binary/request_formatter.rb:53
-Dalli::Protocol::Binary::RequestFormatter::BODY_FORMATS = T.let(T.unsafe(nil), Hash)
-
-# pkg:gem/dalli#lib/dalli/protocol/binary/request_formatter.rb:89
-Dalli::Protocol::Binary::RequestFormatter::FORMAT = T.let(T.unsafe(nil), Hash)
-
-# pkg:gem/dalli#lib/dalli/protocol/binary/request_formatter.rb:49
-Dalli::Protocol::Binary::RequestFormatter::INCR_DECR = T.let(T.unsafe(nil), String)
-
-# pkg:gem/dalli#lib/dalli/protocol/binary/request_formatter.rb:48
-Dalli::Protocol::Binary::RequestFormatter::KEY_AND_VALUE = T.let(T.unsafe(nil), String)
-
-# pkg:gem/dalli#lib/dalli/protocol/binary/request_formatter.rb:46
-Dalli::Protocol::Binary::RequestFormatter::KEY_ONLY = T.let(T.unsafe(nil), String)
-
-# pkg:gem/dalli#lib/dalli/protocol/binary/request_formatter.rb:51
-Dalli::Protocol::Binary::RequestFormatter::NO_BODY = T.let(T.unsafe(nil), String)
-
-# pkg:gem/dalli#lib/dalli/protocol/binary/request_formatter.rb:13
-Dalli::Protocol::Binary::RequestFormatter::OPCODES = T.let(T.unsafe(nil), Hash)
-
-# pkg:gem/dalli#lib/dalli/protocol/binary/request_formatter.rb:11
-Dalli::Protocol::Binary::RequestFormatter::REQUEST = T.let(T.unsafe(nil), Integer)
-
-# pkg:gem/dalli#lib/dalli/protocol/binary/request_formatter.rb:44
-Dalli::Protocol::Binary::RequestFormatter::REQ_HEADER_FORMAT = T.let(T.unsafe(nil), String)
-
-# pkg:gem/dalli#lib/dalli/protocol/binary/request_formatter.rb:47
-Dalli::Protocol::Binary::RequestFormatter::TTL_AND_KEY = T.let(T.unsafe(nil), String)
-
-# pkg:gem/dalli#lib/dalli/protocol/binary/request_formatter.rb:50
-Dalli::Protocol::Binary::RequestFormatter::TTL_ONLY = T.let(T.unsafe(nil), String)
-
-# Class that encapsulates data parsed from a memcached response header.
-#
-# pkg:gem/dalli#lib/dalli/protocol/binary/response_header.rb:9
-class Dalli::Protocol::Binary::ResponseHeader
- # pkg:gem/dalli#lib/dalli/protocol/binary/response_header.rb:15
- def initialize(buf); end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary/response_header.rb:13
- def body_len; end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary/response_header.rb:13
- def cas; end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary/response_header.rb:13
- def data_type; end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary/response_header.rb:13
- def extra_len; end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary/response_header.rb:13
- def key_len; end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary/response_header.rb:25
- def not_found?; end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary/response_header.rb:30
- def not_stored?; end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary/response_header.rb:21
- def ok?; end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary/response_header.rb:13
- def opaque; end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary/response_header.rb:13
- def status; end
-end
-
-# pkg:gem/dalli#lib/dalli/protocol/binary/response_header.rb:11
-Dalli::Protocol::Binary::ResponseHeader::FMT = T.let(T.unsafe(nil), String)
-
-# pkg:gem/dalli#lib/dalli/protocol/binary/response_header.rb:29
-Dalli::Protocol::Binary::ResponseHeader::NOT_STORED_STATUSES = T.let(T.unsafe(nil), Array)
-
-# pkg:gem/dalli#lib/dalli/protocol/binary/response_header.rb:10
-Dalli::Protocol::Binary::ResponseHeader::SIZE = T.let(T.unsafe(nil), Integer)
-
-# Class that encapsulates logic for processing binary protocol responses
-# from memcached. Includes logic for pulling data from an IO source
-# and parsing into local values. Handles errors on unexpected values.
-#
-# pkg:gem/dalli#lib/dalli/protocol/binary/response_processor.rb:11
-class Dalli::Protocol::Binary::ResponseProcessor
- # pkg:gem/dalli#lib/dalli/protocol/binary/response_processor.rb:34
- def initialize(io_source, value_marshaller); end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary/response_processor.rb:187
- def auth_response(buf = T.unsafe(nil)); end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary/response_processor.rb:220
- def check_body_size!(size); end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary/response_processor.rb:153
- def consume_all_responses_until_noop; end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary/response_processor.rb:195
- def contains_header?(buf); end
-
- # raw: true returns the value as stored; see #get
- #
- # pkg:gem/dalli#lib/dalli/protocol/binary/response_processor.rb:106
- def data_cas_response(raw: T.unsafe(nil)); end
-
- # Returns the new value for the key, if found and updated
- #
- # pkg:gem/dalli#lib/dalli/protocol/binary/response_processor.rb:118
- def decr_incr; end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary/response_processor.rb:97
- def delete; end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary/response_processor.rb:141
- def flush; end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary/response_processor.rb:161
- def generic_response; end
-
- # raw: true returns the value as stored, without deserializing or
- # decompressing it, whatever flags it was stored with
- #
- # pkg:gem/dalli#lib/dalli/protocol/binary/response_processor.rb:71
- def get(cache_nils: T.unsafe(nil), raw: T.unsafe(nil)); end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary/response_processor.rb:226
- def getk_response_from_buffer(buf); end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary/response_processor.rb:173
- def no_body_response; end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary/response_processor.rb:63
- def raise_on_not_ok!(resp_header); end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary/response_processor.rb:39
- def read(num_bytes); end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary/response_processor.rb:59
- def read_header; end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary/response_processor.rb:43
- def read_response; end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary/response_processor.rb:145
- def reset; end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary/response_processor.rb:201
- def response_header_from_buffer(buf); end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary/response_processor.rb:123
- def stats; end
-
- # Response for a storage operation. Returns the cas on success. False
- # if the value wasn't stored. And raises an error on all other error
- # codes from memcached.
- #
- # pkg:gem/dalli#lib/dalli/protocol/binary/response_processor.rb:88
- def storage_response; end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary/response_processor.rb:49
- def unpack_response_body(resp_header, body, parse_as_stored_value); end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary/response_processor.rb:181
- def validate_auth_format(extra_len, count); end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary/response_processor.rb:149
- def version; end
-end
-
-# This method returns an array of values used in a pipelined
-# getk process. The first value is the number of bytes by
-# which to advance the pointer in the buffer. If the
-# complete response is found in the buffer, this will
-# be the response size. Otherwise it is zero.
-#
-# The remaining three values in the array are the ResponseHeader,
-# key, and value.
-#
-# memcached can't store an item larger than 1 GiB (its -I maximum). A
-# pipelined reply claiming an impossible size would otherwise have the
-# buffer wait for (and accumulate) that many bytes.
-#
-# pkg:gem/dalli#lib/dalli/protocol/binary/response_processor.rb:218
-Dalli::Protocol::Binary::ResponseProcessor::MAX_BODY_BYTES = T.let(T.unsafe(nil), Integer)
-
-# Response codes taken from:
-# https://github.com/memcached/memcached/wiki/BinaryProtocolRevamped#response-status
-#
-# pkg:gem/dalli#lib/dalli/protocol/binary/response_processor.rb:14
-Dalli::Protocol::Binary::ResponseProcessor::RESPONSE_CODES = T.let(T.unsafe(nil), Hash)
-
-# Code to support SASL authentication
-#
-# pkg:gem/dalli#lib/dalli/protocol/binary/sasl_authentication.rb:9
-module Dalli::Protocol::Binary::SaslAuthentication
- # pkg:gem/dalli#lib/dalli/protocol/binary/sasl_authentication.rb:40
- def authenticate_connection; end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary/sasl_authentication.rb:33
- def authenticate_with_plain; end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary/sasl_authentication.rb:10
- def perform_auth_negotiation; end
-
- # pkg:gem/dalli#lib/dalli/protocol/binary/sasl_authentication.rb:25
- def supported_mechanisms!(mechanisms); end
-end
-
-# pkg:gem/dalli#lib/dalli/protocol/binary/sasl_authentication.rb:23
-Dalli::Protocol::Binary::SaslAuthentication::PLAIN_AUTH = T.let(T.unsafe(nil), String)
-
-# Manages the socket connection to the server, including ensuring liveness
-# and retries.
-#
-# pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:15
-class Dalli::Protocol::ConnectionManager
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:33
- def initialize(hostname, port, socket_type, client_options); end
-
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:171
- def abort_request!; end
-
- # plus the value's trailing "\r\n"
- #
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:200
- def check_read_size!(count); end
-
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:118
- def close; end
-
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:273
- def close_on_fork; end
-
- # A forked child shares the parent's connection, so it closes only its
- # own file descriptor. Closing the TLS socket itself would send
- # close_notify and end the parent's TLS session.
- #
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:135
- def close_socket; end
-
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:112
- def confirm_in_progress!; end
-
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:107
- def confirm_ready!; end
-
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:139
- def connected?; end
-
- # Marks the server instance as down. Updates the down_at state
- # and raises an Dalli::NetworkError that includes the underlying
- # error in the message. Calls close to clean up socket state
- #
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:88
- def down!; end
-
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:229
- def error_on_request!(err_or_string); end
-
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:55
- def establish_connection; end
-
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:160
- def finish_request!; end
-
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:282
- def fork_detected?; end
-
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:29
- def hostname; end
-
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:29
- def hostname=(_arg0); end
-
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:290
- def log_down_detected; end
-
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:302
- def log_up_detected; end
-
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:265
- def log_warn_message(err_or_string); end
-
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:225
- def max_allowed_failures; end
-
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:257
- def memcached_socket; end
-
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:47
- def name; end
-
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:29
- def options; end
-
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:29
- def options=(_arg0); end
-
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:29
- def port; end
-
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:29
- def port=(_arg0); end
-
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:31
- def quiet_responses_pending=(_arg0); end
-
- # True when a quiet request was written on this connection and its
- # replies (memcached only suppresses some of them) haven't been
- # consumed by a noop yet.
- #
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:146
- def quiet_responses_pending?; end
-
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:99
- def raise_down_error; end
-
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:206
- def read(count); end
-
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:184
- def read_line; end
-
- # Non-blocking read. Here to support the operation
- # of the get_multi operation
- #
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:221
- def read_nonblock; end
-
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:242
- def reconnect!(message); end
-
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:67
- def reconnect_down_server?; end
-
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:150
- def request_in_progress?; end
-
- # Called on connect. Deliberately leaves @fail_count alone; see
- # finish_request!.
- #
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:250
- def reset_down_info; end
-
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:30
- def sock; end
-
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:103
- def socket_timeout; end
-
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:29
- def socket_type; end
-
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:29
- def socket_type=(_arg0); end
-
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:154
- def start_request!; end
-
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:80
- def up!; end
-
- # pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:213
- def write(bytes); end
-end
-
-# pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:16
-Dalli::Protocol::ConnectionManager::DEFAULTS = T.let(T.unsafe(nil), Hash)
-
-# The longest reply line Dalli reads, in bytes, CRLF included. A meta
-# reply header is at most about 500 bytes: "VA " plus its flags,
-# the largest being a 250-byte key base64-encoded to 336 bytes, a
-# 20-digit CAS, a 32-byte opaque and a few numeric fields. The longest
-# stats line (stats settings) carries a file path such as ext_path, up
-# to PATH_MAX (4096). 8 KiB leaves room for both, while a server that
-# never sends CRLF can't grow the read buffer without bound.
-#
-# pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:182
-Dalli::Protocol::ConnectionManager::MAX_LINE_BYTES = T.let(T.unsafe(nil), Integer)
-
-# memcached can't store an item larger than 1 GiB (its -I maximum), so a
-# reply claiming more (or a negative size) is malformed or hostile.
-# Reading allocates the full count up front, so check before reading.
-#
-# pkg:gem/dalli#lib/dalli/protocol/connection_manager.rb:198
-Dalli::Protocol::ConnectionManager::MAX_READ_BYTES = T.let(T.unsafe(nil), Integer)
-
-# Access point for a single Memcached server, accessed via Memcached's meta
-# protocol. Contains logic for managing connection state to the server (retries, etc),
-# formatting requests to the server, and unpacking responses.
-#
-# pkg:gem/dalli#lib/dalli/protocol/meta.rb:14
-class Dalli::Protocol::Meta < ::Dalli::Protocol::Base
- # counters are stored raw
- #
- # pkg:gem/dalli#lib/dalli/protocol/meta.rb:18
- def response_processor; end
-
- private
-
- # pkg:gem/dalli#lib/dalli/protocol/meta.rb:70
- def add(key, value, ttl, options); end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta.rb:92
- def append(key, value); end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta.rb:204
- def authenticate_connection; end
-
- # TODO: This is confusing, as there's a cas command in memcached
- # and this isn't it. Maybe rename? Maybe eliminate?
- #
- # pkg:gem/dalli#lib/dalli/protocol/meta.rb:57
- def cas(key, options = T.unsafe(nil)); end
-
- # Arithmetic Commands
- #
- # pkg:gem/dalli#lib/dalli/protocol/meta.rb:122
- def decr(key, count, ttl, initial); end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta.rb:130
- def decr_incr(incr, key, delta, ttl, initial); end
-
- # Like decr_incr with an initial value, without memcached's auto-create:
- # on a miss the counter is added with the initial value (which is
- # returned, as auto-create would), and the add losing a race to another
- # client means the counter now exists, so the incr is tried again. In a
- # quiet block both requests are sent and whichever applies takes effect.
- #
- # pkg:gem/dalli#lib/dalli/protocol/meta.rb:148
- def decr_incr_with_add(incr, key, delta, ttl, initial); end
-
- # Delete Commands
- #
- # pkg:gem/dalli#lib/dalli/protocol/meta.rb:113
- def delete(key, cas); end
-
- # Other Commands
- #
- # pkg:gem/dalli#lib/dalli/protocol/meta.rb:170
- def flush(delay = T.unsafe(nil)); end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta.rb:39
- def gat(key, ttl, options = T.unsafe(nil)); end
-
- # Retrieval Commands
- #
- # pkg:gem/dalli#lib/dalli/protocol/meta.rb:27
- def get(key, options = T.unsafe(nil)); end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta.rb:126
- def incr(key, count, ttl, initial); end
-
- # Noop is a keepalive operation but also used to demarcate the end of a set of pipelined commands.
- # We need to read all the responses at once.
- #
- # pkg:gem/dalli#lib/dalli/protocol/meta.rb:177
- def noop; end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta.rb:97
- def prepend(key, value); end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta.rb:161
- def quiet_decr_incr_with_add(incr, key, delta, ttl, initial); end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta.rb:34
- def quiet_get_request(key); end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta.rb:75
- def replace(key, value, ttl, cas, options); end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta.rb:190
- def reset_stats; end
-
- # Storage Commands
- #
- # pkg:gem/dalli#lib/dalli/protocol/meta.rb:65
- def set(key, value, ttl, cas, options); end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta.rb:185
- def stats(info = T.unsafe(nil)); end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta.rb:47
- def touch(key, ttl); end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta.rb:195
- def version; end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta.rb:103
- def write_append_prepend_req(mode, key, value, ttl = T.unsafe(nil), cas = T.unsafe(nil), _options = T.unsafe(nil)); end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta.rb:200
- def write_noop; end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta.rb:81
- def write_storage_req(mode, key, raw_value, ttl = T.unsafe(nil), cas = T.unsafe(nil), options = T.unsafe(nil)); end
-end
-
-# pkg:gem/dalli#lib/dalli/protocol/meta.rb:16
-Dalli::Protocol::Meta::COUNTER_ADD_OPTIONS = T.let(T.unsafe(nil), Hash)
-
-# The meta protocol requires that keys be ASCII only, so Unicode keys are
-# not supported. In addition, the use of whitespace in the key is not
-# allowed.
-# memcached supports the use of base64 hashes for keys containing
-# whitespace or non-ASCII characters, provided the 'b' flag is included in the request.
-#
-# pkg:gem/dalli#lib/dalli/protocol/meta/key_regularizer.rb:12
-class Dalli::Protocol::Meta::KeyRegularizer
- class << self
- # pkg:gem/dalli#lib/dalli/protocol/meta/key_regularizer.rb:22
- def decode(encoded_key, base64_encoded); end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta/key_regularizer.rb:15
- def encode(key); end
- end
-end
-
-# pkg:gem/dalli#lib/dalli/protocol/meta/key_regularizer.rb:13
-Dalli::Protocol::Meta::KeyRegularizer::WHITESPACE = T.let(T.unsafe(nil), Regexp)
-
-# Class that encapsulates logic for formatting meta protocol requests
-# to memcached.
-#
-# pkg:gem/dalli#lib/dalli/protocol/meta/request_formatter.rb:10
-class Dalli::Protocol::Meta::RequestFormatter
- class << self
- # pkg:gem/dalli#lib/dalli/protocol/meta/request_formatter.rb:119
- def cas_string(cas); end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta/request_formatter.rb:77
- def flush(delay: T.unsafe(nil), quiet: T.unsafe(nil)); end
-
- # Numeric flag values are written straight into the command line, so a
- # value that isn't an integer -- e.g. a String carrying CRLF -- would let
- # the caller inject further memcached commands (GHSA-6wmv-xq9m-fmp7).
- # Converting to Integer means only digits ever reach the wire. Strings
- # are parsed as base 10 so "010" means 10, as memcached would read it,
- # rather than octal 8.
- #
- # pkg:gem/dalli#lib/dalli/protocol/meta/request_formatter.rb:113
- def integer_flag(name, value); end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta/request_formatter.rb:52
- def meta_arithmetic(key:, delta:, initial:, incr: T.unsafe(nil), cas: T.unsafe(nil), ttl: T.unsafe(nil), base64: T.unsafe(nil), quiet: T.unsafe(nil)); end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta/request_formatter.rb:43
- def meta_delete(key:, cas: T.unsafe(nil), ttl: T.unsafe(nil), base64: T.unsafe(nil), quiet: T.unsafe(nil)); end
-
- # Since these are string construction methods, we're going to disable these
- # Rubocop directives. We really can't make this construction much simpler,
- # and introducing an intermediate object seems like overkill.
- #
- # pkg:gem/dalli#lib/dalli/protocol/meta/request_formatter.rb:19
- def meta_get(key:, value: T.unsafe(nil), return_cas: T.unsafe(nil), ttl: T.unsafe(nil), base64: T.unsafe(nil), quiet: T.unsafe(nil)); end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta/request_formatter.rb:69
- def meta_noop; end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta/request_formatter.rb:29
- def meta_set(key:, value:, bitflags: T.unsafe(nil), cas: T.unsafe(nil), ttl: T.unsafe(nil), mode: T.unsafe(nil), base64: T.unsafe(nil), quiet: T.unsafe(nil)); end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta/request_formatter.rb:91
- def mode_to_token(mode); end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta/request_formatter.rb:124
- def parse_to_64_bit_int(val, default); end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta/request_formatter.rb:84
- def stats(arg = T.unsafe(nil)); end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta/request_formatter.rb:73
- def version; end
- end
-end
-
-# Class that encapsulates logic for processing meta protocol responses
-# from memcached. Includes logic for pulling data from an IO source
-# and parsing into local values. Handles errors on unexpected values.
-#
-# pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:11
-class Dalli::Protocol::Meta::ResponseProcessor
- # pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:25
- def initialize(io_source, value_marshaller); end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:208
- def bitflags_from_tokens(tokens); end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:222
- def body_len_from_tokens(tokens); end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:212
- def cas_from_tokens(tokens); end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:182
- def check_value_size!(size); end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:112
- def consume_all_responses_until_mn; end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:193
- def contains_header?(buf); end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:77
- def decr_incr; end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:201
- def error_on_unexpected!(expected_codes); end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:95
- def flush; end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:127
- def full_response_from_buffer(tokens, body, resp_size); end
-
- # This method returns an array of values used in a pipelined
- # getk process. The first value is the number of bytes by
- # which to advance the pointer in the buffer. If the
- # complete response is found in the buffer, this will
- # be the response size. Otherwise it is zero.
- #
- # The remaining three values in the array are the ResponseHeader,
- # key, and value.
- #
- # pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:146
- def getk_response_from_buffer(buf); end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:197
- def header_from_buffer(buf); end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:216
- def key_from_tokens(tokens); end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:72
- def meta_delete; end
-
- # raw: true returns the value as stored, without deserializing or
- # decompressing it, whatever flags it was stored with
- #
- # pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:32
- def meta_get_with_value(cache_nils: T.unsafe(nil), raw: T.unsafe(nil)); end
-
- # raw: true returns the value as stored; see #meta_get_with_value
- #
- # pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:42
- def meta_get_with_value_and_cas(raw: T.unsafe(nil)); end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:53
- def meta_get_without_value; end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:65
- def meta_set_append_prepend; end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:58
- def meta_set_with_cas; end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:241
- def next_line_to_tokens; end
-
- # A zero-size reply has no body unless it's a VA (a hit on an empty value)
- #
- # pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:189
- def no_body?(tokens, body_len); end
-
- # The size given right after "VA", or 0 when it isn't a number
- #
- # pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:178
- def positional_size(tokens); end
-
- # Values are read by the size in the VA line, not up to the next CRLF:
- # a value can contain CRLF and can be longer than MAX_LINE_BYTES
- #
- # pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:248
- def read_data(data_size); end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:237
- def read_line; end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:101
- def reset; end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:85
- def stats; end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:119
- def tokens_from_header_buffer(buf); end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:230
- def value_from_tokens(tokens, flag); end
-
- # pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:107
- def version; end
-end
-
-# pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:12
-Dalli::Protocol::Meta::ResponseProcessor::EN = T.let(T.unsafe(nil), String)
-
-# pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:13
-Dalli::Protocol::Meta::ResponseProcessor::END_TOKEN = T.let(T.unsafe(nil), String)
-
-# pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:14
-Dalli::Protocol::Meta::ResponseProcessor::EX = T.let(T.unsafe(nil), String)
-
-# pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:15
-Dalli::Protocol::Meta::ResponseProcessor::HD = T.let(T.unsafe(nil), String)
-
-# memcached can't store an item larger than 1 GiB (its -I maximum). A
-# pipelined reply claiming an impossible size would otherwise have the
-# buffer wait for (and accumulate) that many bytes.
-#
-# pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:175
-Dalli::Protocol::Meta::ResponseProcessor::MAX_VALUE_BYTES = T.let(T.unsafe(nil), Integer)
-
-# pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:16
-Dalli::Protocol::Meta::ResponseProcessor::MN = T.let(T.unsafe(nil), String)
-
-# pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:17
-Dalli::Protocol::Meta::ResponseProcessor::NF = T.let(T.unsafe(nil), String)
-
-# pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:18
-Dalli::Protocol::Meta::ResponseProcessor::NS = T.let(T.unsafe(nil), String)
-
-# pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:19
-Dalli::Protocol::Meta::ResponseProcessor::OK = T.let(T.unsafe(nil), String)
-
-# pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:20
-Dalli::Protocol::Meta::ResponseProcessor::RESET = T.let(T.unsafe(nil), String)
-
-# pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:21
-Dalli::Protocol::Meta::ResponseProcessor::STAT = T.let(T.unsafe(nil), String)
-
-# pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:22
-Dalli::Protocol::Meta::ResponseProcessor::VA = T.let(T.unsafe(nil), String)
-
-# pkg:gem/dalli#lib/dalli/protocol/meta/response_processor.rb:23
-Dalli::Protocol::Meta::ResponseProcessor::VERSION = T.let(T.unsafe(nil), String)
-
-# pkg:gem/dalli#lib/dalli/protocol/meta.rb:15
-Dalli::Protocol::Meta::TERMINATOR = T.let(T.unsafe(nil), String)
-
-# Preserved for backwards compatibility. Should be removed in 4.0
-#
-# pkg:gem/dalli#lib/dalli/protocol.rb:9
-Dalli::Protocol::NOT_FOUND = T.let(T.unsafe(nil), Dalli::NilObject)
-
-# Manages the buffer for responses from memcached.
-#
-# pkg:gem/dalli#lib/dalli/protocol/response_buffer.rb:11
-class Dalli::Protocol::ResponseBuffer
- # pkg:gem/dalli#lib/dalli/protocol/response_buffer.rb:12
- def initialize(io_source, response_processor); end
-
- # Advances the internal response buffer by bytes_to_advance
- # bytes. The
- #
- # pkg:gem/dalli#lib/dalli/protocol/response_buffer.rb:32
- def advance(bytes_to_advance); end
-
- # Clear the internal response buffer
- #
- # pkg:gem/dalli#lib/dalli/protocol/response_buffer.rb:45
- def clear; end
-
- # pkg:gem/dalli#lib/dalli/protocol/response_buffer.rb:49
- def in_progress?; end
-
- # Attempts to process a single response from the buffer. Starts
- # by advancing the buffer to the specified start position
- #
- # pkg:gem/dalli#lib/dalli/protocol/response_buffer.rb:24
- def process_single_getk_response; end
-
- # pkg:gem/dalli#lib/dalli/protocol/response_buffer.rb:18
- def read; end
-
- # Resets the internal buffer to an empty state,
- # so that we're ready to read pipelined responses
- #
- # pkg:gem/dalli#lib/dalli/protocol/response_buffer.rb:40
- def reset; end
-end
-
-# SSL errors during the TLS handshake count as a failed request: they
-# trigger reconnection and, after socket_max_failures, mark the server
-# down. openssl is required above because this file loads before
-# dalli/socket, so OpenSSL may not be defined yet.
-#
-# pkg:gem/dalli#lib/dalli/protocol.rb:24
-Dalli::Protocol::SSL_ERRORS = T.let(T.unsafe(nil), Array)
-
-# Dalli::Protocol::ServerConfigParser parses a server string passed to
-# a Dalli::Protocol::Binary instance into the hostname, port, weight, and
-# socket_type.
-#
-# pkg:gem/dalli#lib/dalli/protocol/server_config_parser.rb:12
-class Dalli::Protocol::ServerConfigParser
- class << self
- # pkg:gem/dalli#lib/dalli/protocol/server_config_parser.rb:67
- def attributes_for_tcp_socket(res); end
-
- # pkg:gem/dalli#lib/dalli/protocol/server_config_parser.rb:60
- def attributes_for_unix_socket(res); end
-
- # pkg:gem/dalli#lib/dalli/protocol/server_config_parser.rb:53
- def deconstruct_string(str); end
-
- # pkg:gem/dalli#lib/dalli/protocol/server_config_parser.rb:71
- def normalize_host_from_match(str, res); end
-
- # pkg:gem/dalli#lib/dalli/protocol/server_config_parser.rb:77
- def normalize_port(port); end
-
- # pkg:gem/dalli#lib/dalli/protocol/server_config_parser.rb:81
- def normalize_weight(weight); end
-
- # pkg:gem/dalli#lib/dalli/protocol/server_config_parser.rb:24
- def parse(str); end
-
- # pkg:gem/dalli#lib/dalli/protocol/server_config_parser.rb:39
- def parse_non_uri(str); end
-
- # pkg:gem/dalli#lib/dalli/protocol/server_config_parser.rb:30
- def parse_uri(str); end
- end
-end
-
-# pkg:gem/dalli#lib/dalli/protocol/server_config_parser.rb:21
-Dalli::Protocol::ServerConfigParser::DEFAULT_PORT = T.let(T.unsafe(nil), Integer)
-
-# pkg:gem/dalli#lib/dalli/protocol/server_config_parser.rb:22
-Dalli::Protocol::ServerConfigParser::DEFAULT_WEIGHT = T.let(T.unsafe(nil), Integer)
-
-# pkg:gem/dalli#lib/dalli/protocol/server_config_parser.rb:13
-Dalli::Protocol::ServerConfigParser::MEMCACHED_URI_PROTOCOL = T.let(T.unsafe(nil), String)
-
-# TODO: Revisit this, especially the IP/domain part. Likely
-# can limit character set to LDH + '.'. Hex digit section
-# is there to support IPv6 addresses, which need to be specified with
-# a bounding []
-#
-# pkg:gem/dalli#lib/dalli/protocol/server_config_parser.rb:19
-Dalli::Protocol::ServerConfigParser::SERVER_CONFIG_REGEXP = T.let(T.unsafe(nil), Regexp)
-
-# Ruby 3.2 raises IO::TimeoutError on blocking reads/writes, but
-# it is not defined in earlier Ruby versions.
-#
-# pkg:gem/dalli#lib/dalli/protocol.rb:13
-Dalli::Protocol::TIMEOUT_ERRORS = T.let(T.unsafe(nil), Array)
-
-# Utility class for sanitizing TTL arguments based on Memcached rules.
-# TTLs are either expirations times in seconds (with a maximum value of
-# 30 days) or expiration timestamps. This class sanitizes TTLs to ensure
-# they meet those restrictions.
-#
-# pkg:gem/dalli#lib/dalli/protocol/ttl_sanitizer.rb:11
-class Dalli::Protocol::TtlSanitizer
- class << self
- # pkg:gem/dalli#lib/dalli/protocol/ttl_sanitizer.rb:29
- def as_timestamp(ttl_as_i); end
-
- # Pulled out into a method so it's easy to stub time
- #
- # pkg:gem/dalli#lib/dalli/protocol/ttl_sanitizer.rb:40
- def current_timestamp; end
-
- # pkg:gem/dalli#lib/dalli/protocol/ttl_sanitizer.rb:25
- def less_than_max_expiration_interval?(ttl_as_i); end
-
- # Ensures the TTL passed to Memcached is a valid TTL in the expected format.
- #
- # pkg:gem/dalli#lib/dalli/protocol/ttl_sanitizer.rb:18
- def sanitize(ttl); end
- end
-end
-
-# https://github.com/memcached/memcached/blob/master/doc/protocol.txt#L79
-# > An expiration time, in seconds. Can be up to 30 days. After 30 days, is
-# treated as a unix timestamp of an exact date.
-#
-# pkg:gem/dalli#lib/dalli/protocol/ttl_sanitizer.rb:15
-Dalli::Protocol::TtlSanitizer::MAX_ACCEPTABLE_EXPIRATION_INTERVAL = T.let(T.unsafe(nil), Integer)
-
-# Dalli::Protocol::ValueCompressor compartmentalizes the logic for managing
-# compression and decompression of stored values. It manages interpreting
-# relevant options from both client and request, determining whether to
-# compress/decompress on store/retrieve, and processes bitflags as necessary.
-#
-# pkg:gem/dalli#lib/dalli/protocol/value_compressor.rb:13
-class Dalli::Protocol::ValueCompressor
- # pkg:gem/dalli#lib/dalli/protocol/value_compressor.rb:33
- def initialize(client_options); end
-
- # pkg:gem/dalli#lib/dalli/protocol/value_compressor.rb:87
- def compress_by_default?; end
-
- # Checks whether we should apply compression when serializing a value
- # based on the specified options. Returns false for a raw request
- # (raw reads ignore bitflags, so the value must be stored as given) or
- # unless the value is greater than the minimum compression size.
- # Otherwise returns based on a method-level option if specified,
- # falling back to the server default.
- #
- # pkg:gem/dalli#lib/dalli/protocol/value_compressor.rb:105
- def compress_value?(value, req_options); end
-
- # pkg:gem/dalli#lib/dalli/protocol/value_compressor.rb:95
- def compression_min_size; end
-
- # pkg:gem/dalli#lib/dalli/protocol/value_compressor.rb:91
- def compressor; end
-
- # pkg:gem/dalli#lib/dalli/protocol/value_compressor.rb:74
- def compressor_accepts_max_bytes?; end
-
- # pkg:gem/dalli#lib/dalli/protocol/value_compressor.rb:55
- def retrieve(value, bitflags); end
-
- # pkg:gem/dalli#lib/dalli/protocol/value_compressor.rb:47
- def store(value, req_options, bitflags); end
-end
-
-# pkg:gem/dalli#lib/dalli/protocol/value_compressor.rb:14
-Dalli::Protocol::ValueCompressor::DEFAULTS = T.let(T.unsafe(nil), Hash)
-
-# https://www.hjp.at/zettel/m/memcached_flags.rxml
-# Looks like most clients use bit 1 to indicate gzip compression.
-#
-# pkg:gem/dalli#lib/dalli/protocol/value_compressor.rb:31
-Dalli::Protocol::ValueCompressor::FLAG_COMPRESSED = T.let(T.unsafe(nil), Integer)
-
-# pkg:gem/dalli#lib/dalli/protocol/value_compressor.rb:26
-Dalli::Protocol::ValueCompressor::KEYWORD_PARAMETER_TYPES = T.let(T.unsafe(nil), Array)
-
-# pkg:gem/dalli#lib/dalli/protocol/value_compressor.rb:24
-Dalli::Protocol::ValueCompressor::OPTIONS = T.let(T.unsafe(nil), Array)
-
-# Dalli::Protocol::ValueMarshaller compartmentalizes the logic for marshalling
-# and unmarshalling unstructured data (values) to Memcached. It also enforces
-# limits on the maximum size of marshalled data.
-#
-# pkg:gem/dalli#lib/dalli/protocol/value_marshaller.rb:12
-class Dalli::Protocol::ValueMarshaller
- extend ::Forwardable
-
- # pkg:gem/dalli#lib/dalli/protocol/value_marshaller.rb:25
- def initialize(client_options); end
-
- # pkg:gem/dalli#lib/dalli/protocol/value_marshaller.rb:23
- def compress_by_default?(*args, **, &block); end
-
- # pkg:gem/dalli#lib/dalli/protocol/value_marshaller.rb:23
- def compression_min_size(*args, **, &block); end
-
- # pkg:gem/dalli#lib/dalli/protocol/value_marshaller.rb:23
- def compressor(*args, **, &block); end
-
- # pkg:gem/dalli#lib/dalli/protocol/value_marshaller.rb:51
- def error_if_over_max_value_bytes(key, value); end
-
- # pkg:gem/dalli#lib/dalli/protocol/value_marshaller.rb:42
- def retrieve(value, flags); end
-
- # pkg:gem/dalli#lib/dalli/protocol/value_marshaller.rb:22
- def serializer(*args, **, &block); end
-
- # pkg:gem/dalli#lib/dalli/protocol/value_marshaller.rb:33
- def store(key, value, options = T.unsafe(nil)); end
-
- # pkg:gem/dalli#lib/dalli/protocol/value_marshaller.rb:47
- def value_max_bytes; end
-end
-
-# pkg:gem/dalli#lib/dalli/protocol/value_marshaller.rb:15
-Dalli::Protocol::ValueMarshaller::DEFAULTS = T.let(T.unsafe(nil), Hash)
-
-# pkg:gem/dalli#lib/dalli/protocol/value_marshaller.rb:20
-Dalli::Protocol::ValueMarshaller::OPTIONS = T.let(T.unsafe(nil), Array)
-
-# Dalli::Protocol::ValueSerializer compartmentalizes the logic for managing
-# serialization and deserialization of stored values. It manages interpreting
-# relevant options from both client and request, determining whether to
-# serialize/deserialize on store/retrieve, and processes bitflags as necessary.
-#
-# pkg:gem/dalli#lib/dalli/protocol/value_serializer.rb:11
-class Dalli::Protocol::ValueSerializer
- # pkg:gem/dalli#lib/dalli/protocol/value_serializer.rb:24
- def initialize(protocol_options); end
-
- # pkg:gem/dalli#lib/dalli/protocol/value_serializer.rb:62
- def filter_argument_error(err); end
-
- # pkg:gem/dalli#lib/dalli/protocol/value_serializer.rb:68
- def filter_name_error(err); end
-
- # pkg:gem/dalli#lib/dalli/protocol/value_serializer.rb:56
- def filter_type_error(err); end
-
- # pkg:gem/dalli#lib/dalli/protocol/value_serializer.rb:45
- def retrieve(value, bitflags); end
-
- # pkg:gem/dalli#lib/dalli/protocol/value_serializer.rb:22
- def serialization_options; end
-
- # pkg:gem/dalli#lib/dalli/protocol/value_serializer.rb:22
- def serialization_options=(_arg0); end
-
- # pkg:gem/dalli#lib/dalli/protocol/value_serializer.rb:78
- def serialize_value(value); end
-
- # pkg:gem/dalli#lib/dalli/protocol/value_serializer.rb:74
- def serializer; end
-
- # pkg:gem/dalli#lib/dalli/protocol/value_serializer.rb:29
- def store(value, req_options, bitflags); end
-end
-
-# pkg:gem/dalli#lib/dalli/protocol/value_serializer.rb:41
-Dalli::Protocol::ValueSerializer::ARGUMENT_ERR_REGEXP = T.let(T.unsafe(nil), Regexp)
-
-# pkg:gem/dalli#lib/dalli/protocol/value_serializer.rb:12
-Dalli::Protocol::ValueSerializer::DEFAULTS = T.let(T.unsafe(nil), Hash)
-
-# https://www.hjp.at/zettel/m/memcached_flags.rxml
-# Looks like most clients use bit 0 to indicate native language serialization
-#
-# pkg:gem/dalli#lib/dalli/protocol/value_serializer.rb:20
-Dalli::Protocol::ValueSerializer::FLAG_SERIALIZED = T.let(T.unsafe(nil), Integer)
-
-# pkg:gem/dalli#lib/dalli/protocol/value_serializer.rb:42
-Dalli::Protocol::ValueSerializer::NAME_ERR_STR = T.let(T.unsafe(nil), String)
-
-# pkg:gem/dalli#lib/dalli/protocol/value_serializer.rb:16
-Dalli::Protocol::ValueSerializer::OPTIONS = T.let(T.unsafe(nil), Array)
-
-# TODO: Some of these error messages need to be validated. It's not obvious
-# that all of them are actually generated by the invoked code
-# in current systems
-#
-# pkg:gem/dalli#lib/dalli/protocol/value_serializer.rb:40
-Dalli::Protocol::ValueSerializer::TYPE_ERR_REGEXP = T.let(T.unsafe(nil), Regexp)
-
-# pkg:gem/dalli#lib/dalli.rb:34
-Dalli::QUIET = T.let(T.unsafe(nil), Symbol)
-
-# An implementation of a consistent hash ring, designed to minimize
-# the cache miss impact of adding or removing servers from the ring.
-# That is, adding or removing a server from the ring should impact
-# the key -> server mapping of ~ 1/N of the stored keys where N is the
-# number of servers in the ring. This is done by creating a large
-# number of "points" per server, distributed over the space
-# 0x00000000 - 0xFFFFFFFF. For a given key, we calculate the CRC32
-# hash, and find the nearest "point" that is less than or equal to the
-# the key's hash. In this implemetation, each "point" is represented
-# by a Dalli::Ring::Entry.
-#
-# pkg:gem/dalli#lib/dalli/ring.rb:19
-class Dalli::Ring
- # pkg:gem/dalli#lib/dalli/ring.rb:26
- def initialize(servers_arg, protocol_implementation, options); end
-
- # pkg:gem/dalli#lib/dalli/ring.rb:97
- def close; end
-
- # this is the default in libmemcached
- #
- # pkg:gem/dalli#lib/dalli/ring.rb:24
- def continuum; end
-
- # this is the default in libmemcached
- #
- # pkg:gem/dalli#lib/dalli/ring.rb:24
- def continuum=(_arg0); end
-
- # pkg:gem/dalli#lib/dalli/ring.rb:66
- def keys_grouped_by_server(key_arr); end
-
- # pkg:gem/dalli#lib/dalli/ring.rb:75
- def lock; end
-
- # pkg:gem/dalli#lib/dalli/ring.rb:84
- def pipeline_consume_and_ignore_responses; end
-
- # pkg:gem/dalli#lib/dalli/ring.rb:37
- def server_for_key(key); end
-
- # pkg:gem/dalli#lib/dalli/ring.rb:51
- def server_from_continuum(key); end
-
- # this is the default in libmemcached
- #
- # pkg:gem/dalli#lib/dalli/ring.rb:24
- def servers; end
-
- # this is the default in libmemcached
- #
- # pkg:gem/dalli#lib/dalli/ring.rb:24
- def servers=(_arg0); end
-
- # pkg:gem/dalli#lib/dalli/ring.rb:93
- def socket_timeout; end
-
- private
-
- # pkg:gem/dalli#lib/dalli/ring.rb:128
- def build_continuum(servers); end
-
- # pkg:gem/dalli#lib/dalli/ring.rb:113
- def entry_count_for(server, total_servers, total_weight); end
-
- # pkg:gem/dalli#lib/dalli/ring.rb:109
- def hash_for(key); end
-
- # pkg:gem/dalli#lib/dalli/ring.rb:117
- def server_for_hash_key(hash_key); end
-
- # pkg:gem/dalli#lib/dalli/ring.rb:103
- def threadsafe!; end
-end
-
-# Represents a point in the consistent hash ring implementation.
-#
-# pkg:gem/dalli#lib/dalli/ring.rb:144
-class Dalli::Ring::Entry
- # pkg:gem/dalli#lib/dalli/ring.rb:147
- def initialize(val, srv); end
-
- # pkg:gem/dalli#lib/dalli/ring.rb:145
- def server; end
-
- # pkg:gem/dalli#lib/dalli/ring.rb:145
- def value; end
-end
-
-# The number of entries on the continuum created per server
-# in an equally weighted scenario.
-#
-# pkg:gem/dalli#lib/dalli/ring.rb:22
-Dalli::Ring::POINTS_PER_SERVER = T.let(T.unsafe(nil), Integer)
-
-# no server available/alive error
-#
-# pkg:gem/dalli#lib/dalli.rb:16
-class Dalli::RingError < ::Dalli::DalliError; end
-
-# pkg:gem/dalli#lib/dalli/server.rb:5
-Dalli::Server = Dalli::Protocol::Binary
-
-# This module contains methods for validating and normalizing the servers
-# argument passed to the client. This argument can be nil, a string, or
-# an array of strings. Each string value in the argument can represent
-# a single server or a comma separated list of servers.
-#
-# If nil, it falls back to the values of ENV['MEMCACHE_SERVERS'] if the latter is
-# defined. If that environment value is not defined, a default of '127.0.0.1:11211'
-# is used.
-#
-# A server config string can take one of three forms:
-# * A colon separated string of (host, port, weight) where both port and
-# weight are optional (e.g. 'localhost', 'abc.com:12345', 'example.org:22222:3')
-# * A colon separated string of (UNIX socket, weight) where the weight is optional
-# (e.g. '/var/run/memcached/socket', '/tmp/xyz:3') (not supported on Windows)
-# * A URI with a 'memcached' protocol, which will typically include a username/password
-#
-# The methods in this module do not validate the format of individual server strings, but
-# rather normalize the argument into a compact array, wherein each array entry corresponds
-# to a single server config string. If that normalization is not possible, then an
-# ArgumentError is thrown.
-#
-# pkg:gem/dalli#lib/dalli/servers_arg_normalizer.rb:26
-module Dalli::ServersArgNormalizer
- class << self
- # pkg:gem/dalli#lib/dalli/servers_arg_normalizer.rb:40
- def apply_defaults(arg); end
-
- # Normalizes the argument into an array of servers.
- # If the argument is a string, or an array containing strings, it's expected that the URIs are comma separated e.g.
- # "memcache1.example.com:11211,memcache2.example.com:11211,memcache3.example.com:11211"
- #
- # pkg:gem/dalli#lib/dalli/servers_arg_normalizer.rb:34
- def normalize_servers(arg); end
-
- # pkg:gem/dalli#lib/dalli/servers_arg_normalizer.rb:46
- def validate_type(arg); end
- end
-end
-
-# pkg:gem/dalli#lib/dalli/servers_arg_normalizer.rb:28
-Dalli::ServersArgNormalizer::DEFAULT_SERVERS = T.let(T.unsafe(nil), Array)
-
-# pkg:gem/dalli#lib/dalli/servers_arg_normalizer.rb:27
-Dalli::ServersArgNormalizer::ENV_VAR_NAME = T.let(T.unsafe(nil), String)
-
-# Various socket implementations used by Dalli.
-#
-# pkg:gem/dalli#lib/dalli/socket.rb:10
-module Dalli::Socket; end
-
-# Common methods for all socket implementations.
-#
-# pkg:gem/dalli#lib/dalli/socket.rb:14
-module Dalli::Socket::InstanceMethods
- # pkg:gem/dalli#lib/dalli/socket.rb:39
- def append_to_buffer?(result); end
-
- # pkg:gem/dalli#lib/dalli/socket.rb:54
- def logged_options; end
-
- # pkg:gem/dalli#lib/dalli/socket.rb:46
- def nonblock_timed_out?(result); end
-
- # pkg:gem/dalli#lib/dalli/socket.rb:25
- def read_available; end
-
- # pkg:gem/dalli#lib/dalli/socket.rb:15
- def readfull(count); end
-end
-
-# pkg:gem/dalli#lib/dalli/socket.rb:53
-Dalli::Socket::InstanceMethods::FILTERED_OUT_OPTIONS = T.let(T.unsafe(nil), Array)
-
-# pkg:gem/dalli#lib/dalli/socket.rb:37
-Dalli::Socket::InstanceMethods::WAIT_RCS = T.let(T.unsafe(nil), Array)
-
-# Wraps the below TCP socket class in the case where the client
-# has configured a TLS/SSL connection between Dalli and the
-# Memcached server.
-#
-# pkg:gem/dalli#lib/dalli/socket.rb:64
-class Dalli::Socket::SSLSocket < ::OpenSSL::SSL::SSLSocket
- include ::Dalli::Socket::InstanceMethods
-
- # pkg:gem/dalli#lib/dalli/socket.rb:66
- def options; end
-end
-
-# A standard TCP socket between the Dalli client and the Memcached server.
-#
-# pkg:gem/dalli#lib/dalli/socket.rb:86
-class Dalli::Socket::TCP < ::TCPSocket
- include ::Dalli::Socket::InstanceMethods
-
- # options - supports enhanced logging in the case of a timeout
- #
- # pkg:gem/dalli#lib/dalli/socket.rb:89
- def options; end
-
- # options - supports enhanced logging in the case of a timeout
- #
- # pkg:gem/dalli#lib/dalli/socket.rb:89
- def options=(_arg0); end
-
- class << self
- # pkg:gem/dalli#lib/dalli/socket.rb:100
- def create_socket_with_timeout(host, port, options); end
-
- # pkg:gem/dalli#lib/dalli/socket.rb:119
- def init_socket_options(sock, options); end
-
- # pkg:gem/dalli#lib/dalli/socket.rb:91
- def open(host, port, options = T.unsafe(nil)); end
-
- # pkg:gem/dalli#lib/dalli/socket.rb:165
- def unverified_problem(ssl_context); end
-
- # Verification comes entirely from the caller's ssl_context, and a bare
- # SSLContext.new verifies nothing, so warn (once per process) when the
- # certificate or the hostname won't be checked.
- #
- # pkg:gem/dalli#lib/dalli/socket.rb:153
- def warn_if_unverified(ssl_context); end
-
- # Closes the TCP socket if the handshake fails or times out, so a failed
- # attempt doesn't hold a file descriptor until GC.
- #
- # pkg:gem/dalli#lib/dalli/socket.rb:137
- def wrapping_ssl_socket(tcp_socket, host, ssl_context); end
- end
-end
-
-# UNIX domain sockets are not supported on Windows platforms.
-#
-#
-# UNIX represents a UNIX domain socket, which is an interprocess communication
-# mechanism between processes on the same host. Used when the Memcached server
-# is running on the same machine as the Dalli client.
-#
-# pkg:gem/dalli#lib/dalli/socket.rb:190
-class Dalli::Socket::UNIX < ::UNIXSocket
- include ::Dalli::Socket::InstanceMethods
-
- # options - supports enhanced logging in the case of a timeout
- # server - used to support IO.select in the pipelined getter
- #
- # pkg:gem/dalli#lib/dalli/socket.rb:195
- def options; end
-
- # options - supports enhanced logging in the case of a timeout
- # server - used to support IO.select in the pipelined getter
- #
- # pkg:gem/dalli#lib/dalli/socket.rb:195
- def options=(_arg0); end
-
- class << self
- # pkg:gem/dalli#lib/dalli/socket.rb:197
- def open(path, options = T.unsafe(nil)); end
- end
-end
-
-# Make Dalli threadsafe by using a lock around all
-# public server methods.
-#
-# Dalli::Protocol::Binary.extend(Dalli::Threadsafe)
-#
-# pkg:gem/dalli#lib/dalli/options.rb:11
-module Dalli::Threadsafe
- # pkg:gem/dalli#lib/dalli/options.rb:22
- def alive?; end
-
- # pkg:gem/dalli#lib/dalli/options.rb:28
- def close; end
-
- # pkg:gem/dalli#lib/dalli/options.rb:60
- def init_threadsafe; end
-
- # pkg:gem/dalli#lib/dalli/options.rb:52
- def lock!; end
-
- # pkg:gem/dalli#lib/dalli/options.rb:46
- def pipeline_abort; end
-
- # pkg:gem/dalli#lib/dalli/options.rb:40
- def pipeline_next_responses; end
-
- # pkg:gem/dalli#lib/dalli/options.rb:34
- def pipeline_response_setup; end
-
- # pkg:gem/dalli#lib/dalli/options.rb:16
- def request(opcode, *args); end
-
- # pkg:gem/dalli#lib/dalli/options.rb:56
- def unlock!; end
-
- class << self
- # pkg:gem/dalli#lib/dalli/options.rb:12
- def extended(obj); end
- end
-end
-
-# application error in marshalling deserialization or decompression
-#
-# pkg:gem/dalli#lib/dalli.rb:22
-class Dalli::UnmarshalError < ::Dalli::DalliError; end
-
-# pkg:gem/dalli#lib/dalli/version.rb:4
-Dalli::VERSION = T.let(T.unsafe(nil), String)
-
-# payload too big for memcached
-#
-# pkg:gem/dalli#lib/dalli.rb:25
-class Dalli::ValueOverMaxSize < ::Dalli::DalliError; end
-
-module Process
- extend ::ConnectionPool::ForkTracker
- extend ::RedisClient::PIDCache::CoreExt
- extend ::Dalli::PIDCache::CoreExt
- extend ::ActiveSupport::ForkTracker::CoreExt
-end
-
-# pkg:gem/dalli#lib/rack/session/dalli.rb:8
-module Rack; end
-
-# pkg:gem/dalli#lib/rack/session/dalli.rb:9
-module Rack::Session; end
-
-# Rack::Session::Dalli provides memcached based session management.
-#
-# pkg:gem/dalli#lib/rack/session/dalli.rb:11
-class Rack::Session::Dalli < ::Rack::Session::Abstract::PersistedSecure
- # Brings in a new Rack::Session::Dalli middleware with the given
- # `:memcache_server`. The server is either a hostname, or a
- # host-with-port string in the form of "host_name:port", or an array of
- # such strings. For example:
- #
- # use Rack::Session::Dalli,
- # :memcache_server => "mc.example.com:1234"
- #
- # If no `:memcache_server` option is specified, Rack::Session::Dalli will
- # connect to localhost, port 11211 (the default memcached port). If
- # `:memcache_server` is set to nil, Dalli::Client will look for
- # ENV['MEMCACHE_SERVERS'] and use that value if it is available, or fall
- # back to the same default behavior described above.
- #
- # Rack::Session::Dalli accepts the same options as Dalli::Client, so
- # it's worth reviewing its documentation. Perhaps most importantly,
- # if you don't specify a `:namespace` option, Rack::Session::Dalli
- # will default to using 'rack:session'.
- #
- # It is not recommended to set `:expires_in`. Instead, use `:expire_after`,
- # which will control both the expiration of the client cookie as well
- # as the expiration of the corresponding entry in memcached.
- #
- # Rack::Session::Dalli also accepts a host of options that control how
- # the sessions and session cookies are managed, including the
- # aforementioned `:expire_after` option. Please see the documentation for
- # Rack::Session::Abstract::Persisted for a detailed explanation of these
- # options and their default values.
- #
- # Finally, if your web application is multithreaded, the
- # Rack::Session::Dalli middleware can become a source of contention. You
- # can use a connection pool of Dalli clients by passing in the
- # `:pool_size` and/or `:pool_timeout` options. For example:
- #
- # use Rack::Session::Dalli,
- # :memcache_server => "mc.example.com:1234",
- # :pool_size => 10
- #
- # You must include the `connection_pool` gem in your project if you wish
- # to use pool support. Please see the documentation for ConnectionPool
- # for more information about it and its default options (which would only
- # be applicable if you supplied one of the two options, but not both).
- #
- # pkg:gem/dalli#lib/rack/session/dalli.rb:64
- def initialize(app, options = T.unsafe(nil)); end
-
- # pkg:gem/dalli#lib/rack/session/dalli.rb:12
- def data; end
-
- # pkg:gem/dalli#lib/rack/session/dalli.rb:94
- def delete_session(_req, sid, options); end
-
- # pkg:gem/dalli#lib/rack/session/dalli.rb:73
- def find_session(_req, sid); end
-
- # pkg:gem/dalli#lib/rack/session/dalli.rb:82
- def write_session(_req, sid, session, options); end
-
- private
-
- # pkg:gem/dalli#lib/rack/session/dalli.rb:135
- def build_data_source(options); end
-
- # pkg:gem/dalli#lib/rack/session/dalli.rb:117
- def create_sid_with_empty_session(client); end
-
- # pkg:gem/dalli#lib/rack/session/dalli.rb:170
- def ensure_connection_pool_added!; end
-
- # pkg:gem/dalli#lib/rack/session/dalli.rb:108
- def existing_session_for_sid(client, sid); end
-
- # pkg:gem/dalli#lib/rack/session/dalli.rb:148
- def extract_dalli_options(options); end
-
- # pkg:gem/dalli#lib/rack/session/dalli.rb:126
- def generate_sid_with(client); end
-
- # pkg:gem/dalli#lib/rack/session/dalli.rb:104
- def memcached_key_from_sid(sid); end
-
- # pkg:gem/dalli#lib/rack/session/dalli.rb:157
- def retrieve_client_options(options); end
-
- # pkg:gem/dalli#lib/rack/session/dalli.rb:163
- def retrieve_pool_options(options); end
-
- # pkg:gem/dalli#lib/rack/session/dalli.rb:190
- def ttl(expire_after); end
-
- # pkg:gem/dalli#lib/rack/session/dalli.rb:178
- def with_dalli_client(result_on_error = T.unsafe(nil), &block); end
-end
-
-# Don't freeze this until we fix the specs/implementation
-#
-# pkg:gem/dalli#lib/rack/session/dalli.rb:16
-Rack::Session::Dalli::DEFAULT_DALLI_OPTIONS = T.let(T.unsafe(nil), Hash)
diff --git a/sorbet/rbi/gems/minitest-mock@5.27.0.rbi b/sorbet/rbi/gems/minitest-mock@5.27.0.rbi
new file mode 100644
index 0000000..3c5bd7d
--- /dev/null
+++ b/sorbet/rbi/gems/minitest-mock@5.27.0.rbi
@@ -0,0 +1,153 @@
+# typed: true
+
+# DO NOT EDIT MANUALLY
+# This is an autogenerated file for types exported from the `minitest-mock` gem.
+# Please instead update this file by running `bin/tapioca gem minitest-mock`.
+
+
+# pkg:gem/minitest-mock#lib/minitest/mock.rb:3
+module Minitest; end
+
+# pkg:gem/minitest-mock#lib/minitest/mock.rb:239
+module Minitest::Assertions
+ # Assert that the mock verifies correctly and fail if not.
+ #
+ # pkg:gem/minitest-mock#lib/minitest/mock.rb:243
+ def assert_mock(mock, msg = T.unsafe(nil)); end
+end
+
+# pkg:gem/minitest-mock#lib/minitest/mock.rb:251
+module Minitest::Expectations; end
+
+# A simple and clean mock object framework.
+#
+# All mock objects are an instance of Mock
+#
+# pkg:gem/minitest-mock#lib/minitest/mock.rb:10
+class Minitest::Mock
+ # pkg:gem/minitest-mock#lib/minitest/mock.rb:47
+ def initialize(delegator = T.unsafe(nil)); end
+
+ # pkg:gem/minitest-mock#lib/minitest/mock.rb:36
+ def ===(*args, **kwargs, &b); end
+
+ # pkg:gem/minitest-mock#lib/minitest/mock.rb:119
+ def __call(name, data); end
+
+ # pkg:gem/minitest-mock#lib/minitest/mock.rb:13
+ def __respond_to?(*_arg0); end
+
+ # pkg:gem/minitest-mock#lib/minitest/mock.rb:36
+ def class(*args, **kwargs, &b); end
+
+ # Expect that method +name+ is called, optionally with +args+ (and
+ # +kwargs+ or a +blk+), and returns +retval+.
+ #
+ # @mock.expect(:meaning_of_life, 42)
+ # @mock.meaning_of_life # => 42
+ #
+ # @mock.expect(:do_something_with, true, [some_obj, true])
+ # @mock.do_something_with(some_obj, true) # => true
+ #
+ # @mock.expect(:do_something_else, true) do |a1, a2|
+ # a1 == "buggs" && a2 == :bunny
+ # end
+ #
+ # +args+ is compared to the expected args using case equality (ie, the
+ # '===' operator), allowing for less specific expectations.
+ #
+ # @mock.expect(:uses_any_string, true, [String])
+ # @mock.uses_any_string("foo") # => true
+ # @mock.verify # => true
+ #
+ # @mock.expect(:uses_one_string, true, ["foo"])
+ # @mock.uses_one_string("bar") # => raises MockExpectationError
+ #
+ # If a method will be called multiple times, specify a new expect for each one.
+ # They will be used in the order you define them.
+ #
+ # @mock.expect(:ordinal_increment, 'first')
+ # @mock.expect(:ordinal_increment, 'second')
+ #
+ # @mock.ordinal_increment # => 'first'
+ # @mock.ordinal_increment # => 'second'
+ # @mock.ordinal_increment # => raises MockExpectationError "No more expects available for :ordinal_increment"
+ #
+ # pkg:gem/minitest-mock#lib/minitest/mock.rb:90
+ def expect(name, retval, args = T.unsafe(nil), **kwargs, &blk); end
+
+ # pkg:gem/minitest-mock#lib/minitest/mock.rb:36
+ def inspect(*args, **kwargs, &b); end
+
+ # pkg:gem/minitest-mock#lib/minitest/mock.rb:36
+ def instance_eval(*args, **kwargs, &b); end
+
+ # pkg:gem/minitest-mock#lib/minitest/mock.rb:36
+ def instance_variables(*args, **kwargs, &b); end
+
+ # pkg:gem/minitest-mock#lib/minitest/mock.rb:149
+ def method_missing(sym, *args, **kwargs, &block); end
+
+ # pkg:gem/minitest-mock#lib/minitest/mock.rb:36
+ def object_id(*args, **kwargs, &b); end
+
+ # pkg:gem/minitest-mock#lib/minitest/mock.rb:36
+ def public_send(*args, **kwargs, &b); end
+
+ # pkg:gem/minitest-mock#lib/minitest/mock.rb:231
+ def respond_to?(sym, include_private = T.unsafe(nil)); end
+
+ # pkg:gem/minitest-mock#lib/minitest/mock.rb:36
+ def send(*args, **kwargs, &b); end
+
+ # pkg:gem/minitest-mock#lib/minitest/mock.rb:36
+ def to_s(*args, **kwargs, &b); end
+
+ # Verify that all methods were called as expected. Raises
+ # +MockExpectationError+ if the mock object was not called as
+ # expected.
+ #
+ # pkg:gem/minitest-mock#lib/minitest/mock.rb:139
+ def verify; end
+
+ private
+
+ # pkg:gem/minitest-mock#lib/minitest/mock.rb:36
+ def respond_to_missing?(*args, **kwargs, &b); end
+end
+
+# pkg:gem/minitest-mock#lib/minitest/mock.rb:11
+Minitest::Mock::VERSION = T.let(T.unsafe(nil), String)
+
+# pkg:gem/minitest-mock#lib/minitest/mock.rb:1
+class MockExpectationError < ::StandardError; end
+
+# Object extensions for Minitest::Mock.
+#
+# pkg:gem/minitest-mock#lib/minitest/mock.rb:266
+class Object < ::BasicObject
+ include ::Kernel
+ include ::PP::ObjectMixin
+
+ # Add a temporary stubbed method replacing +name+ for the duration
+ # of the +block+. If +val_or_callable+ responds to #call, then it
+ # returns the result of calling it, otherwise returns the value
+ # as-is. If stubbed method yields a block, +block_args+ will be
+ # passed along. Cleans up the stub at the end of the +block+. The
+ # method +name+ must exist before stubbing.
+ #
+ # def test_stale_eh
+ # obj_under_test = Something.new
+ # refute obj_under_test.stale?
+ #
+ # Time.stub :now, Time.at(0) do
+ # assert obj_under_test.stale?
+ # end
+ # end
+ # --
+ # NOTE: keyword args in callables are NOT checked for correctness
+ # against the existing method. Too many edge cases to be worth it.
+ #
+ # pkg:gem/minitest-mock#lib/minitest/mock.rb:288
+ def stub(name, val_or_callable, *block_args, **block_kwargs, &block); end
+end
diff --git a/sorbet/rbi/gems/minitest@5.27.0.rbi b/sorbet/rbi/gems/minitest@6.1.0.rbi
similarity index 66%
rename from sorbet/rbi/gems/minitest@5.27.0.rbi
rename to sorbet/rbi/gems/minitest@6.1.0.rbi
index 4ac4e87..65c611c 100644
--- a/sorbet/rbi/gems/minitest@5.27.0.rbi
+++ b/sorbet/rbi/gems/minitest@6.1.0.rbi
@@ -7,23 +7,20 @@
# The top-level namespace for Minitest. Also the location of the main
# runtime. See +Minitest.run+ for more information.
+# this is gonna break some shit?
+# for ruby 3
# :stopdoc:
+# :startdoc:
#
# pkg:gem/minitest#lib/minitest/parallel.rb:3
module Minitest
class << self
- # Internal run method. Responsible for telling all Runnable
- # sub-classes to run.
- #
- # pkg:gem/minitest#lib/minitest.rb:337
- def __run(reporter, options); end
-
# A simple hook allowing you to run a block of code after everything
# is done running. Eg:
#
# Minitest.after_run { p $debugging_info }
#
- # pkg:gem/minitest#lib/minitest.rb:96
+ # pkg:gem/minitest#lib/minitest.rb:106
def after_run(&block); end
# pkg:gem/minitest#lib/minitest.rb:20
@@ -32,9 +29,12 @@ module Minitest
# pkg:gem/minitest#lib/minitest.rb:20
def allow_fork=(_arg0); end
- # Registers Minitest to run at process exit
+ # Registers Minitest to run at process exit. Usually called by
+ # requiring autorun:
+ #
+ # require "minitest/autorun"
#
- # pkg:gem/minitest#lib/minitest.rb:70
+ # pkg:gem/minitest#lib/minitest.rb:72
def autorun; end
# pkg:gem/minitest#lib/minitest.rb:20
@@ -46,10 +46,10 @@ module Minitest
# pkg:gem/minitest#lib/minitest.rb:19
def cattr_accessor(name); end
- # pkg:gem/minitest#lib/minitest.rb:1231
+ # pkg:gem/minitest#lib/minitest.rb:1229
def clock_time; end
- # pkg:gem/minitest#lib/minitest.rb:317
+ # pkg:gem/minitest#lib/minitest.rb:352
def empty_run!(options); end
# pkg:gem/minitest#lib/minitest.rb:20
@@ -58,7 +58,7 @@ module Minitest
# pkg:gem/minitest#lib/minitest.rb:20
def extensions=(_arg0); end
- # pkg:gem/minitest#lib/minitest.rb:350
+ # pkg:gem/minitest#lib/minitest.rb:385
def filter_backtrace(bt); end
# pkg:gem/minitest#lib/minitest.rb:20
@@ -67,10 +67,20 @@ module Minitest
# pkg:gem/minitest#lib/minitest.rb:20
def info_signal=(_arg0); end
- # pkg:gem/minitest#lib/minitest.rb:124
+ # pkg:gem/minitest#lib/minitest.rb:145
def init_plugins(options); end
- # pkg:gem/minitest#lib/minitest.rb:108
+ # Returns true if Minitest.autorun has been called.
+ #
+ # pkg:gem/minitest#lib/minitest.rb:96
+ def installed_at_exit?; end
+
+ # Manually load plugins by name.
+ #
+ # pkg:gem/minitest#lib/minitest.rb:113
+ def load(*names); end
+
+ # pkg:gem/minitest#lib/minitest.rb:129
def load_plugins; end
# pkg:gem/minitest#lib/minitest.rb:20
@@ -79,12 +89,12 @@ module Minitest
# pkg:gem/minitest#lib/minitest.rb:20
def parallel_executor=(_arg0); end
- # pkg:gem/minitest#lib/minitest.rb:142
+ # pkg:gem/minitest#lib/minitest.rb:163
def process_args(args = T.unsafe(nil)); end
# Register a plugin to be used. Does NOT require / load it.
#
- # pkg:gem/minitest#lib/minitest.rb:103
+ # pkg:gem/minitest#lib/minitest.rb:124
def register_plugin(name_or_mod); end
# pkg:gem/minitest#lib/minitest.rb:20
@@ -99,25 +109,30 @@ module Minitest
#
# The overall structure of a run looks like this:
#
+ # [Minitest.load_plugins] optional, called by user, or require what you want
# Minitest.autorun
# Minitest.run(args)
- # Minitest.load_plugins
# Minitest.process_args
# Minitest.init_plugins
- # Minitest.__run(reporter, options)
+ # Minitest.run_all_suites(reporter, options)
# Runnable.runnables.each |runnable_klass|
- # runnable_klass.run(reporter, options)
- # filtered_methods = runnable_methods.select {...}.reject {...}
+ # runnable_klass.run_suite(reporter, options)
+ # filtered_methods = runnable_klass.filter_runnable_methods options
# filtered_methods.each |runnable_method|
- # runnable_klass.run_one_method(self, runnable_method, reporter)
- # Minitest.run_one_method(runnable_klass, runnable_method)
- # runnable_klass.new(runnable_method).run
+ # runnable_klass.run(self, runnable_method, reporter)
+ # runnable_klass.new(runnable_method).run
+ #
+ # See also:
+ # * Minitest::Test#run
#
- # pkg:gem/minitest#lib/minitest.rb:282
+ # pkg:gem/minitest#lib/minitest.rb:319
def run(args = T.unsafe(nil)); end
- # pkg:gem/minitest#lib/minitest.rb:1222
- def run_one_method(klass, method_name); end
+ # Internal run method. Responsible for telling all Runnable
+ # sub-classes to run.
+ #
+ # pkg:gem/minitest#lib/minitest.rb:372
+ def run_all_suites(reporter, options); end
# pkg:gem/minitest#lib/minitest.rb:20
def seed; end
@@ -130,20 +145,20 @@ end
# Defines the API for Reporters. Subclass this and override whatever
# you want. Go nuts.
#
-# pkg:gem/minitest#lib/minitest.rb:702
+# pkg:gem/minitest#lib/minitest.rb:727
class Minitest::AbstractReporter
- # pkg:gem/minitest#lib/minitest.rb:704
+ # pkg:gem/minitest#lib/minitest.rb:729
def initialize; end
# Did this run pass?
#
- # pkg:gem/minitest#lib/minitest.rb:739
+ # pkg:gem/minitest#lib/minitest.rb:764
def passed?; end
# About to start running a test. This allows a reporter to show
# that it is starting or that we are in the middle of a test run.
#
- # pkg:gem/minitest#lib/minitest.rb:718
+ # pkg:gem/minitest#lib/minitest.rb:743
def prerecord(klass, name); end
# Output and record the result of the test. Call
@@ -151,43 +166,43 @@ class Minitest::AbstractReporter
# result character string. Stores the result of the run if the run
# did not pass.
#
- # pkg:gem/minitest#lib/minitest.rb:727
+ # pkg:gem/minitest#lib/minitest.rb:752
def record(result); end
# Outputs the summary of the run.
#
- # pkg:gem/minitest#lib/minitest.rb:733
+ # pkg:gem/minitest#lib/minitest.rb:758
def report; end
# Starts reporting on the run.
#
- # pkg:gem/minitest#lib/minitest.rb:711
+ # pkg:gem/minitest#lib/minitest.rb:736
def start; end
- # pkg:gem/minitest#lib/minitest.rb:743
+ # pkg:gem/minitest#lib/minitest.rb:768
def synchronize(&block); end
end
# Represents run failures.
#
-# pkg:gem/minitest#lib/minitest.rb:1035
+# pkg:gem/minitest#lib/minitest.rb:1059
class Minitest::Assertion < ::Exception
- # pkg:gem/minitest#lib/minitest.rb:1038
+ # pkg:gem/minitest#lib/minitest.rb:1062
def error; end
# Where was this run before an assertion was raised?
#
- # pkg:gem/minitest#lib/minitest.rb:1045
+ # pkg:gem/minitest#lib/minitest.rb:1069
def location; end
- # pkg:gem/minitest#lib/minitest.rb:1053
+ # pkg:gem/minitest#lib/minitest.rb:1077
def result_code; end
- # pkg:gem/minitest#lib/minitest.rb:1057
+ # pkg:gem/minitest#lib/minitest.rb:1081
def result_label; end
end
-# pkg:gem/minitest#lib/minitest.rb:1036
+# pkg:gem/minitest#lib/minitest.rb:1060
Minitest::Assertion::RE = T.let(T.unsafe(nil), Regexp)
# Minitest Assertions. All assertion methods accept a +msg+ which is
@@ -201,15 +216,9 @@ Minitest::Assertion::RE = T.let(T.unsafe(nil), Regexp)
#
# pkg:gem/minitest#lib/minitest/assertions.rb:16
module Minitest::Assertions
- # pkg:gem/minitest#lib/minitest/assertions.rb:199
- def _caller_uplevel; end
-
# pkg:gem/minitest#lib/minitest/assertions.rb:181
def _synchronize; end
- # pkg:gem/minitest#lib/minitest/assertions.rb:194
- def _where; end
-
# Fails unless +test+ is truthy.
#
# pkg:gem/minitest#lib/minitest/assertions.rb:171
@@ -232,7 +241,7 @@ module Minitest::Assertions
#
# See also: Minitest::Assertions.diff
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:220
+ # pkg:gem/minitest#lib/minitest/assertions.rb:206
def assert_equal(exp, act, msg = T.unsafe(nil)); end
# For comparing Floats. Fails unless +exp+ and +act+ are within +delta+
@@ -240,50 +249,45 @@ module Minitest::Assertions
#
# assert_in_delta Math::PI, (22.0 / 7.0), 0.01
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:241
+ # pkg:gem/minitest#lib/minitest/assertions.rb:220
def assert_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end
# For comparing Floats. Fails unless +exp+ and +act+ have a relative
# error less than +epsilon+.
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:253
+ # pkg:gem/minitest#lib/minitest/assertions.rb:232
def assert_in_epsilon(exp, act, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end
# Fails unless +collection+ includes +obj+.
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:260
+ # pkg:gem/minitest#lib/minitest/assertions.rb:239
def assert_includes(collection, obj, msg = T.unsafe(nil)); end
# Fails unless +obj+ is an instance of +cls+.
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:271
+ # pkg:gem/minitest#lib/minitest/assertions.rb:249
def assert_instance_of(cls, obj, msg = T.unsafe(nil)); end
# Fails unless +obj+ is a kind of +cls+.
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:282
+ # pkg:gem/minitest#lib/minitest/assertions.rb:260
def assert_kind_of(cls, obj, msg = T.unsafe(nil)); end
# Fails unless +matcher+ =~ +obj+.
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:293
+ # pkg:gem/minitest#lib/minitest/assertions.rb:271
def assert_match(matcher, obj, msg = T.unsafe(nil)); end
- # Assert that the mock verifies correctly and fail if not.
- #
- # pkg:gem/minitest#lib/minitest/mock.rb:241
- def assert_mock(mock, msg = T.unsafe(nil)); end
-
# Fails unless +obj+ is nil
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:305
+ # pkg:gem/minitest#lib/minitest/assertions.rb:283
def assert_nil(obj, msg = T.unsafe(nil)); end
# For testing with binary operators. Eg:
#
# assert_operator 5, :<=, 4
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:315
+ # pkg:gem/minitest#lib/minitest/assertions.rb:293
def assert_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end
# Fails if stdout or stderr do not output the expected results.
@@ -297,12 +301,12 @@ module Minitest::Assertions
#
# See also: #assert_silent
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:333
+ # pkg:gem/minitest#lib/minitest/assertions.rb:312
def assert_output(stdout = T.unsafe(nil), stderr = T.unsafe(nil)); end
# Fails unless +path+ exists.
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:357
+ # pkg:gem/minitest#lib/minitest/assertions.rb:336
def assert_path_exists(path, msg = T.unsafe(nil)); end
# For testing with pattern matching (only supported with Ruby 3.0 and later)
@@ -318,7 +322,7 @@ module Minitest::Assertions
# generates a test failure. Any other exception will be raised as normal and generate a test
# error.
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:376
+ # pkg:gem/minitest#lib/minitest/assertions.rb:355
def assert_pattern; end
# For testing with predicates. Eg:
@@ -329,7 +333,7 @@ module Minitest::Assertions
#
# str.must_be :empty?
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:394
+ # pkg:gem/minitest#lib/minitest/assertions.rb:373
def assert_predicate(o1, op, msg = T.unsafe(nil)); end
# Fails unless the block raises one of +exp+. Returns the
@@ -353,37 +357,30 @@ module Minitest::Assertions
#
# assert_equal 'This is really bad', error.message
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:421
+ # pkg:gem/minitest#lib/minitest/assertions.rb:403
def assert_raises(*exp); end
# Fails unless +obj+ responds to +meth+.
# include_all defaults to false to match Object#respond_to?
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:453
+ # pkg:gem/minitest#lib/minitest/assertions.rb:438
def assert_respond_to(obj, meth, msg = T.unsafe(nil), include_all: T.unsafe(nil)); end
# Fails unless +exp+ and +act+ are #equal?
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:463
+ # pkg:gem/minitest#lib/minitest/assertions.rb:446
def assert_same(exp, act, msg = T.unsafe(nil)); end
- # +send_ary+ is a receiver, message and arguments.
- #
- # Fails unless the call returns a true value
- #
- # pkg:gem/minitest#lib/minitest/assertions.rb:476
- def assert_send(send_ary, m = T.unsafe(nil)); end
-
# Fails if the block outputs anything to stderr or stdout.
#
# See also: #assert_output
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:491
+ # pkg:gem/minitest#lib/minitest/assertions.rb:462
def assert_silent; end
# Fails unless the block throws +sym+
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:500
+ # pkg:gem/minitest#lib/minitest/assertions.rb:471
def assert_throws(sym, msg = T.unsafe(nil)); end
# Captures $stdout and $stderr into strings:
@@ -400,7 +397,7 @@ module Minitest::Assertions
# capture IO for subprocesses. Use #capture_subprocess_io for
# that.
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:536
+ # pkg:gem/minitest#lib/minitest/assertions.rb:507
def capture_io; end
# Captures $stdout and $stderr into strings, using Tempfile to
@@ -417,7 +414,7 @@ module Minitest::Assertions
# NOTE: This method is approximately 10x slower than #capture_io so
# only use it when you need to test the output of a subprocess.
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:569
+ # pkg:gem/minitest#lib/minitest/assertions.rb:540
def capture_subprocess_io; end
# Returns a diff between +exp+ and +act+. If there is no known
@@ -432,24 +429,27 @@ module Minitest::Assertions
# Returns details for exception +e+
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:601
+ # pkg:gem/minitest#lib/minitest/assertions.rb:572
def exception_details(e, msg); end
# Fails after a given date (in the local time zone). This allows
# you to put time-bombs in your tests if you need to keep
# something around until a later date lest you forget about it.
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:617
+ # pkg:gem/minitest#lib/minitest/assertions.rb:588
def fail_after(y, m, d, msg); end
# Fails with +msg+.
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:624
+ # pkg:gem/minitest#lib/minitest/assertions.rb:595
def flunk(msg = T.unsafe(nil)); end
- # Returns a proc that will output +msg+ along with the default message.
+ # Returns a proc that delays generation of an output message. If
+ # +msg+ is a proc (eg, from another +message+ call) return +msg+
+ # as-is. Otherwise, return a proc that will output +msg+ along
+ # with the value of the result of the block passed to +message+.
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:632
+ # pkg:gem/minitest#lib/minitest/assertions.rb:606
def message(msg = T.unsafe(nil), ending = T.unsafe(nil), &default); end
# This returns a human-readable version of +obj+. By default
@@ -471,62 +471,62 @@ module Minitest::Assertions
# used for counting assertions
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:643
+ # pkg:gem/minitest#lib/minitest/assertions.rb:617
def pass(_msg = T.unsafe(nil)); end
# Fails if +test+ is truthy.
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:650
+ # pkg:gem/minitest#lib/minitest/assertions.rb:624
def refute(test, msg = T.unsafe(nil)); end
# Fails if +obj+ is empty.
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:658
+ # pkg:gem/minitest#lib/minitest/assertions.rb:632
def refute_empty(obj, msg = T.unsafe(nil)); end
# Fails if exp == act.
#
# For floats use refute_in_delta.
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:669
+ # pkg:gem/minitest#lib/minitest/assertions.rb:642
def refute_equal(exp, act, msg = T.unsafe(nil)); end
# For comparing Floats. Fails if +exp+ is within +delta+ of +act+.
#
# refute_in_delta Math::PI, (22.0 / 7.0)
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:681
+ # pkg:gem/minitest#lib/minitest/assertions.rb:654
def refute_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end
# For comparing Floats. Fails if +exp+ and +act+ have a relative error
# less than +epsilon+.
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:693
+ # pkg:gem/minitest#lib/minitest/assertions.rb:666
def refute_in_epsilon(exp, act, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end
- # Fails if +collection+ includes +obj+.
+ # Fails if +obj+ includes +sub+.
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:700
- def refute_includes(collection, obj, msg = T.unsafe(nil)); end
+ # pkg:gem/minitest#lib/minitest/assertions.rb:673
+ def refute_includes(obj, sub, msg = T.unsafe(nil)); end
# Fails if +obj+ is an instance of +cls+.
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:711
+ # pkg:gem/minitest#lib/minitest/assertions.rb:681
def refute_instance_of(cls, obj, msg = T.unsafe(nil)); end
# Fails if +obj+ is a kind of +cls+.
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:721
+ # pkg:gem/minitest#lib/minitest/assertions.rb:691
def refute_kind_of(cls, obj, msg = T.unsafe(nil)); end
# Fails if +matcher+ =~ +obj+.
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:729
+ # pkg:gem/minitest#lib/minitest/assertions.rb:699
def refute_match(matcher, obj, msg = T.unsafe(nil)); end
# Fails if +obj+ is nil.
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:739
+ # pkg:gem/minitest#lib/minitest/assertions.rb:708
def refute_nil(obj, msg = T.unsafe(nil)); end
# Fails if +o1+ is not +op+ +o2+. Eg:
@@ -534,12 +534,12 @@ module Minitest::Assertions
# refute_operator 1, :>, 2 #=> pass
# refute_operator 1, :<, 2 #=> fail
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:771
+ # pkg:gem/minitest#lib/minitest/assertions.rb:740
def refute_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end
# Fails if +path+ exists.
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:780
+ # pkg:gem/minitest#lib/minitest/assertions.rb:750
def refute_path_exists(path, msg = T.unsafe(nil)); end
# For testing with pattern matching (only supported with Ruby 3.0 and later)
@@ -553,7 +553,7 @@ module Minitest::Assertions
# This assertion expects a NoMatchingPatternError exception, and will fail if none is raised. Any
# other exceptions will be raised as normal and generate a test error.
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:756
+ # pkg:gem/minitest#lib/minitest/assertions.rb:725
def refute_pattern; end
# For testing with predicates.
@@ -564,25 +564,25 @@ module Minitest::Assertions
#
# str.wont_be :empty?
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:794
+ # pkg:gem/minitest#lib/minitest/assertions.rb:764
def refute_predicate(o1, op, msg = T.unsafe(nil)); end
# Fails if +obj+ responds to the message +meth+.
# include_all defaults to false to match Object#respond_to?
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:803
+ # pkg:gem/minitest#lib/minitest/assertions.rb:774
def refute_respond_to(obj, meth, msg = T.unsafe(nil), include_all: T.unsafe(nil)); end
# Fails if +exp+ is the same (by object identity) as +act+.
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:812
+ # pkg:gem/minitest#lib/minitest/assertions.rb:783
def refute_same(exp, act, msg = T.unsafe(nil)); end
# Skips the current run. If run in verbose-mode, the skipped run
# gets listed at the end of the run but doesn't cause a failure
# exit code.
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:825
+ # pkg:gem/minitest#lib/minitest/assertions.rb:796
def skip(msg = T.unsafe(nil), _ignored = T.unsafe(nil)); end
# Skips the current run until a given date (in the local time
@@ -590,12 +590,12 @@ module Minitest::Assertions
# date, but still holds you accountable and prevents you from
# forgetting it.
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:837
+ # pkg:gem/minitest#lib/minitest/assertions.rb:808
def skip_until(y, m, d, msg); end
# Was this testcase skipped? Meant for #teardown.
#
- # pkg:gem/minitest#lib/minitest/assertions.rb:846
+ # pkg:gem/minitest#lib/minitest/assertions.rb:817
def skipped?; end
# Returns things to diff [expect, butwas], or [nil, nil] if nothing to diff.
@@ -624,8 +624,8 @@ module Minitest::Assertions
end
end
-# pkg:gem/minitest#lib/minitest/assertions.rb:205
-Minitest::Assertions::E = T.let(T.unsafe(nil), String)
+# pkg:gem/minitest#lib/minitest/assertions.rb:379
+Minitest::Assertions::NO_RE_MSG = T.let(T.unsafe(nil), String)
# pkg:gem/minitest#lib/minitest/assertions.rb:17
Minitest::Assertions::UNDEFINED = T.let(T.unsafe(nil), Object)
@@ -634,69 +634,69 @@ Minitest::Assertions::UNDEFINED = T.let(T.unsafe(nil), Object)
#
# See Minitest.backtrace_filter=.
#
-# pkg:gem/minitest#lib/minitest.rb:1190
+# pkg:gem/minitest#lib/minitest.rb:1194
class Minitest::BacktraceFilter
- # pkg:gem/minitest#lib/minitest.rb:1199
+ # pkg:gem/minitest#lib/minitest.rb:1203
def initialize(regexp = T.unsafe(nil)); end
# Filter +bt+ to something useful. Returns the whole thing if
# $DEBUG (ruby) or $MT_DEBUG (env).
#
- # pkg:gem/minitest#lib/minitest.rb:1207
+ # pkg:gem/minitest#lib/minitest.rb:1211
def filter(bt); end
# The regular expression to use to filter backtraces. Defaults to +MT_RE+.
#
- # pkg:gem/minitest#lib/minitest.rb:1197
+ # pkg:gem/minitest#lib/minitest.rb:1201
def regexp; end
# The regular expression to use to filter backtraces. Defaults to +MT_RE+.
#
- # pkg:gem/minitest#lib/minitest.rb:1197
+ # pkg:gem/minitest#lib/minitest.rb:1201
def regexp=(_arg0); end
end
-# pkg:gem/minitest#lib/minitest.rb:1192
+# pkg:gem/minitest#lib/minitest.rb:1196
Minitest::BacktraceFilter::MT_RE = T.let(T.unsafe(nil), Regexp)
# Dispatch to multiple reporters as one.
#
-# pkg:gem/minitest#lib/minitest.rb:984
+# pkg:gem/minitest#lib/minitest.rb:1009
class Minitest::CompositeReporter < ::Minitest::AbstractReporter
- # pkg:gem/minitest#lib/minitest.rb:990
+ # pkg:gem/minitest#lib/minitest.rb:1015
def initialize(*reporters); end
# Add another reporter to the mix.
#
- # pkg:gem/minitest#lib/minitest.rb:1002
+ # pkg:gem/minitest#lib/minitest.rb:1027
def <<(reporter); end
- # pkg:gem/minitest#lib/minitest.rb:995
+ # pkg:gem/minitest#lib/minitest.rb:1020
def io; end
- # pkg:gem/minitest#lib/minitest.rb:1006
+ # pkg:gem/minitest#lib/minitest.rb:1031
def passed?; end
- # pkg:gem/minitest#lib/minitest.rb:1014
+ # pkg:gem/minitest#lib/minitest.rb:1039
def prerecord(klass, name); end
- # pkg:gem/minitest#lib/minitest.rb:1021
+ # pkg:gem/minitest#lib/minitest.rb:1045
def record(result); end
- # pkg:gem/minitest#lib/minitest.rb:1027
+ # pkg:gem/minitest#lib/minitest.rb:1051
def report; end
# The list of reporters to dispatch to.
#
- # pkg:gem/minitest#lib/minitest.rb:988
+ # pkg:gem/minitest#lib/minitest.rb:1013
def reporters; end
# The list of reporters to dispatch to.
#
- # pkg:gem/minitest#lib/minitest.rb:988
+ # pkg:gem/minitest#lib/minitest.rb:1013
def reporters=(_arg0); end
- # pkg:gem/minitest#lib/minitest.rb:1010
+ # pkg:gem/minitest#lib/minitest.rb:1035
def start; end
end
@@ -711,27 +711,6 @@ module Minitest::Compress
def compress(orig); end
end
-# It's where you hide your "assertions".
-#
-# Please note, because of the way that expectations are implemented,
-# all expectations (eg must_equal) are dependent upon a thread local
-# variable +:current_spec+. If your specs rely on mixing threads into
-# the specs themselves, you're better off using assertions or the new
-# _(value) wrapper. For example:
-#
-# it "should still work in threads" do
-# my_threaded_thingy do
-# (1+1).must_equal 2 # bad
-# assert_equal 2, 1+1 # good
-# _(1 + 1).must_equal 2 # good
-# value(1 + 1).must_equal 2 # good, also #expect
-# _ { 1 + "1" }.must_raise TypeError # good
-# end
-# end
-#
-# pkg:gem/minitest#lib/minitest/mock.rb:249
-module Minitest::Expectations; end
-
# Provides a simple set of guards that you can use in your tests
# to skip execution if it is not applicable. These methods are
# mixed into Test as both instance and class methods so you
@@ -746,136 +725,29 @@ module Minitest::Expectations; end
# # ... lots of test methods ...
# end
#
-# pkg:gem/minitest#lib/minitest.rb:1134
+# pkg:gem/minitest#lib/minitest.rb:1158
module Minitest::Guard
# Is this running on jruby?
#
- # pkg:gem/minitest#lib/minitest.rb:1139
+ # pkg:gem/minitest#lib/minitest.rb:1163
def jruby?(platform = T.unsafe(nil)); end
- # Is this running on maglev?
- #
- # pkg:gem/minitest#lib/minitest.rb:1146
- def maglev?(platform = T.unsafe(nil)); end
-
# Is this running on mri?
#
- # pkg:gem/minitest#lib/minitest.rb:1156
+ # pkg:gem/minitest#lib/minitest.rb:1170
def mri?(platform = T.unsafe(nil)); end
# Is this running on macOS?
#
- # pkg:gem/minitest#lib/minitest.rb:1163
+ # pkg:gem/minitest#lib/minitest.rb:1177
def osx?(platform = T.unsafe(nil)); end
- # Is this running on rubinius?
- #
- # pkg:gem/minitest#lib/minitest.rb:1170
- def rubinius?(platform = T.unsafe(nil)); end
-
# Is this running on windows?
#
- # pkg:gem/minitest#lib/minitest.rb:1180
+ # pkg:gem/minitest#lib/minitest.rb:1184
def windows?(platform = T.unsafe(nil)); end
end
-# A simple and clean mock object framework.
-#
-# All mock objects are an instance of Mock
-#
-# pkg:gem/minitest#lib/minitest/mock.rb:10
-class Minitest::Mock
- # pkg:gem/minitest#lib/minitest/mock.rb:45
- def initialize(delegator = T.unsafe(nil)); end
-
- # pkg:gem/minitest#lib/minitest/mock.rb:34
- def ===(*args, **kwargs, &b); end
-
- # pkg:gem/minitest#lib/minitest/mock.rb:117
- def __call(name, data); end
-
- # pkg:gem/minitest#lib/minitest/mock.rb:11
- def __respond_to?(*_arg0); end
-
- # pkg:gem/minitest#lib/minitest/mock.rb:34
- def class(*args, **kwargs, &b); end
-
- # Expect that method +name+ is called, optionally with +args+ (and
- # +kwargs+ or a +blk+), and returns +retval+.
- #
- # @mock.expect(:meaning_of_life, 42)
- # @mock.meaning_of_life # => 42
- #
- # @mock.expect(:do_something_with, true, [some_obj, true])
- # @mock.do_something_with(some_obj, true) # => true
- #
- # @mock.expect(:do_something_else, true) do |a1, a2|
- # a1 == "buggs" && a2 == :bunny
- # end
- #
- # +args+ is compared to the expected args using case equality (ie, the
- # '===' operator), allowing for less specific expectations.
- #
- # @mock.expect(:uses_any_string, true, [String])
- # @mock.uses_any_string("foo") # => true
- # @mock.verify # => true
- #
- # @mock.expect(:uses_one_string, true, ["foo"])
- # @mock.uses_one_string("bar") # => raises MockExpectationError
- #
- # If a method will be called multiple times, specify a new expect for each one.
- # They will be used in the order you define them.
- #
- # @mock.expect(:ordinal_increment, 'first')
- # @mock.expect(:ordinal_increment, 'second')
- #
- # @mock.ordinal_increment # => 'first'
- # @mock.ordinal_increment # => 'second'
- # @mock.ordinal_increment # => raises MockExpectationError "No more expects available for :ordinal_increment"
- #
- # pkg:gem/minitest#lib/minitest/mock.rb:88
- def expect(name, retval, args = T.unsafe(nil), **kwargs, &blk); end
-
- # pkg:gem/minitest#lib/minitest/mock.rb:34
- def inspect(*args, **kwargs, &b); end
-
- # pkg:gem/minitest#lib/minitest/mock.rb:34
- def instance_eval(*args, **kwargs, &b); end
-
- # pkg:gem/minitest#lib/minitest/mock.rb:34
- def instance_variables(*args, **kwargs, &b); end
-
- # pkg:gem/minitest#lib/minitest/mock.rb:147
- def method_missing(sym, *args, **kwargs, &block); end
-
- # pkg:gem/minitest#lib/minitest/mock.rb:34
- def object_id(*args, **kwargs, &b); end
-
- # pkg:gem/minitest#lib/minitest/mock.rb:34
- def public_send(*args, **kwargs, &b); end
-
- # pkg:gem/minitest#lib/minitest/mock.rb:229
- def respond_to?(sym, include_private = T.unsafe(nil)); end
-
- # pkg:gem/minitest#lib/minitest/mock.rb:34
- def send(*args, **kwargs, &b); end
-
- # pkg:gem/minitest#lib/minitest/mock.rb:34
- def to_s(*args, **kwargs, &b); end
-
- # Verify that all methods were called as expected. Raises
- # +MockExpectationError+ if the mock object was not called as
- # expected.
- #
- # pkg:gem/minitest#lib/minitest/mock.rb:137
- def verify; end
-
- private
-
- # pkg:gem/minitest#lib/minitest/mock.rb:34
- def respond_to_missing?(*args, **kwargs, &b); end
-end
-
# pkg:gem/minitest#lib/minitest/parallel.rb:4
module Minitest::Parallel; end
@@ -920,10 +792,10 @@ end
# pkg:gem/minitest#lib/minitest/parallel.rb:61
module Minitest::Parallel::Test::ClassMethods
# pkg:gem/minitest#lib/minitest/parallel.rb:62
- def run_one_method(klass, method_name, reporter); end
+ def run(klass, method_name, reporter); end
# pkg:gem/minitest#lib/minitest/parallel.rb:66
- def test_order; end
+ def run_order; end
end
# A very simple reporter that prints the "dots" during the run.
@@ -933,32 +805,32 @@ end
# plugin, pull this out of the composite and replace it with your
# own.
#
-# pkg:gem/minitest#lib/minitest.rb:774
+# pkg:gem/minitest#lib/minitest.rb:799
class Minitest::ProgressReporter < ::Minitest::Reporter
- # pkg:gem/minitest#lib/minitest.rb:775
+ # pkg:gem/minitest#lib/minitest.rb:800
def prerecord(klass, name); end
- # pkg:gem/minitest#lib/minitest.rb:782
+ # pkg:gem/minitest#lib/minitest.rb:807
def record(result); end
end
# Shared code for anything that can get passed to a Reporter. See
# Minitest::Test & Minitest::Result.
#
-# pkg:gem/minitest#lib/minitest.rb:596
+# pkg:gem/minitest#lib/minitest.rb:624
module Minitest::Reportable
- # pkg:gem/minitest#lib/minitest.rb:618
+ # pkg:gem/minitest#lib/minitest.rb:646
def class_name; end
# Did this run error?
#
- # pkg:gem/minitest#lib/minitest.rb:639
+ # pkg:gem/minitest#lib/minitest.rb:667
def error?; end
# The location identifier of this test. Depends on a method
# existing called class_name.
#
- # pkg:gem/minitest#lib/minitest.rb:613
+ # pkg:gem/minitest#lib/minitest.rb:641
def location; end
# Did this run pass?
@@ -966,48 +838,48 @@ module Minitest::Reportable
# Note: skipped runs are not considered passing, but they don't
# cause the process to exit non-zero.
#
- # pkg:gem/minitest#lib/minitest.rb:603
+ # pkg:gem/minitest#lib/minitest.rb:631
def passed?; end
# Returns ".", "F", or "E" based on the result of the run.
#
- # pkg:gem/minitest#lib/minitest.rb:625
+ # pkg:gem/minitest#lib/minitest.rb:653
def result_code; end
# Was this run skipped?
#
- # pkg:gem/minitest#lib/minitest.rb:632
+ # pkg:gem/minitest#lib/minitest.rb:660
def skipped?; end
end
-# pkg:gem/minitest#lib/minitest.rb:607
+# pkg:gem/minitest#lib/minitest.rb:635
Minitest::Reportable::BASE_DIR = T.let(T.unsafe(nil), String)
# AbstractReportera
#
-# pkg:gem/minitest#lib/minitest.rb:750
+# pkg:gem/minitest#lib/minitest.rb:775
class Minitest::Reporter < ::Minitest::AbstractReporter
- # pkg:gem/minitest#lib/minitest.rb:759
+ # pkg:gem/minitest#lib/minitest.rb:784
def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end
# The IO used to report.
#
- # pkg:gem/minitest#lib/minitest.rb:752
+ # pkg:gem/minitest#lib/minitest.rb:777
def io; end
# The IO used to report.
#
- # pkg:gem/minitest#lib/minitest.rb:752
+ # pkg:gem/minitest#lib/minitest.rb:777
def io=(_arg0); end
# Command-line options for this run.
#
- # pkg:gem/minitest#lib/minitest.rb:757
+ # pkg:gem/minitest#lib/minitest.rb:782
def options; end
# Command-line options for this run.
#
- # pkg:gem/minitest#lib/minitest.rb:757
+ # pkg:gem/minitest#lib/minitest.rb:782
def options=(_arg0); end
end
@@ -1017,40 +889,40 @@ end
# blow up. By using Result.from(a_test) you can be reasonably sure
# that the test result can be marshalled.
#
-# pkg:gem/minitest#lib/minitest.rb:651
+# pkg:gem/minitest#lib/minitest.rb:679
class Minitest::Result < ::Minitest::Runnable
include ::Minitest::Reportable
- # pkg:gem/minitest#lib/minitest.rb:685
+ # pkg:gem/minitest#lib/minitest.rb:710
def class_name; end
# The class name of the test result.
#
- # pkg:gem/minitest#lib/minitest.rb:660
+ # pkg:gem/minitest#lib/minitest.rb:685
def klass; end
# The class name of the test result.
#
- # pkg:gem/minitest#lib/minitest.rb:660
+ # pkg:gem/minitest#lib/minitest.rb:685
def klass=(_arg0); end
# The location of the test method.
#
- # pkg:gem/minitest#lib/minitest.rb:665
+ # pkg:gem/minitest#lib/minitest.rb:690
def source_location; end
# The location of the test method.
#
- # pkg:gem/minitest#lib/minitest.rb:665
+ # pkg:gem/minitest#lib/minitest.rb:690
def source_location=(_arg0); end
- # pkg:gem/minitest#lib/minitest.rb:689
+ # pkg:gem/minitest#lib/minitest.rb:714
def to_s; end
class << self
# Create a new test result from a Runnable instance.
#
- # pkg:gem/minitest#lib/minitest.rb:670
+ # pkg:gem/minitest#lib/minitest.rb:695
def from(runnable); end
end
end
@@ -1061,40 +933,34 @@ end
# Subclasses of this are automatically registered and available in
# Runnable.runnables.
#
-# pkg:gem/minitest#lib/minitest.rb:363
+# pkg:gem/minitest#lib/minitest.rb:398
class Minitest::Runnable
- # pkg:gem/minitest#lib/minitest.rb:527
+ # pkg:gem/minitest#lib/minitest.rb:555
def initialize(name); end
# Number of assertions executed in this run.
#
- # pkg:gem/minitest#lib/minitest.rb:367
+ # pkg:gem/minitest#lib/minitest.rb:402
def assertions; end
# Number of assertions executed in this run.
#
- # pkg:gem/minitest#lib/minitest.rb:367
+ # pkg:gem/minitest#lib/minitest.rb:402
def assertions=(_arg0); end
- # pkg:gem/minitest#lib/minitest.rb:523
+ # pkg:gem/minitest#lib/minitest.rb:551
def failure; end
# An assertion raised during the run, if any.
#
- # pkg:gem/minitest#lib/minitest.rb:372
+ # pkg:gem/minitest#lib/minitest.rb:407
def failures; end
# An assertion raised during the run, if any.
#
- # pkg:gem/minitest#lib/minitest.rb:372
+ # pkg:gem/minitest#lib/minitest.rb:407
def failures=(_arg0); end
- # pkg:gem/minitest#lib/minitest.rb:509
- def marshal_dump; end
-
- # pkg:gem/minitest#lib/minitest.rb:519
- def marshal_load(ary); end
-
# Metadata you attach to the test results that get sent to the reporter.
#
# Lazily initializes to a hash, to keep memory down.
@@ -1104,7 +970,7 @@ class Minitest::Runnable
#
# Sets metadata, mainly used for +Result.from+.
#
- # pkg:gem/minitest#lib/minitest.rb:542
+ # pkg:gem/minitest#lib/minitest.rb:570
def metadata; end
# Metadata you attach to the test results that get sent to the reporter.
@@ -1116,22 +982,22 @@ class Minitest::Runnable
#
# Sets metadata, mainly used for +Result.from+.
#
- # pkg:gem/minitest#lib/minitest.rb:549
+ # pkg:gem/minitest#lib/minitest.rb:577
def metadata=(_arg0); end
# Returns true if metadata exists.
#
- # pkg:gem/minitest#lib/minitest.rb:554
+ # pkg:gem/minitest#lib/minitest.rb:582
def metadata?; end
# Name of the run.
#
- # pkg:gem/minitest#lib/minitest.rb:390
+ # pkg:gem/minitest#lib/minitest.rb:425
def name; end
# Set the name of the run.
#
- # pkg:gem/minitest#lib/minitest.rb:397
+ # pkg:gem/minitest#lib/minitest.rb:432
def name=(o); end
# Did this run pass?
@@ -1139,101 +1005,108 @@ class Minitest::Runnable
# Note: skipped runs are not considered passing, but they don't
# cause the process to exit non-zero.
#
- # pkg:gem/minitest#lib/minitest.rb:571
+ # pkg:gem/minitest#lib/minitest.rb:599
def passed?; end
# Returns a single character string to print based on the result
# of the run. One of ".", "F",
# "E" or "S".
#
- # pkg:gem/minitest#lib/minitest.rb:580
+ # pkg:gem/minitest#lib/minitest.rb:608
def result_code; end
# Runs a single method. Needs to return self.
#
- # pkg:gem/minitest#lib/minitest.rb:561
+ # pkg:gem/minitest#lib/minitest.rb:589
def run; end
# Was this run skipped? See #passed? for more information.
#
- # pkg:gem/minitest#lib/minitest.rb:587
+ # pkg:gem/minitest#lib/minitest.rb:615
def skipped?; end
# The time it took to run.
#
- # pkg:gem/minitest#lib/minitest.rb:377
+ # pkg:gem/minitest#lib/minitest.rb:412
def time; end
# The time it took to run.
#
- # pkg:gem/minitest#lib/minitest.rb:377
+ # pkg:gem/minitest#lib/minitest.rb:412
def time=(_arg0); end
- # pkg:gem/minitest#lib/minitest.rb:379
+ # pkg:gem/minitest#lib/minitest.rb:414
def time_it; end
class << self
+ # Returns an array of filtered +runnable_methods+. Uses
+ # options[:include] (--include arguments) and options[:exclude]
+ # (--exclude arguments) values to filter.
+ #
+ # pkg:gem/minitest#lib/minitest.rb:454
+ def filter_runnable_methods(options = T.unsafe(nil)); end
+
# re-open
#
- # pkg:gem/minitest#lib/minitest.rb:1241
+ # pkg:gem/minitest#lib/minitest.rb:1239
def inherited(klass); end
- # Returns all instance methods matching the pattern +re+.
+ # Returns all public instance methods matching the pattern +re+.
#
- # pkg:gem/minitest#lib/minitest.rb:404
+ # pkg:gem/minitest#lib/minitest.rb:439
def methods_matching(re); end
- # pkg:gem/minitest#lib/minitest.rb:479
+ # pkg:gem/minitest#lib/minitest.rb:523
def on_signal(name, action); end
- # pkg:gem/minitest#lib/minitest.rb:408
+ # pkg:gem/minitest#lib/minitest.rb:443
def reset; end
- # Responsible for running all runnable methods in a given class,
- # each in its own instance. Each instance is passed to the
- # reporter to record.
- #
- # pkg:gem/minitest#lib/minitest.rb:419
- def run(reporter, options = T.unsafe(nil)); end
-
# Runs a single method and has the reporter record the result.
# This was considered internal API but is factored out of run so
# that subclasses can specialize the running of an individual
- # test. See Minitest::ParallelTest::ClassMethods for an example.
+ # test.
#
- # pkg:gem/minitest#lib/minitest.rb:460
- def run_one_method(klass, method_name, reporter); end
+ # pkg:gem/minitest#lib/minitest.rb:504
+ def run(klass, method_name, reporter); end
+
+ # Defines the order to run tests (:random by default). Override
+ # this or use a convenience method to change it for your tests.
+ #
+ # pkg:gem/minitest#lib/minitest.rb:513
+ def run_order; end
+
+ # Responsible for running all runnable methods in a given class,
+ # each in its own instance. Each instance is passed to the
+ # reporter to record.
+ #
+ # pkg:gem/minitest#lib/minitest.rb:472
+ def run_suite(reporter, options = T.unsafe(nil)); end
# Each subclass of Runnable is responsible for overriding this
# method to return all runnable methods. See #methods_matching.
#
- # pkg:gem/minitest#lib/minitest.rb:496
+ # pkg:gem/minitest#lib/minitest.rb:540
def runnable_methods; end
# Returns all subclasses of Runnable.
#
- # pkg:gem/minitest#lib/minitest.rb:503
+ # pkg:gem/minitest#lib/minitest.rb:547
def runnables; end
- # Defines the order to run tests (:random by default). Override
- # this or use a convenience method to change it for your tests.
- #
- # pkg:gem/minitest#lib/minitest.rb:469
- def test_order; end
-
- # pkg:gem/minitest#lib/minitest.rb:473
- def with_info_handler(reporter, &block); end
+ # pkg:gem/minitest#lib/minitest.rb:517
+ def with_info_handler(_reporter = T.unsafe(nil), &block); end
end
end
-# pkg:gem/minitest#lib/minitest.rb:477
+# pkg:gem/minitest#lib/minitest.rb:521
Minitest::Runnable::SIGNALS = T.let(T.unsafe(nil), Hash)
# Assertion raised when skipping a run.
#
-# pkg:gem/minitest#lib/minitest.rb:1065
+# pkg:gem/minitest#lib/minitest.rb:1089
class Minitest::Skip < ::Minitest::Assertion
- # pkg:gem/minitest#lib/minitest.rb:1066
+ # pkg:gem/minitest#lib/minitest.rb:1090
def result_label; end
end
@@ -1257,119 +1130,119 @@ end
# end
# end
#
-# pkg:gem/minitest#lib/minitest.rb:810
+# pkg:gem/minitest#lib/minitest.rb:835
class Minitest::StatisticsReporter < ::Minitest::Reporter
- # pkg:gem/minitest#lib/minitest.rb:859
+ # pkg:gem/minitest#lib/minitest.rb:884
def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end
# Total number of assertions.
#
- # pkg:gem/minitest#lib/minitest.rb:814
+ # pkg:gem/minitest#lib/minitest.rb:839
def assertions; end
# Total number of assertions.
#
- # pkg:gem/minitest#lib/minitest.rb:814
+ # pkg:gem/minitest#lib/minitest.rb:839
def assertions=(_arg0); end
# Total number of test cases.
#
- # pkg:gem/minitest#lib/minitest.rb:819
+ # pkg:gem/minitest#lib/minitest.rb:844
def count; end
# Total number of test cases.
#
- # pkg:gem/minitest#lib/minitest.rb:819
+ # pkg:gem/minitest#lib/minitest.rb:844
def count=(_arg0); end
# Total number of tests that erred.
#
- # pkg:gem/minitest#lib/minitest.rb:847
+ # pkg:gem/minitest#lib/minitest.rb:872
def errors; end
# Total number of tests that erred.
#
- # pkg:gem/minitest#lib/minitest.rb:847
+ # pkg:gem/minitest#lib/minitest.rb:872
def errors=(_arg0); end
# Total number of tests that failed.
#
- # pkg:gem/minitest#lib/minitest.rb:842
+ # pkg:gem/minitest#lib/minitest.rb:867
def failures; end
# Total number of tests that failed.
#
- # pkg:gem/minitest#lib/minitest.rb:842
+ # pkg:gem/minitest#lib/minitest.rb:867
def failures=(_arg0); end
- # pkg:gem/minitest#lib/minitest.rb:873
+ # pkg:gem/minitest#lib/minitest.rb:898
def passed?; end
- # pkg:gem/minitest#lib/minitest.rb:881
+ # pkg:gem/minitest#lib/minitest.rb:906
def record(result); end
# Report on the tracked statistics.
#
- # pkg:gem/minitest#lib/minitest.rb:891
+ # pkg:gem/minitest#lib/minitest.rb:916
def report; end
# An +Array+ of test cases that failed or were skipped.
#
- # pkg:gem/minitest#lib/minitest.rb:824
+ # pkg:gem/minitest#lib/minitest.rb:849
def results; end
# An +Array+ of test cases that failed or were skipped.
#
- # pkg:gem/minitest#lib/minitest.rb:824
+ # pkg:gem/minitest#lib/minitest.rb:849
def results=(_arg0); end
# Total number of tests that where skipped.
#
- # pkg:gem/minitest#lib/minitest.rb:857
+ # pkg:gem/minitest#lib/minitest.rb:882
def skips; end
# Total number of tests that where skipped.
#
- # pkg:gem/minitest#lib/minitest.rb:857
+ # pkg:gem/minitest#lib/minitest.rb:882
def skips=(_arg0); end
- # pkg:gem/minitest#lib/minitest.rb:877
+ # pkg:gem/minitest#lib/minitest.rb:902
def start; end
# Time the test run started. If available, the monotonic clock is
# used and this is a +Float+, otherwise it's an instance of
# +Time+.
#
- # pkg:gem/minitest#lib/minitest.rb:831
+ # pkg:gem/minitest#lib/minitest.rb:856
def start_time; end
# Time the test run started. If available, the monotonic clock is
# used and this is a +Float+, otherwise it's an instance of
# +Time+.
#
- # pkg:gem/minitest#lib/minitest.rb:831
+ # pkg:gem/minitest#lib/minitest.rb:856
def start_time=(_arg0); end
# Test run time. If available, the monotonic clock is used and
# this is a +Float+, otherwise it's an instance of +Time+.
#
- # pkg:gem/minitest#lib/minitest.rb:837
+ # pkg:gem/minitest#lib/minitest.rb:862
def total_time; end
# Test run time. If available, the monotonic clock is used and
# this is a +Float+, otherwise it's an instance of +Time+.
#
- # pkg:gem/minitest#lib/minitest.rb:837
+ # pkg:gem/minitest#lib/minitest.rb:862
def total_time=(_arg0); end
# Total number of tests that warned.
#
- # pkg:gem/minitest#lib/minitest.rb:852
+ # pkg:gem/minitest#lib/minitest.rb:877
def warnings; end
# Total number of tests that warned.
#
- # pkg:gem/minitest#lib/minitest.rb:852
+ # pkg:gem/minitest#lib/minitest.rb:877
def warnings=(_arg0); end
end
@@ -1381,36 +1254,36 @@ end
# plugin, pull this out of the composite and replace it with your
# own.
#
-# pkg:gem/minitest#lib/minitest.rb:912
+# pkg:gem/minitest#lib/minitest.rb:937
class Minitest::SummaryReporter < ::Minitest::StatisticsReporter
- # pkg:gem/minitest#lib/minitest.rb:945
+ # pkg:gem/minitest#lib/minitest.rb:970
def aggregated_results(io); end
- # pkg:gem/minitest#lib/minitest.rb:914
+ # pkg:gem/minitest#lib/minitest.rb:939
def old_sync; end
- # pkg:gem/minitest#lib/minitest.rb:914
+ # pkg:gem/minitest#lib/minitest.rb:939
def old_sync=(_arg0); end
- # pkg:gem/minitest#lib/minitest.rb:928
+ # pkg:gem/minitest#lib/minitest.rb:953
def report; end
- # pkg:gem/minitest#lib/minitest.rb:916
+ # pkg:gem/minitest#lib/minitest.rb:941
def start; end
- # pkg:gem/minitest#lib/minitest.rb:940
+ # pkg:gem/minitest#lib/minitest.rb:965
def statistics; end
- # pkg:gem/minitest#lib/minitest.rb:965
+ # pkg:gem/minitest#lib/minitest.rb:990
def summary; end
- # pkg:gem/minitest#lib/minitest.rb:913
+ # pkg:gem/minitest#lib/minitest.rb:938
def sync; end
- # pkg:gem/minitest#lib/minitest.rb:913
+ # pkg:gem/minitest#lib/minitest.rb:938
def sync=(_arg0); end
- # pkg:gem/minitest#lib/minitest.rb:961
+ # pkg:gem/minitest#lib/minitest.rb:986
def to_s; end
end
@@ -1429,61 +1302,110 @@ class Minitest::Test < ::Minitest::Runnable
# LifecycleHooks
#
- # pkg:gem/minitest#lib/minitest/test.rb:190
+ # pkg:gem/minitest#lib/minitest/test.rb:244
def capture_exceptions; end
- # pkg:gem/minitest#lib/minitest/test.rb:15
- def class_name; end
-
- # pkg:gem/minitest#lib/minitest/test.rb:207
+ # pkg:gem/minitest#lib/minitest/test.rb:261
def neuter_exception(e); end
- # pkg:gem/minitest#lib/minitest/test.rb:218
+ # pkg:gem/minitest#lib/minitest/test.rb:272
def new_exception(klass, msg, bt, kill = T.unsafe(nil)); end
- # Runs a single test with setup/teardown hooks.
+ # Runs a single test with setup/teardown hooks. Override this
+ # method to customize how the test is run on a class-by-class
+ # basis.
+ #
+ # Example:
+ #
+ # class TestBlah < Minitest::Test
+ # def run
+ # Dir.chdir tmp_dir do
+ # super
+ # end
+ # end
+ # end
#
- # pkg:gem/minitest#lib/minitest/test.rb:88
+ # pkg:gem/minitest#lib/minitest/test.rb:142
def run; end
- # pkg:gem/minitest#lib/minitest/test.rb:200
+ # pkg:gem/minitest#lib/minitest/test.rb:254
def sanitize_exception(e); end
class << self
+ # Declare the current class an abstract test case that doesn't run
+ # tests except in subclasses.
+ #
+ # Example:
+ #
+ # class AbstractTestCase < Minitest::Test
+ # abstract_test_case!
+ #
+ # attr_accessor :obj
+ #
+ # def test_method
+ # assert_equal 42, obj.method
+ # end
+ # end
+ #
+ # class TestConcrete < AbstractTestCase
+ # def setup = self.obj = Concrete.new
+ # end
+ #
+ # pkg:gem/minitest#lib/minitest/test.rb:46
+ def abstract_test_case!(klass = T.unsafe(nil)); end
+
# Call this at the top of your tests when you absolutely
- # positively need to have ordered tests. In doing so, you're
- # admitting that you suck and your tests are weak.
+ # positively need to have ordered tests.
#
- # pkg:gem/minitest#lib/minitest/test.rb:35
+ # pkg:gem/minitest#lib/minitest/test.rb:58
def i_suck_and_my_tests_are_order_dependent!; end
- # pkg:gem/minitest#lib/minitest/test.rb:26
+ # pkg:gem/minitest#lib/minitest/test.rb:22
def io_lock; end
- # pkg:gem/minitest#lib/minitest/test.rb:26
+ # pkg:gem/minitest#lib/minitest/test.rb:22
def io_lock=(_arg0); end
- # Make diffs for this Test use #pretty_inspect so that diff
- # in assert_equal can have more details. NOTE: this is much slower
- # than the regular inspect but much more usable for complex
- # objects.
+ # Make diffs for this Test use +pretty_inspect+ so that diff
+ # in Assertions#assert_equal can have more details.
+ #
+ # NOTE: this is much slower than the regular inspect but much more
+ # usable for complex objects.
#
- # pkg:gem/minitest#lib/minitest/test.rb:48
+ # Example:
+ #
+ # class TestBlah < Minitest::Test
+ # make_my_diffs_pretty!
+ #
+ # def test_complex_object
+ # exp = deep_complex_object
+ # assert_equal exp, obj.actual # outputs clean diff
+ # end
+ # end
+ #
+ # pkg:gem/minitest#lib/minitest/test.rb:83
def make_my_diffs_pretty!; end
# Call this at the top of your tests (inside the +Minitest::Test+
# subclass or +describe+ block) when you want to run your tests in
- # parallel. In doing so, you're admitting that you rule and your
- # tests are awesome.
+ # parallel.
+ #
+ # Example:
+ #
+ # class TestZeroSideEffects < Minitest::Test
+ # parallelize_me!
#
- # pkg:gem/minitest#lib/minitest/test.rb:60
+ # # ... tests ...
+ # end
+ #
+ # pkg:gem/minitest#lib/minitest/test.rb:102
def parallelize_me!; end
- # Returns all instance methods starting with "test_". Based on
- # #test_order, the methods are either sorted, randomized
+ # Returns all public instance methods starting with "test_". Based on
+ # #run_order, the methods are either sorted, randomized
# (default), or run in parallel.
#
- # pkg:gem/minitest#lib/minitest/test.rb:71
+ # pkg:gem/minitest#lib/minitest/test.rb:113
def runnable_methods; end
end
end
@@ -1492,7 +1414,7 @@ end
# meant for library writers, NOT for regular test authors. See
# #before_setup for an example.
#
-# pkg:gem/minitest#lib/minitest/test.rb:113
+# pkg:gem/minitest#lib/minitest/test.rb:167
module Minitest::Test::LifecycleHooks
# Runs before every test, after setup. This hook is meant for
# libraries to extend minitest. It is not meant to be used by
@@ -1500,7 +1422,7 @@ module Minitest::Test::LifecycleHooks
#
# See #before_setup for an example.
#
- # pkg:gem/minitest#lib/minitest/test.rb:163
+ # pkg:gem/minitest#lib/minitest/test.rb:217
def after_setup; end
# Runs after every test, after teardown. This hook is meant for
@@ -1509,7 +1431,7 @@ module Minitest::Test::LifecycleHooks
#
# See #before_setup for an example.
#
- # pkg:gem/minitest#lib/minitest/test.rb:187
+ # pkg:gem/minitest#lib/minitest/test.rb:241
def after_teardown; end
# Runs before every test, before setup. This hook is meant for
@@ -1544,7 +1466,7 @@ module Minitest::Test::LifecycleHooks
# include MyMinitestPlugin
# end
#
- # pkg:gem/minitest#lib/minitest/test.rb:148
+ # pkg:gem/minitest#lib/minitest/test.rb:202
def before_setup; end
# Runs after every test, before teardown. This hook is meant for
@@ -1553,103 +1475,70 @@ module Minitest::Test::LifecycleHooks
#
# See #before_setup for an example.
#
- # pkg:gem/minitest#lib/minitest/test.rb:172
+ # pkg:gem/minitest#lib/minitest/test.rb:226
def before_teardown; end
# Runs before every test. Use this to set up before each test
# run.
#
- # pkg:gem/minitest#lib/minitest/test.rb:154
+ # pkg:gem/minitest#lib/minitest/test.rb:208
def setup; end
# Runs after every test. Use this to clean up after each test
# run.
#
- # pkg:gem/minitest#lib/minitest/test.rb:178
+ # pkg:gem/minitest#lib/minitest/test.rb:232
def teardown; end
end
-# pkg:gem/minitest#lib/minitest/test.rb:19
+# pkg:gem/minitest#lib/minitest/test.rb:15
Minitest::Test::PASSTHROUGH_EXCEPTIONS = T.let(T.unsafe(nil), Array)
-# pkg:gem/minitest#lib/minitest/test.rb:21
+# pkg:gem/minitest#lib/minitest/test.rb:17
Minitest::Test::SETUP_METHODS = T.let(T.unsafe(nil), Array)
-# pkg:gem/minitest#lib/minitest/test.rb:23
+# pkg:gem/minitest#lib/minitest/test.rb:19
Minitest::Test::TEARDOWN_METHODS = T.let(T.unsafe(nil), Array)
# Assertion wrapping an unexpected error that was raised during a run.
#
-# pkg:gem/minitest#lib/minitest.rb:1074
+# pkg:gem/minitest#lib/minitest.rb:1098
class Minitest::UnexpectedError < ::Minitest::Assertion
include ::Minitest::Compress
- # pkg:gem/minitest#lib/minitest.rb:1080
+ # pkg:gem/minitest#lib/minitest.rb:1104
def initialize(error); end
- # pkg:gem/minitest#lib/minitest.rb:1093
+ # pkg:gem/minitest#lib/minitest.rb:1117
def backtrace; end
# TODO: figure out how to use `cause` instead
#
- # pkg:gem/minitest#lib/minitest.rb:1078
+ # pkg:gem/minitest#lib/minitest.rb:1102
def error; end
# TODO: figure out how to use `cause` instead
#
- # pkg:gem/minitest#lib/minitest.rb:1078
+ # pkg:gem/minitest#lib/minitest.rb:1102
def error=(_arg0); end
- # pkg:gem/minitest#lib/minitest.rb:1099
+ # pkg:gem/minitest#lib/minitest.rb:1123
def message; end
- # pkg:gem/minitest#lib/minitest.rb:1105
+ # pkg:gem/minitest#lib/minitest.rb:1129
def result_label; end
end
-# pkg:gem/minitest#lib/minitest.rb:1097
+# pkg:gem/minitest#lib/minitest.rb:1121
Minitest::UnexpectedError::BASE_RE = T.let(T.unsafe(nil), Regexp)
# Assertion raised on warning when running in -Werror mode.
#
-# pkg:gem/minitest#lib/minitest.rb:1113
+# pkg:gem/minitest#lib/minitest.rb:1137
class Minitest::UnexpectedWarning < ::Minitest::Assertion
- # pkg:gem/minitest#lib/minitest.rb:1114
+ # pkg:gem/minitest#lib/minitest.rb:1138
def result_label; end
end
# pkg:gem/minitest#lib/minitest.rb:13
Minitest::VERSION = T.let(T.unsafe(nil), String)
-
-# pkg:gem/minitest#lib/minitest/mock.rb:1
-class MockExpectationError < ::StandardError; end
-
-# Object extensions for Minitest::Mock.
-#
-# pkg:gem/minitest#lib/minitest/mock.rb:264
-class Object < ::BasicObject
- include ::Kernel
- include ::PP::ObjectMixin
-
- # Add a temporary stubbed method replacing +name+ for the duration
- # of the +block+. If +val_or_callable+ responds to #call, then it
- # returns the result of calling it, otherwise returns the value
- # as-is. If stubbed method yields a block, +block_args+ will be
- # passed along. Cleans up the stub at the end of the +block+. The
- # method +name+ must exist before stubbing.
- #
- # def test_stale_eh
- # obj_under_test = Something.new
- # refute obj_under_test.stale?
- #
- # Time.stub :now, Time.at(0) do
- # assert obj_under_test.stale?
- # end
- # end
- # --
- # NOTE: keyword args in callables are NOT checked for correctness
- # against the existing method. Too many edge cases to be worth it.
- #
- # pkg:gem/minitest#lib/minitest/mock.rb:286
- def stub(name, val_or_callable, *block_args, **block_kwargs, &block); end
-end
diff --git a/sorbet/rbi/gems/redis-client@0.31.0.rbi b/sorbet/rbi/gems/redis-client@0.31.0.rbi
index 178f0d4..a00f281 100644
--- a/sorbet/rbi/gems/redis-client@0.31.0.rbi
+++ b/sorbet/rbi/gems/redis-client@0.31.0.rbi
@@ -8,7 +8,7 @@
module Process
extend ::ConnectionPool::ForkTracker
extend ::RedisClient::PIDCache::CoreExt
- extend ::Dalli::PIDCache::CoreExt
+ extend ::SemanticLogger::CoreExt::Process
extend ::ActiveSupport::ForkTracker::CoreExt
end
diff --git a/sorbet/rbi/gems/semantic_logger@4.18.0.rbi b/sorbet/rbi/gems/semantic_logger@4.18.0.rbi
deleted file mode 100644
index 7767986..0000000
--- a/sorbet/rbi/gems/semantic_logger@4.18.0.rbi
+++ /dev/null
@@ -1,3924 +0,0 @@
-# typed: true
-
-# DO NOT EDIT MANUALLY
-# This is an autogenerated file for types exported from the `semantic_logger` gem.
-# Please instead update this file by running `bin/tapioca gem semantic_logger`.
-
-
-# Send log messages to Bugsnag
-#
-# Example:
-# SemanticLogger.add_appender(appender: :bugsnag)
-#
-# Forward all log messages to CloudWatch Logs.
-#
-# Example:
-#
-# SemanticLogger.add_appender(
-# appender: :cloudwatch_logs,
-# client_kwargs: {region: "eu-west-1"},
-# group: "/my/application",
-# create_stream: true
-# )
-# Forward all log messages to Elasticsearch.
-#
-# Example:
-#
-# SemanticLogger.add_appender(
-# appender: :elasticsearch,
-# url: 'http://localhost:9200'
-# )
-# Forward all log messages to Elasticsearch one at a time via a HTTP post.
-#
-# Note:
-# * Other than in very low volume environments it is recommended to rather use the Elasticsearch appender,
-# since it supports bulk logging.
-#
-# Example:
-# SemanticLogger.add_appender(
-# appender: :elasticsearch_http,
-# url: 'http://localhost:9200'
-# )
-# File appender
-#
-# Writes log messages to a file or open iostream
-#
-# Forward log entries to a Graylog server.
-#
-# Example:
-# SemanticLogger.add_appender(
-# appender: :graylog,
-# url: 'udp://localhost:12201'
-# )
-#
-# Notes:
-# * trace is not supported by Graylog, so trace level logging will appear as debug in Graylog.
-#
-# In the Graylog Web UI search screen, it is recommended to include the following fields:
-# `duration`, `level`, `message`, `metric`, `name`, `tags
-# Send log messages to honeybadger
-#
-# Example:
-# SemanticLogger.add_appender(appender: :honeybadger)
-#
-# Send log messages to honeybadger events/insights API
-#
-# Example:
-# SemanticLogger.add_appender(appender: :honeybadger_insights)
-#
-# Log to any HTTP(S) server that accepts log messages in JSON form
-#
-# Features:
-# * JSON Formatted messages.
-# * Uses a persistent http connection, if the server supports it.
-# * SSL encryption (https).
-#
-# Example:
-# SemanticLogger.add_appender(
-# appender: :http,
-# url: 'http://localhost:8088/path'
-# )
-# Forward all log messages to Apache Kafka.
-#
-# Example:
-#
-# SemanticLogger.add_appender(
-# appender: :kafka,
-#
-# # At least one of these nodes must be available:
-# seed_brokers: ["kafka1:9092", "kafka2:9092"],
-#
-# # Set an optional client id in order to identify the client to Kafka:
-# client_id: "my-application",
-# )
-# Forward application metrics to a Loki instance using HTTP push API
-#
-# Example:
-# SemanticLogger.add_appender(
-# appender: :loki,
-# url: "https://logs-prod-001.grafana.net",
-# username: "grafana_username",
-# password: "grafana_token_here",
-# compress: true
-# )
-# Send log messages to NewRelic
-#
-# The :error and :fatal log entries will show up under
-# "Applications" > "Application Name" > "Events" > "Errors" in New Relic.
-#
-# Example:
-# SemanticLogger.add_appender(appender: :new_relic)
-# Send log messages to NewRelic
-#
-# All log entries will appear under
-# "Logs" in New Relic
-#
-# == Caveats
-#
-# * The NewRelic agent only sends logs to NewRelic when log forwarding is enabled. There is however an open
-# issue to get this fixed: https://github.com/newrelic/newrelic-ruby-agent/issues/1614. Please see the guide
-# for a workaround.
-#
-# Example:
-# SemanticLogger.add_appender(appender: :new_relic_logs)
-# Open Telemetry Appender
-#
-# Writes log messages, and metrics to Open Telemetry.
-#
-# Forward all log messages to RabbitMQ.
-#
-# Example:
-#
-# SemanticLogger.add_appender(
-# appender: :rabbitmq,
-#
-# # Name of the queue in RabbitMQ where to publish the logs. This queue will be bound to "amqp.direct" exchange.
-# queue: 'semantic_logger',
-#
-# # This host will be used for RabbitMQ connection.
-# # NOTE this is different than :host option which is used by the logger directly.
-# rabbitmq_host: '127.0.0.1',
-#
-# # RabbitMQ credentials
-# username: 'my-username',
-# password: 'my-secrect-pass',
-#
-# # All other options accepted by Bunny.new call
-# vhost: 'production',
-# )
-# Send log messages to sentry
-#
-# Example:
-# SemanticLogger.add_appender(appender: :sentry)
-#
-# Send log messages to sentry
-#
-# Example:
-# SemanticLogger.add_appender(appender: :sentry_ruby)
-#
-# Splunk log appender.
-#
-# Use the official splunk gem to log messages to Splunk.
-#
-# Example
-# SemanticLogger.add_appender(
-# appender: :splunk,
-# username: 'username',
-# password: 'password',
-# host: 'localhost',
-# port: 8089,
-# scheme: :https,
-# index: 'main'
-# )
-# Splunk log appender using the Splunk HTTP(S) listener.
-#
-# Use the newer, faster and more complete JSON over HTTP interface for Splunk.
-#
-# To configure Splunk to receive log messages via this appender:
-# http://dev.splunk.com/view/event-collector/SP-CAAAE7F
-#
-# Example
-# SemanticLogger.add_appender(
-# appender: :splunk_http,
-# url: 'http://localhost:8080',
-# token: '70CA900C-3D7E-42A4-9C79-7975D1C422A8'
-# )
-# Send log messages to local syslog, or remote syslog servers over TCP or UDP.
-#
-# Example:
-# # Log to a local Syslog daemon
-# SemanticLogger.add_appender(appender: :syslog)
-#
-# Example:
-# # Log to a remote Syslog server over TCP:
-# SemanticLogger.add_appender(
-# appender: :syslog,
-# url: 'tcp://myloghost:514'
-# )
-#
-# Example:
-# # Log to a remote Syslog server over UDP:
-# SemanticLogger.add_appender(
-# appender: :syslog,
-# url: 'udp://myloghost:514'
-# )
-#
-# Example:
-# # Log to a remote Syslog server using the CEE format over TCP:
-# SemanticLogger.add_appender(
-# appender: :syslog,
-# url: 'tcp://myloghost:514'
-# )
-#
-# Send log messages to any standard Ruby logging class.
-#
-# Forwards logging call to loggers such as Logger, log4r, etc.
-# Base logger
-#
-# Abstract base class for loggers
-#
-# Implements common behavior such as log level, default text formatter etc
-#
-# Logger class variable mix-in
-#
-# Lazy initialize a logger class variable with instance accessor
-#
-# By including this mix-in into any class it will define a class level logger
-# and also make it accessible via instance methods
-#
-# Example:
-# require 'semantic_logger'
-# SemanticLogger.default_level = :debug
-# SemanticLogger.add_appender(io: $stdout, formatter: :color)
-#
-# class ExternalSupplier
-# # Create class and instance logger methods
-# include SemanticLogger::Loggable
-#
-# def call_supplier(amount, name)
-# logger.debug "Calculating with amount", { amount: amount, name: name }
-#
-# # Measure and log on completion how long the call took to the external supplier
-# logger.measure_info "Calling external interface" do
-# # Code to call the external supplier ...
-# end
-# end
-# end
-#
-# Notes:
-# * To forcibly replace Rails or any other existing logging methods
-# use `prepend` instead of `include`. For example:
-# ExternalSupplier.prepend SemanticLogger::Loggable
-# Send Metrics to NewRelic
-#
-# The :error and :fatal log entries will show up under
-# "Applications" > "Application Name" > "Events" > "Errors" in New Relic.
-#
-# Example:
-# SemanticLogger.add_appender(metric: :new_relic)
-# Forward application metrics to SignalFx.
-#
-# Example:
-# SemanticLogger.add_appender(
-# metric: :signalfx,
-# token: 'SIGNALFX_ORG_ACCESS_TOKEN'
-# )
-# Abstract Subscriber
-#
-# Abstract base class for all appenders.
-#
-# pkg:gem/semantic_logger#lib/semantic_logger/version.rb:1
-module SemanticLogger
- class << self
- # Return a logger for the supplied class or class_name
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:8
- def [](klass); end
-
- # Add a new logging appender as a new destination for all log messages
- # emitted from Semantic Logger
- #
- # Appenders will be written to in the order that they are added
- #
- # If a block is supplied then it will be used to customize the format
- # of the messages sent to that appender. See SemanticLogger::Logger.new for
- # more information on custom formatters
- #
- # Parameters
- # file_name: [String]
- # File name to write log messages to.
- #
- # Or,
- # io: [IO]
- # An IO Stream to log to.
- # For example $stdout, $stderr, etc.
- #
- # Or,
- # appender: [Symbol|SemanticLogger::Subscriber]
- # A symbol identifying the appender to create.
- # For example:
- # :bugsnag, :elasticsearch, :graylog, :http, :mongodb, :new_relic, :splunk_http, :syslog, :wrapper
- # Or,
- # An instance of an appender derived from SemanticLogger::Subscriber
- # For example:
- # SemanticLogger::Appender::Http.new(url: 'http://localhost:8088/path')
- #
- # Or,
- # logger: [Logger|Log4r]
- # An instance of a Logger or a Log4r logger.
- #
- # level: [:trace | :debug | :info | :warn | :error | :fatal]
- # Override the log level for this appender.
- # Default: SemanticLogger.default_level
- #
- # formatter: [Symbol|Object|Proc]
- # Any of the following symbol values: :default, :color, :json, :logfmt, etc...
- # Or,
- # An instance of a class that implements #call
- # Or,
- # A Proc to be used to format the output from this appender
- # Default: :default
- #
- # filter: [Regexp|Proc]
- # RegExp: Only include log messages where the class name matches the supplied.
- # regular expression. All other messages will be ignored.
- # Proc: Only include log messages where the supplied Proc returns true
- # The Proc must return true or false.
- #
- # Examples:
- #
- # # Send all logging output to Standard Out (Screen)
- # SemanticLogger.add_appender(io: $stdout)
- #
- # # Send all logging output to a file
- # SemanticLogger.add_appender(file_name: 'logfile.log')
- #
- # # Send all logging output to a file and only :info and above to standard output
- # SemanticLogger.add_appender(file_name: 'logfile.log')
- # SemanticLogger.add_appender(io: $stdout, level: :info)
- #
- # Log to log4r, Logger, etc.:
- #
- # # Send Semantic logging output to an existing logger
- # require 'logger'
- # require 'semantic_logger'
- #
- # # Built-in Ruby logger
- # log = Logger.new($stdout)
- # log.level = Logger::DEBUG
- #
- # SemanticLogger.default_level = :debug
- # SemanticLogger.add_appender(logger: log)
- #
- # logger = SemanticLogger['Example']
- # logger.info "Hello World"
- # logger.debug("Login time", user: 'Joe', duration: 100, ip_address: '127.0.0.1')
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:165
- def add_appender(**args, &block); end
-
- # Add signal handlers for Semantic Logger
- #
- # Two signal handlers will be registered by default:
- #
- # 1. Changing the log_level:
- #
- # The log level can be changed without restarting the process by sending the
- # log_level_signal, which by default is 'USR2'
- #
- # When the log_level_signal is raised on this process, the global default log level
- # rotates through the following log levels in the following order, starting
- # from the current global default level:
- # :fatal, :error, :warn, :info, :debug, :trace
- #
- # If the current level is :trace it wraps around back to :fatal
- #
- # 2. Logging a Ruby thread dump
- #
- # When the signal is raised on this process, Semantic Logger will write the list
- # of threads to the log file, along with their back-traces when available
- #
- # For JRuby users this thread dump differs form the standard QUIT triggered
- # Java thread dump which includes system threads and Java stack traces.
- #
- # It is recommended to name any threads you create in the application, by
- # calling the following from within the thread itself:
- # Thread.current.name = 'My Worker'
- #
- # Also adds JRuby Garbage collection logging so that any garbage collections
- # that exceed the time threshold will be logged. Default: 100 ms
- # Currently only supported when running JRuby
- #
- # Note:
- # To only register one of the signal handlers, set the other to nil
- # Set gc_log_microseconds to nil to not enable JRuby Garbage collections
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:278
- def add_signal_handler(log_level_signal = T.unsafe(nil), thread_dump_signal = T.unsafe(nil), gc_log_microseconds = T.unsafe(nil)); end
-
- # Returns [SemanticLogger::Subscriber] a copy of the list of active
- # appenders for debugging etc.
- # Use SemanticLogger.add_appender and SemanticLogger.remove_appender
- # to manipulate the active appenders list
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:190
- def appenders; end
-
- # Returns [String] name of this application for logging purposes
- # Note: Not all appenders use `application`
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:64
- def application; end
-
- # Override the default application
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:69
- def application=(application); end
-
- # Returns the current backtrace level
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:41
- def backtrace_level; end
-
- # Sets the level at which backtraces should be captured
- # for every log message.
- #
- # By enabling backtrace capture the filename and line number of where
- # message was logged can be written to the log file. Additionally, the backtrace
- # can be forwarded to error management services such as Bugsnag.
- #
- # Warning:
- # Capturing backtraces is very expensive and should not be done all
- # the time. It is recommended to run it at :error level in production.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:34
- def backtrace_level=(level); end
-
- # Returns the current backtrace level index
- # For internal use only
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:47
- def backtrace_level_index; end
-
- # Clear out all previously registered appenders
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:182
- def clear_appenders!; end
-
- # Close all appenders and flush any outstanding messages.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:201
- def close; end
-
- # Returns the global default log level
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:20
- def default_level; end
-
- # Sets the global default log level
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:13
- def default_level=(level); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:496
- def default_level_index; end
-
- # Returns [String] name of this environment for logging purposes
- # Note: Not all appenders use `environment`
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:75
- def environment; end
-
- # Override the default environment
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:80
- def environment=(environment); end
-
- # If the tag being supplied is definitely a string then this fast
- # tag api can be used for short lived tags
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:313
- def fast_tag(tag); end
-
- # Flush all queued log entries disk, database, etc.
- # All queued log messages are written and then each appender is flushed in turn.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:196
- def flush; end
-
- # Returns [String] name of this host for logging purposes
- # Note: Not all appenders use `host`
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:53
- def host; end
-
- # Override the default host name
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:58
- def host=(host); end
-
- # Returns the check_interval which is the number of messages between checks
- # to determine if the appender thread is falling behind.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:480
- def lag_check_interval; end
-
- # Set the check_interval which is the number of messages between checks
- # to determine if the appender thread is falling behind.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:486
- def lag_check_interval=(lag_check_interval); end
-
- # Returns the amount of time in seconds
- # to determine if the appender thread is falling behind.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:492
- def lag_threshold_s; end
-
- # :nodoc
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:389
- def named_tagged(hash); end
-
- # Returns [Hash] a copy of the named tags currently active for this thread.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:402
- def named_tags; end
-
- # Supply a callback to be called whenever a log entry is created.
- # Useful for capturing appender specific context information.
- #
- # Parameters
- # object: [Object | Proc]
- # [Proc] the block to call.
- # [Object] any object on which to call #call.
- #
- # Example:
- # SemanticLogger.on_log do |log|
- # log.set_context(:honeybadger, Honeybadger.get_context)
- # end
- #
- # Example:
- # module CaptureContext
- # def call(log)
- # log.set_context(:honeybadger, Honeybadger.get_context)
- # end
- # end
- # SemanticLogger.on_log(CaptureContext)
- #
- # Note:
- # * This callback is called within the thread of the application making the logging call.
- # * If these callbacks are slow they will slow down the application.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:239
- def on_log(object = T.unsafe(nil), &block); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:419
- def pop_named_tags(quantity = T.unsafe(nil)); end
-
- # Remove specified number of tags from the current tag list
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:383
- def pop_tags(quantity = T.unsafe(nil)); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:414
- def push_named_tags(hash); end
-
- # Add tags to the current scope
- #
- # Note:
- # - This method does not flatten the array or remove any empty elements, or duplicates
- # since the performance penalty is excessive.
- # - To get the flattening behavior use the slower api:
- # `logger.push_tags`
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:377
- def push_tags(*tags); end
-
- # Returns [Integer] the number of log entries waiting to be written to the appenders.
- #
- # When this number grows it is because the logging appender thread is not
- # able to write to the appenders fast enough. Either reduce the amount of
- # logging, increase the log level, reduce the number of appenders, or
- # look into speeding up the appenders themselves
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:474
- def queue_size; end
-
- # Remove an existing appender
- # Currently only supports appender instances
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:174
- def remove_appender(appender); end
-
- # After forking an active process call SemanticLogger.reopen to re-open
- # any open file handles etc to resources.
- #
- # Note:
- # Not all appender's implement reopen.
- # Check the code for each appender you are using before relying on this behavior.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:211
- def reopen; end
-
- # Silence noisy log levels by changing the default_level within the block
- #
- # This setting is thread-safe and only applies to the current thread
- #
- # Any threads spawned within the block will not be affected by this setting
- #
- # #silence can be used to both raise and lower the log level within
- # the supplied block.
- #
- # Example:
- #
- # # Perform trace level logging within the block when the default is higher
- # SemanticLogger.default_level = :info
- #
- # logger.debug 'this will _not_ be logged'
- #
- # SemanticLogger.silence(:trace) do
- # logger.debug "this will be logged"
- # end
- #
- # Parameters
- # new_level
- # The new log level to apply within the block
- # Default: :error
- #
- # Example:
- # # Silence all logging for this thread below :error level
- # SemanticLogger.silence do
- # logger.info "this will _not_ be logged"
- # logger.warn "this neither"
- # logger.error "but errors will be logged"
- # end
- #
- # Note:
- # #silence does not affect any loggers which have had their log level set
- # explicitly. I.e. That do not rely on the global default level
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:460
- def silence(new_level = T.unsafe(nil)); end
-
- # Run Semantic Logger in Synchronous mode.
- #
- # I.e. Instead of logging messages in a separate thread for better performance,
- # log them using the current thread.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:504
- def sync!; end
-
- # Running in synchronous mode?
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:509
- def sync?; end
-
- # Add the tags or named tags to the list of tags to log for this thread whilst the supplied block is active.
- #
- # Returns result of block.
- #
- # Tagged example:
- # SemanticLogger.tagged(12345, 'jack') do
- # logger.debug('Hello World')
- # end
- #
- # Named Tags (Hash) example:
- # SemanticLogger.tagged(tracking_number: 12345) do
- # logger.debug('Hello World')
- # end
- #
- # Notes:
- # - Tags should be a list without any empty values, or contain any array.
- # - `logger.tagged` is a slower api that will flatten the example below:
- # `logger.tagged([['first', nil], nil, ['more'], 'other'])`
- # to the equivalent of:
- # `logger.tagged('first', 'more', 'other')`
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:345
- def tagged(*tags, &block); end
-
- # Returns a copy of the [Array] of [String] tags currently active for this thread
- # Returns nil if no tags are set
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:364
- def tags; end
- end
-end
-
-# Formatting & colors used by optional color formatter
-#
-# pkg:gem/semantic_logger#lib/semantic_logger/ansi_colors.rb:3
-module SemanticLogger::AnsiColors; end
-
-# pkg:gem/semantic_logger#lib/semantic_logger/ansi_colors.rb:6
-SemanticLogger::AnsiColors::BLACK = T.let(T.unsafe(nil), String)
-
-# pkg:gem/semantic_logger#lib/semantic_logger/ansi_colors.rb:10
-SemanticLogger::AnsiColors::BLUE = T.let(T.unsafe(nil), String)
-
-# pkg:gem/semantic_logger#lib/semantic_logger/ansi_colors.rb:5
-SemanticLogger::AnsiColors::BOLD = T.let(T.unsafe(nil), String)
-
-# pkg:gem/semantic_logger#lib/semantic_logger/ansi_colors.rb:4
-SemanticLogger::AnsiColors::CLEAR = T.let(T.unsafe(nil), String)
-
-# pkg:gem/semantic_logger#lib/semantic_logger/ansi_colors.rb:12
-SemanticLogger::AnsiColors::CYAN = T.let(T.unsafe(nil), String)
-
-# pkg:gem/semantic_logger#lib/semantic_logger/ansi_colors.rb:8
-SemanticLogger::AnsiColors::GREEN = T.let(T.unsafe(nil), String)
-
-# pkg:gem/semantic_logger#lib/semantic_logger/ansi_colors.rb:11
-SemanticLogger::AnsiColors::MAGENTA = T.let(T.unsafe(nil), String)
-
-# pkg:gem/semantic_logger#lib/semantic_logger/ansi_colors.rb:7
-SemanticLogger::AnsiColors::RED = T.let(T.unsafe(nil), String)
-
-# pkg:gem/semantic_logger#lib/semantic_logger/ansi_colors.rb:13
-SemanticLogger::AnsiColors::WHITE = T.let(T.unsafe(nil), String)
-
-# pkg:gem/semantic_logger#lib/semantic_logger/ansi_colors.rb:9
-SemanticLogger::AnsiColors::YELLOW = T.let(T.unsafe(nil), String)
-
-# pkg:gem/semantic_logger#lib/semantic_logger/appender.rb:2
-module SemanticLogger::Appender
- class << self
- # Returns [SemanticLogger::Subscriber] appender for the supplied options
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender.rb:34
- def factory(async: T.unsafe(nil), batch: T.unsafe(nil), max_queue_size: T.unsafe(nil), lag_check_interval: T.unsafe(nil), lag_threshold_s: T.unsafe(nil), batch_size: T.unsafe(nil), batch_seconds: T.unsafe(nil), **args, &block); end
-
- private
-
- # Returns [Subscriber] instance from the supplied options.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender.rb:65
- def build(io: T.unsafe(nil), file_name: T.unsafe(nil), appender: T.unsafe(nil), metric: T.unsafe(nil), logger: T.unsafe(nil), **args, &block); end
- end
-end
-
-# Allow any appender to run asynchronously in a separate thread.
-#
-# pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:6
-class SemanticLogger::Appender::Async
- extend ::Forwardable
-
- # Appender proxy to allow an existing appender to run asynchronously in a separate thread.
- #
- # Parameters:
- # max_queue_size: [Integer]
- # The maximum number of log messages to hold on the queue before blocking attempts to add to the queue.
- # -1: The queue size is uncapped and will never block no matter how long the queue is.
- # Default: 10,000
- #
- # lag_threshold_s [Float]
- # Log a warning when a log message has been on the queue for longer than this period in seconds.
- # Default: 30
- #
- # lag_check_interval: [Integer]
- # Number of messages to process before checking for slow logging.
- # Default: 1,000
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:39
- def initialize(appender:, max_queue_size: T.unsafe(nil), lag_check_interval: T.unsafe(nil), lag_threshold_s: T.unsafe(nil)); end
-
- # Returns true if the worker thread is active
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:80
- def active?; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:10
- def appender; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:17
- def application(*args, **, &block); end
-
- # Returns [true|false] if the queue has a capped size.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:66
- def capped?; end
-
- # Close all appenders and flush any outstanding messages.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:96
- def close; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:18
- def environment(*args, **, &block); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:15
- def filter(*args, **, &block); end
-
- # Flush all queued log entries disk, database, etc.
- # All queued log messages are written and then each appender is flushed in turn.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:91
- def flush; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:16
- def host(*args, **, &block); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:9
- def lag_check_interval; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:9
- def lag_check_interval=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:9
- def lag_threshold_s; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:9
- def lag_threshold_s=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:19
- def level(*args, **, &block); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:20
- def level=(*args, **, &block); end
-
- # Add log message for processing.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:85
- def log(log); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:21
- def logger(*args, **, &block); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:22
- def logger=(*args, **, &block); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:10
- def max_queue_size; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:13
- def name(*args, **, &block); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:10
- def queue; end
-
- # Re-open appender after a fork
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:53
- def reopen; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:14
- def should_log?(*args, **, &block); end
-
- # Returns [Thread] the worker thread.
- #
- # Starts the worker thread if not running.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:73
- def thread; end
-
- private
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:181
- def check_lag(log); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:103
- def create_queue; end
-
- # Separate thread for batching up log messages before writing.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:114
- def process; end
-
- # Returns false when message processing should be stopped
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:166
- def process_message(message); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:147
- def process_messages; end
-
- # Submit command and wait for reply
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:189
- def submit_request(command); end
-end
-
-# Log asynchronously in batches using a separate thread.
-#
-# Log messages are grouped up and only logged when:
-# * The number of queued messages is exceeded.
-# * Or, the appropriate amount of time has passed since the last batch was sent.
-#
-# pkg:gem/semantic_logger#lib/semantic_logger/appender/async_batch.rb:8
-class SemanticLogger::Appender::AsyncBatch < ::SemanticLogger::Appender::Async
- # Batching Appender proxy for appenders that support batches.
- #
- # Parameters:
- # batch_size: [Integer]
- # Maximum number of messages to batch up before sending.
- # Default: 300
- #
- # batch_seconds: [Integer]
- # Maximum number of seconds between sending batches.
- # Default: 5
- #
- # See SemanticLogger::Appender::Async for other paramaters
- #
- # Note:
- # * `lag_check_interval` is not applicable to batches, since the first message of every batch
- # is the oldest and is always checked to see if the lag interval has been exceeded.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/async_batch.rb:28
- def initialize(appender:, max_queue_size: T.unsafe(nil), lag_threshold_s: T.unsafe(nil), batch_size: T.unsafe(nil), batch_seconds: T.unsafe(nil)); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/async_batch.rb:9
- def batch_seconds; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/async_batch.rb:9
- def batch_seconds=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/async_batch.rb:9
- def batch_size; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/async_batch.rb:9
- def batch_size=(_arg0); end
-
- # Add log message for processing.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/async_batch.rb:48
- def log(log); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/async_batch.rb:10
- def signal; end
-
- private
-
- # Separate thread for batching up log messages before writing.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/async_batch.rb:58
- def process_messages; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/async_batch.rb:86
- def submit_request(command); end
-end
-
-# pkg:gem/semantic_logger#lib/semantic_logger/appender/bugsnag.rb:14
-class SemanticLogger::Appender::Bugsnag < ::SemanticLogger::Subscriber
- # Create Bugsnag Error / Exception Appender
- #
- # Parameters
- # level: [:trace | :debug | :info | :warn | :error | :fatal]
- # Override the log level for this appender.
- # Default: :error
- #
- # formatter: [Object|Proc]
- # An instance of a class that implements #call, or a Proc to be used to format
- # the output from this appender
- # Default: Use the built-in formatter (See: #call)
- #
- # filter: [Regexp|Proc]
- # RegExp: Only include log messages where the class name matches the supplied.
- # regular expression. All other messages will be ignored.
- # Proc: Only include log messages where the supplied Proc returns true
- # The Proc must return true or false.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/bugsnag.rb:32
- def initialize(level: T.unsafe(nil), **args, &block); end
-
- # Returns [Hash] of parameters to send to Bugsnag.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/bugsnag.rb:43
- def call(log, logger); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/bugsnag.rb:53
- def log(log); end
-
- private
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/bugsnag.rb:66
- def bugsnag_notify(exception, hash, level); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/bugsnag.rb:78
- def extract_exception(log); end
-
- # Bugsnag supports: error, warning or info
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/bugsnag.rb:91
- def log_level(level); end
-end
-
-# pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_http.rb:15
-class SemanticLogger::Appender::ElasticsearchHttp < ::SemanticLogger::Appender::Http
- # Create Elasticsearch appender over persistent HTTP(S)
- #
- # Parameters:
- # index: [String]
- # Prefix of the index to store the logs in Elasticsearch.
- # The final index appends the date so that indexes are used per day.
- # I.e. The final index will look like 'semantic_logger-YYYY.MM.DD'
- # Default: 'semantic_logger'
- #
- # type: [String]
- # Document type to associate with logs when they are written.
- # Deprecated in Elasticsearch 7.0.0
- # Default: 'log'
- #
- # level: [:trace | :debug | :info | :warn | :error | :fatal]
- # Override the log level for this appender.
- # Default: SemanticLogger.default_level
- #
- # formatter: [Object|Proc|Symbol|Hash]
- # An instance of a class that implements #call, or a Proc to be used to format
- # the output from this appender
- # Default: Use the built-in formatter (See: #call)
- #
- # filter: [Regexp|Proc]
- # RegExp: Only include log messages where the class name matches the supplied.
- # regular expression. All other messages will be ignored.
- # Proc: Only include log messages where the supplied Proc returns true
- # The Proc must return true or false.
- #
- # host: [String]
- # Name of this host to appear in log messages.
- # Default: SemanticLogger.host
- #
- # application: [String]
- # Name of this application to appear in log messages.
- # Default: SemanticLogger.application
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_http.rb:54
- def initialize(index: T.unsafe(nil), type: T.unsafe(nil), url: T.unsafe(nil), **http_args, &block); end
-
- # Deletes all log data captured for a day.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_http.rb:73
- def delete_all(date = T.unsafe(nil)); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_http.rb:16
- def index; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_http.rb:16
- def index=(_arg0); end
-
- # Log to the index for today.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_http.rb:68
- def log(log); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_http.rb:16
- def type; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_http.rb:16
- def type=(_arg0); end
-end
-
-# pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:8
-class SemanticLogger::Appender::File < ::SemanticLogger::Subscriber
- # Create an appender to log to a named file.
- #
- # Parameters
- # file_name [String]
- # Name of the file to write to.
- #
- # File name format directives:
- # %p - Process Id
- # %n - Short hostname (SemanticLogger.host). Everything before the first period in the hostname.
- # %N - Full hostname (SemanticLogger.host)
- # %a - Application name (SemanticLogger.application)
- # %e - Environment name (SemanticLogger.environment)
- # %D - Current Date. Equivalent to "%Y%m%d"
- # %T - Current Time. Equivalent to "%H%M%S"
- # %% - Literal `%` character
- #
- # Date:
- # %Y - Year with century
- # %C - year / 100 (round down. 20 in 2009)
- # %y - year % 100 (00..99)
- # %m - Month of the year, zero-padded (01..12)
- # %d - Day of the month, zero-padded (01..31)
- # %j - Day of the year (001..366)
- # %U - Week number of the year. The week starts with Sunday. (00..53)
- # %W - Week number of the year. The week starts with Monday. (00..53)
- #
- # Time:
- # %H - 24 Hour of the day, zero-padded (00..23)
- # %M - Minute of the hour (00..59)
- # %S - Second of the minute (00..60)
- #
- # Examples:
- # Create a log file name consisting of the short host name, process id, date, and time.
- # "log/production-%n-%p-%D-%T.log"
- #
- # :level [:trace | :debug | :info | :warn | :error | :fatal]
- # Override the log level for this appender.
- # Default: SemanticLogger.default_level
- #
- # :formatter: [Object|Proc]
- # An instance of a class that implements #call, or a Proc to be used to format
- # the output from this appender
- # Default: Use the built-in formatter (See: #call)
- #
- # :filter [Regexp|Proc]
- # RegExp: Only include log messages where the class name matches the supplied
- # regular expression. All other messages will be ignored.
- # Proc: Only include log messages where the supplied Proc returns true
- # The Proc must return true or false.
- #
- # :append [true|false]
- # Append to the log file if already present?
- # Default: true
- #
- # :exclusive_lock [true|false]
- # Obtain an exclusive lock on the file, for operating systems that support it.
- # Prevents multiple processes from trying to write to the same log file.
- # Default: false
- #
- # :encoding ["UTF-8", "UTF-16", etc.]
- # Encoding to use when writing to the file.
- # Default: Encoding::BINARY
- #
- # :retry_count [Integer]
- # Number of times to attempt to re-open the file name when an error occurs trying to
- # write to the file.
- # Note: Set to 0 to disable retries.
- # Default: 1
- #
- # :reopen_period [String]
- # Specify a period after which to re-open the log file, specified in minutes, hours, or days.
- # The format of the duration must start with an Integer or Float number,
- # followed by the duration specified as:
- # "m" : minutes
- # "h" : hours
- # "d" : days
- # The time is rounded down to the specified time interval, so that:
- # - "1h" will re-open every hour at the beginning of the hour.
- # - "30m" will re-open every 30 minutes at the beginning of the 30th minute.
- # - "1d" will re-open every day at midnight.
- # Examples:
- # "60m" : Every 60 minutes at the beginning of the minute: 10:24:00, 11:24:00, 12:24:00, ...
- # "1h" : Every hour at the beginning of the hour: 10:00:00, 11:00:00, 12:00:00, ...
- # "1d" : Every day at the beginning of the day: "20211008 00:00:00", "20211009 00:00:00", ...
- # Default: nil (Disabled)
- #
- # :reopen_count [Integer]
- # Close and re-open the log file after every `reopen_count` number of logged entries.
- # Default: 0 (Disabled)
- #
- # :reopen_size [Integer]
- # Approximate number of bytes to write to a log file by this process before closing and re-opening it.
- # Notes:
- # - When `append: true` and the file already exists, it reads the size of the current log file
- # and starts with that size.
- # - If the current log file size already exceeds the `reopen_size`, its current size is ignored.
- # - The `reopen_size` is only the amount of bytes written by this process, it excludes data
- # written by other processes. Use a unique filename to prevent multiple processes from writing to
- # the same log file at the same time.
- # Default: 0 (Disabled)
- #
- # Example
- # require "semantic_logger"
- #
- # # Enable trace level logging
- # SemanticLogger.default_level = :info
- #
- # # Log to a file
- # SemanticLogger.add_appender(file_name: "application.log", formatter: :color)
- #
- # logger = SemanticLogger["test"]
- # logger.info "Hello World"
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:125
- def initialize(file_name, retry_count: T.unsafe(nil), append: T.unsafe(nil), reopen_period: T.unsafe(nil), reopen_count: T.unsafe(nil), reopen_size: T.unsafe(nil), encoding: T.unsafe(nil), exclusive_lock: T.unsafe(nil), **args, &block); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:9
- def append; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:9
- def append=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:11
- def current_file_name; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:9
- def encoding; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:9
- def encoding=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:9
- def exclusive_lock; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:9
- def exclusive_lock=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:9
- def file_name; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:9
- def file_name=(_arg0); end
-
- # Flush all pending logs to disk.
- # Waits for all sent documents to be written to disk
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:206
- def flush; end
-
- # Since only one appender thread will be writing to the file at a time
- # it is not necessary to protect access to the file with a semaphore.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:184
- def log(log); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:11
- def log_count; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:11
- def log_size; end
-
- # After forking an active process call #reopen to re-open
- # open the file handles etc to resources.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:149
- def reopen; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:11
- def reopen_at; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:9
- def reopen_count; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:9
- def reopen_count=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:9
- def reopen_period; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:9
- def reopen_period=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:9
- def reopen_size; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:9
- def reopen_size=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:9
- def retry_count; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:9
- def retry_count=(_arg0); end
-
- private
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:222
- def apply_format_directives(file_name); end
-
- # Round down the current time based on the period, then add on the duration for that period
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:281
- def calculate_reopen_at(duration, period, time = T.unsafe(nil)); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:212
- def current_file_name=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:228
- def format_directive(directive); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:212
- def log_count=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:212
- def log_size=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:255
- def next_reopen_period(period_string); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:262
- def parse_period(period_string); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:212
- def reopen_at=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:214
- def time_to_reopen?; end
-end
-
-# pkg:gem/semantic_logger#lib/semantic_logger/appender/honeybadger.rb:14
-class SemanticLogger::Appender::Honeybadger < ::SemanticLogger::Subscriber
- # Honeybadger Appender
- #
- # Parameters
- # level: [:trace | :debug | :info | :warn | :error | :fatal]
- # Override the log level for this appender.
- # Default: :error
- #
- # formatter: [Object|Proc|Symbol|Hash]
- # An instance of a class that implements #call, or a Proc to be used to format
- # the output from this appender
- # Default: Use the built-in formatter (See: #call)
- #
- # filter: [Regexp|Proc]
- # RegExp: Only include log messages where the class name matches the supplied.
- # regular expression. All other messages will be ignored.
- # Proc: Only include log messages where the supplied Proc returns true
- # The Proc must return true or false.
- #
- # host: [String]
- # Name of this host to appear in log messages.
- # Default: SemanticLogger.host
- #
- # application: [String]
- # Name of this application to appear in log messages.
- # Default: SemanticLogger.application
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/honeybadger.rb:40
- def initialize(level: T.unsafe(nil), **args, &block); end
-
- # Send an error notification to honeybadger
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/honeybadger.rb:45
- def log(log); end
-
- private
-
- # Use Raw Formatter by default
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/honeybadger.rb:65
- def default_formatter; end
-end
-
-# pkg:gem/semantic_logger#lib/semantic_logger/appender/honeybadger_insights.rb:14
-class SemanticLogger::Appender::HoneybadgerInsights < ::SemanticLogger::Subscriber
- # Honeybadger Appender
- #
- # Parameters
- # level: [:trace | :debug | :info | :warn | :error | :fatal]
- # Override the log level for this appender.
- # Default: :error
- #
- # formatter: [Object|Proc|Symbol|Hash]
- # An instance of a class that implements #call, or a Proc to be used to format
- # the output from this appender
- # Default: Use the built-in formatter (See: #call)
- #
- # filter: [Regexp|Proc]
- # RegExp: Only include log messages where the class name matches the supplied.
- # regular expression. All other messages will be ignored.
- # Proc: Only include log messages where the supplied Proc returns true
- # The Proc must return true or false.
- #
- # host: [String]
- # Name of this host to appear in log messages.
- # Default: SemanticLogger.host
- #
- # application: [String]
- # Name of this application to appear in log messages.
- # Default: SemanticLogger.application
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/honeybadger_insights.rb:40
- def initialize(level: T.unsafe(nil), **args, &block); end
-
- # Send log to honeybadger events API
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/honeybadger_insights.rb:45
- def log(log); end
-
- private
-
- # Use Raw Formatter by default
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/honeybadger_insights.rb:56
- def default_formatter; end
-end
-
-# pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:21
-class SemanticLogger::Appender::Http < ::SemanticLogger::Subscriber
- # Create HTTP(S) log appender
- #
- # Parameters:
- # url: [String]
- # Valid URL to post to.
- # Example: http://example.com/some_path
- # To enable SSL include https in the URL.
- # Example: https://example.com/some_path
- # verify_mode will default: OpenSSL::SSL::VERIFY_PEER
- #
- # application: [String]
- # Name of this application to appear in log messages.
- # Default: SemanticLogger.application
- #
- # host: [String]
- # Name of this host to appear in log messages.
- # Default: SemanticLogger.host
- #
- # username: [String]
- # User name for basic Authentication.
- # Default: nil ( do not use basic auth )
- #
- # password: [String]
- # Password for basic Authentication.
- #
- # header: [Hash]
- # Custom HTTP headers to send with each request.
- # Default: {} ( do not send any custom headers)
- # Example: {"Authorization" => "Bearer BEARER_TOKEN"}
- #
- # compress: [true|false]
- # Whether to compress the JSON string with GZip.
- # Default: false
- #
- # ssl: [Hash]
- # Specific SSL options: For more details see NET::HTTP.start
- # ca_file, ca_path, cert, cert_store, ciphers, key, ssl_timeout,
- # ssl_version, verify_callback, verify_depth and verify_mode.
- #
- # proxy_url: [String]
- # URL of proxy server to use for HTTP(s) connections. Should
- # include username and password if required.
- # Example: http://user@pass:example.com/some_path
- # To enable SSL include https in the URL.
- # Example: https://example.com/some_path
- # If this is set to :ENV, Net::HTTP will use the environment http_proxy*
- # variables if they are set. If set to nil then no proxy will be used,
- # even if the environment variables are set.
- #
- # level: [:trace | :debug | :info | :warn | :error | :fatal]
- # Override the log level for this appender.
- # Default: SemanticLogger.default_level
- #
- # formatter: [Object|Proc]
- # An instance of a class that implements #call, or a Proc to be used to format
- # the output from this appender
- # Default: Use the built-in formatter (See: #call)
- #
- # filter: [Regexp|Proc]
- # RegExp: Only include log messages where the class name matches the supplied.
- # regular expression. All other messages will be ignored.
- # Proc: Only include log messages where the supplied Proc returns true
- # The Proc must return true or false.
- #
- # open_timeout: [Float]
- # Default: 2.0
- #
- # read_timeout: [Float]
- # Default: 1.0
- #
- # continue_timeout: [Float]
- # Default: 1.0
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:98
- def initialize(url:, compress: T.unsafe(nil), ssl: T.unsafe(nil), username: T.unsafe(nil), password: T.unsafe(nil), header: T.unsafe(nil), proxy_url: T.unsafe(nil), open_timeout: T.unsafe(nil), read_timeout: T.unsafe(nil), continue_timeout: T.unsafe(nil), **args, &block); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:22
- def compress; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:22
- def compress=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:22
- def continue_timeout; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:22
- def continue_timeout=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:22
- def header; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:22
- def header=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:24
- def http; end
-
- # Forward log messages to HTTP Server
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:188
- def log(log); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:22
- def open_timeout; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:22
- def open_timeout=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:24
- def path; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:24
- def port; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:24
- def proxy_url; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:22
- def read_timeout; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:22
- def read_timeout=(_arg0); end
-
- # Re-open after process fork
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:159
- def reopen; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:24
- def server; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:24
- def ssl_options; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:24
- def url; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:22
- def username; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:22
- def username=(_arg0); end
-
- private
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:201
- def compress_data(data); end
-
- # Use JSON Formatter by default
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:197
- def default_formatter; end
-
- # HTTP Delete
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:222
- def delete(request_uri = T.unsafe(nil)); end
-
- # HTTP Post
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:210
- def post(body, request_uri = T.unsafe(nil)); end
-
- # Process HTTP Request
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:228
- def process_request(request, body = T.unsafe(nil)); end
-
- # HTTP Put
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:216
- def put(body, request_uri = T.unsafe(nil)); end
-end
-
-# pkg:gem/semantic_logger#lib/semantic_logger/appender/io.rb:7
-class SemanticLogger::Appender::IO < ::SemanticLogger::Subscriber
- # Create a Stream Logger appender instance.
- #
- # Parameters
- # io [IO]
- # An IO stream to which to write the log messages to.
- #
- # :level [:trace | :debug | :info | :warn | :error | :fatal]
- # Override the log level for this appender.
- # Default: SemanticLogger.default_level
- #
- # :formatter: [Object|Proc]
- # An instance of a class that implements #call, or a Proc to be used to format
- # the output from this appender
- # Default: Use the built-in formatter (See: #call)
- #
- # :filter [Regexp|Proc]
- # RegExp: Only include log messages where the class name matches the supplied
- # regular expression. All other messages will be ignored.
- # Proc: Only include log messages where the supplied Proc returns true
- # The Proc must return true or false.
- #
- # Example
- # require "semantic_logger"
- #
- # # Enable trace level logging
- # SemanticLogger.default_level = :info
- #
- # # Log to screen
- # SemanticLogger.add_appender(io: $stdout, formatter: :color)
- #
- # logger = SemanticLogger['test']
- # logger.info 'Hello World'
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/io.rb:40
- def initialize(io, **args, &block); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/io.rb:63
- def console_output?; end
-
- # Flush all pending logs to disk.
- # Waits for all sent documents to be written to disk
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/io.rb:59
- def flush; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/io.rb:49
- def log(log); end
-end
-
-# pkg:gem/semantic_logger#lib/semantic_logger/appender/loki.rb:13
-class SemanticLogger::Appender::Loki < ::SemanticLogger::Appender::Http
- # Create Grafana Loki appender.
- #
- # Parameters:
- # filter: [Regexp|Proc]
- # RegExp: Only include log messages where the class name matches the supplied
- # regular expression. All other messages will be ignored.
- # Proc: Only include log messages where the supplied Proc returns true.
- # The Proc must return true or false.
- #
- # host: [String]
- # Name of this host to send as a dimension.
- # Default: SemanticLogger.host
- #
- # application: [String]
- # Name of this application to send as a dimension.
- # Default: SemanticLogger.application
- #
- # url: [String]
- # Define the loki instance URL.
- # Example: https://logs-prod-999.grafana.net
- # Default: nil
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/loki.rb:37
- def initialize(url: T.unsafe(nil), formatter: T.unsafe(nil), header: T.unsafe(nil), path: T.unsafe(nil), **args, &block); end
-
- # Logs in batches
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/loki.rb:55
- def batch(logs); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/loki.rb:47
- def log(log); end
-end
-
-# pkg:gem/semantic_logger#lib/semantic_logger/appender/loki.rb:14
-SemanticLogger::Appender::Loki::INGESTION_PATH = T.let(T.unsafe(nil), String)
-
-# pkg:gem/semantic_logger#lib/semantic_logger/appender/sentry_ruby.rb:14
-class SemanticLogger::Appender::SentryRuby < ::SemanticLogger::Subscriber
- # Create Appender
- #
- # Parameters
- # level: [:trace | :debug | :info | :warn | :error | :fatal]
- # Override the log level for this appender.
- # Default: :error
- #
- # formatter: [Object|Proc|Symbol|Hash]
- # An instance of a class that implements #call, or a Proc to be used to format
- # the output from this appender
- # Default: Use the built-in formatter (See: #call)
- #
- # filter: [Regexp|Proc]
- # RegExp: Only include log messages where the class name matches the supplied.
- # regular expression. All other messages will be ignored.
- # Proc: Only include log messages where the supplied Proc returns true
- # The Proc must return true or false.
- #
- # host: [String]
- # Name of this host to appear in log messages.
- # Default: SemanticLogger.host
- #
- # application: [String]
- # Name of this application to appear in log messages.
- # Default: SemanticLogger.application
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/sentry_ruby.rb:40
- def initialize(level: T.unsafe(nil), **args, &block); end
-
- # Send an error notification to sentry
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/sentry_ruby.rb:53
- def log(log); end
-
- private
-
- # Use Raw Formatter by default
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/sentry_ruby.rb:91
- def default_formatter; end
-
- # Extract tags.
- #
- # Named tags will be stringified (both key and value).
- # Unnamed tags will be stringified and joined with a comma. Then they will
- # be used as a "tag" named tag. If such a tag already exists, it is also
- # joined with a comma.
- #
- # Finally, the tag names are limited to 32 characters and the tag values to 256.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/sentry_ruby.rb:134
- def extract_tags!(context); end
-
- # Extract user data from named tags or payload.
- #
- # Keys :user_id and :user_email will be used as :id and :email respectively.
- # Keys :username and :ip_address will be used verbatim.
- #
- # Any additional value nested in a :user key will be added, provided any of
- # the above keys is already present.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/sentry_ruby.rb:103
- def extract_user!(*sources); end
-end
-
-# pkg:gem/semantic_logger#lib/semantic_logger/appender/splunk_http.rb:17
-class SemanticLogger::Appender::SplunkHttp < ::SemanticLogger::Appender::Http
- # Create Splunk appender over persistent HTTP(S)
- #
- # Parameters:
- # token: [String]
- # Token created in Splunk for this HTTP Appender
- # Mandatory.
- #
- # source_type: [String]
- # Optional: Source type to display in Splunk
- #
- # index: [String]
- # Optional: Name of a valid index for this message in Splunk.
- #
- # url: [String]
- # Valid URL to post to.
- # Example: http://example.com
- # To enable SSL include https in the URL.
- # Example: https://example.com
- # verify_mode will default: OpenSSL::SSL::VERIFY_PEER
- #
- # application: [String]
- # Name of this application to appear in log messages.
- # Default: SemanticLogger.application
- #
- # host: [String]
- # Name of this host to appear in log messages.
- # Default: SemanticLogger.host
- #
- # compress: [true|false]
- # Splunk supports HTTP Compression, enable by default.
- # Default: true
- #
- # ssl: [Hash]
- # Specific SSL options: For more details see NET::HTTP.start
- # ca_file, ca_path, cert, cert_store, ciphers, key, open_timeout, read_timeout, ssl_timeout,
- # ssl_version, use_ssl, verify_callback, verify_depth and verify_mode.
- #
- # level: [:trace | :debug | :info | :warn | :error | :fatal]
- # Override the log level for this appender.
- # Default: SemanticLogger.default_level
- #
- # formatter: [Object|Proc]
- # An instance of a class that implements #call, or a Proc to be used to format
- # the output from this appender
- # Default: Use the built-in formatter (See: #call)
- #
- # filter: [Regexp|Proc]
- # RegExp: Only include log messages where the class name matches the supplied.
- # regular expression. All other messages will be ignored.
- # Proc: Only include log messages where the supplied Proc returns true
- # The Proc must return true or false.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/splunk_http.rb:71
- def initialize(token: T.unsafe(nil), source_type: T.unsafe(nil), index: T.unsafe(nil), compress: T.unsafe(nil), **args, &block); end
-
- # Returns [String] JSON to send to Splunk.
- #
- # For splunk format requirements see:
- # https://docs.splunk.com/Documentation/Splunk/latest/Data/FormateventsforHTTPEventCollector
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/splunk_http.rb:90
- def call(log, logger); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/splunk_http.rb:18
- def index; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/splunk_http.rb:18
- def index=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/splunk_http.rb:18
- def source_type; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/splunk_http.rb:18
- def source_type=(_arg0); end
-end
-
-# UDP log appender.
-#
-# Write log messages to UDP.
-# By default messages are in JSON format.
-#
-# Example:
-# SemanticLogger.add_appender(
-# appender: :udp,
-# server: 'server:3300',
-# )
-#
-# pkg:gem/semantic_logger#lib/semantic_logger/appender/udp.rb:14
-class SemanticLogger::Appender::Udp < ::SemanticLogger::Subscriber
- # Create UDP log appender.
- #
- # server: [String]
- # URL of the server to write UDP messages to.
- #
- # udp_flags: [Integer]
- # Should be a bitwise OR of Socket::MSG_* constants.
- # Default: 0
- #
- # Common Appender Parameters:
- # application: [String]
- # Name of this application to appear in log messages.
- # Default: SemanticLogger.application
- #
- # host: [String]
- # Name of this host to appear in log messages.
- # Default: SemanticLogger.host
- #
- # level: [:trace | :debug | :info | :warn | :error | :fatal]
- # Override the log level for this appender.
- # Default: SemanticLogger.default_level
- #
- # formatter: [Object|Proc]
- # An instance of a class that implements #call, or a Proc to be used to format
- # the output from this appender
- # Default: Use the built-in formatter (See: #call)
- #
- # filter: [Regexp|Proc]
- # RegExp: Only include log messages where the class name matches the supplied.
- # regular expression. All other messages will be ignored.
- # Proc: Only include log messages where the supplied Proc returns true
- # The Proc must return true or false.
- #
- # metrics: [Boolean]
- # Send metrics only events over udp.
- # Default: true
- #
- # Limitations:
- # * UDP packet size is limited by the connected network and any routers etc
- # that the message has to traverse. See https://en.wikipedia.org/wiki/Maximum_transmission_unit
- #
- # Example:
- # SemanticLogger.add_appender(
- # appender: :udp,
- # server: 'server:3300'
- # )
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/udp.rb:64
- def initialize(server:, udp_flags: T.unsafe(nil), metrics: T.unsafe(nil), **args, &block); end
-
- # Close is called during shutdown, or with reopen
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/udp.rb:93
- def close; end
-
- # Flush is called by the semantic_logger during shutdown.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/udp.rb:88
- def flush; end
-
- # Write the log using the specified protocol and server.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/udp.rb:82
- def log(log); end
-
- # After forking an active process call #reopen to re-open
- # open the handles to resources
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/udp.rb:74
- def reopen; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/udp.rb:15
- def server; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/udp.rb:15
- def server=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/udp.rb:16
- def socket; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/udp.rb:15
- def udp_flags; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/udp.rb:15
- def udp_flags=(_arg0); end
-
- private
-
- # Returns [SemanticLogger::Formatters::Default] formatter default for this Appender
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/udp.rb:100
- def default_formatter; end
-end
-
-# pkg:gem/semantic_logger#lib/semantic_logger/appender/wrapper.rb:6
-class SemanticLogger::Appender::Wrapper < ::SemanticLogger::Subscriber
- # Forward all logging calls to the supplied logging instance.
- #
- # Parameters
- # logger: [Object]
- # Instance of an existing logger conforming to the Ruby Logger methods.
- #
- # level: [:trace | :debug | :info | :warn | :error | :fatal]
- # Override the log level for this appender.
- # Default: SemanticLogger.default_level
- #
- # formatter: [Object|Proc]
- # An instance of a class that implements #call, or a Proc to be used to format
- # the output from this appender
- # Default: Use the built-in formatter (See: #call)
- #
- # filter: [Regexp|Proc]
- # RegExp: Only include log messages where the class name matches the supplied.
- # regular expression. All other messages will be ignored.
- # Proc: Only include log messages where the supplied Proc returns true
- # The Proc must return true or false.
- #
- # Ruby Logger
- # require 'logger'
- # require 'semantic_logger'
- #
- # ruby_logger = Logger.new($stdout)
- # SemanticLogger.add_appender(logger: ruby_logger)
- #
- # logger = SemanticLogger['test']
- # logger.info('Hello World', some: :payload)
- #
- # Install the `rails_semantic_logger` gem to replace the Rails logger with Semantic Logger.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/wrapper.rb:41
- def initialize(logger:, **args, &block); end
-
- # Close underlying log
- # Waits for all queued log messages to be written to disk.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/wrapper.rb:71
- def close; end
-
- # Flush all pending logs to disk.
- # Waits for all queued log messages to be written to disk.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/wrapper.rb:65
- def flush; end
-
- # Pass log calls to the underlying Rails, log4j or Ruby logger
- # trace entries are mapped to debug since :trace is not supported by the
- # Ruby or Rails Loggers
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/wrapper.rb:57
- def log(log); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appender/wrapper.rb:7
- def logger; end
-end
-
-# Manage a collection of appenders.
-#
-# pkg:gem/semantic_logger#lib/semantic_logger/appenders.rb:3
-class SemanticLogger::Appenders < ::Concurrent::Array
- # pkg:gem/semantic_logger#lib/semantic_logger/appenders.rb:6
- def initialize(logger = T.unsafe(nil)); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appenders.rb:12
- def add(**args, &block); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appenders.rb:48
- def close; end
-
- # Whether any of the existing appenders already output to the console?
- # I.e. Writes to stdout or stderr.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appenders.rb:26
- def console_output?; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appenders.rb:38
- def flush; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appenders.rb:30
- def log(log); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appenders.rb:4
- def logger; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/appenders.rb:4
- def logger=(_arg0); end
-
- # After a fork reopen each appender.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/appenders.rb:64
- def reopen; end
-end
-
-# pkg:gem/semantic_logger#lib/semantic_logger/base.rb:8
-class SemanticLogger::Base
- # Initializer for Abstract Class SemanticLogger::Base
- #
- # Parameters
- # klass [String]
- # Name of the class, module, or other identifier for which the log messages
- # are being logged
- #
- # level [Symbol]
- # Only allow log entries of this level or higher to be written to this appender
- # For example if set to :warn, this appender would only log :warn and :fatal
- # log messages when other appenders could be logging :info and lower
- #
- # filter [Regexp|Proc|Module]
- # RegExp: Only include log messages where the class name matches the supplied
- # regular expression. All other messages will be ignored
- # Proc: Only include log messages where the supplied Proc returns true
- # The Proc must return true or false
- # Module: A module that implements `.call`. For example:
- # module ComplexFilter
- # def self.call(log)
- # (/\AExclude/ =~ log.message).nil?
- # end
- # end
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:291
- def initialize(klass, level = T.unsafe(nil), filter = T.unsafe(nil)); end
-
- # Log a thread backtrace
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:140
- def backtrace(thread: T.unsafe(nil), level: T.unsafe(nil), message: T.unsafe(nil), payload: T.unsafe(nil), metric: T.unsafe(nil), metric_amount: T.unsafe(nil)); end
-
- # Backward compatibility
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:137
- def benchmark(level, message, params = T.unsafe(nil), &block); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:94
- def benchmark_debug(message, params = T.unsafe(nil), &block); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:94
- def benchmark_error(message, params = T.unsafe(nil), &block); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:94
- def benchmark_fatal(message, params = T.unsafe(nil), &block); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:94
- def benchmark_info(message, params = T.unsafe(nil), &block); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:94
- def benchmark_trace(message, params = T.unsafe(nil), &block); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:94
- def benchmark_warn(message, params = T.unsafe(nil), &block); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:94
- def debug(message = T.unsafe(nil), payload = T.unsafe(nil), exception = T.unsafe(nil), &block); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:94
- def debug?; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:94
- def error(message = T.unsafe(nil), payload = T.unsafe(nil), exception = T.unsafe(nil), &block); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:94
- def error?; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:252
- def fast_tag(tag, &block); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:94
- def fatal(message = T.unsafe(nil), payload = T.unsafe(nil), exception = T.unsafe(nil), &block); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:94
- def fatal?; end
-
- # Class name to be logged
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:10
- def filter; end
-
- # Class name to be logged
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:10
- def filter=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:94
- def info(message = T.unsafe(nil), payload = T.unsafe(nil), exception = T.unsafe(nil), &block); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:94
- def info?; end
-
- # Returns the current log level if set, otherwise it returns the global
- # default log level
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:33
- def level; end
-
- # Set the logging level for this logger
- #
- # Note: This level is only for this particular instance. It does not override
- # the log level in any logging instance or the default log level
- # SemanticLogger.default_level
- #
- # Must be one of the values in SemanticLogger::LEVELS, or
- # nil if this logger instance should use the global default level
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:20
- def level=(level); end
-
- # Write log data to underlying data storage
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:257
- def log(_log_); end
-
- # Dynamically supply the log level with every measurement call
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:127
- def measure(level, message, params = T.unsafe(nil), &block); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:94
- def measure_debug(message, params = T.unsafe(nil), &block); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:94
- def measure_error(message, params = T.unsafe(nil), &block); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:94
- def measure_fatal(message, params = T.unsafe(nil), &block); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:94
- def measure_info(message, params = T.unsafe(nil), &block); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:94
- def measure_trace(message, params = T.unsafe(nil), &block); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:94
- def measure_warn(message, params = T.unsafe(nil), &block); end
-
- # Class name to be logged
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:10
- def name; end
-
- # Class name to be logged
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:10
- def name=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:225
- def named_tags; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:242
- def pop_tags(quantity = T.unsafe(nil)); end
-
- # Returns the list of tags pushed after flattening them out and removing blanks
- #
- # Note:
- # - This method is slow since it needs to flatten the tags and remove empty elements
- # to support Rails 4.
- # - For better performance with clean tags, use `SemanticLogger.push_tags`
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:235
- def push_tags(*tags); end
-
- # Whether this log entry meets the criteria to be logged by this appender.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:262
- def should_log?(log); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:247
- def silence(new_level = T.unsafe(nil), &block); end
-
- # Add the tags or named tags to the list of tags to log for this thread whilst the supplied block is active.
- #
- # Returns result of block.
- #
- # Tagged example:
- # SemanticLogger.tagged(12345, 'jack') do
- # logger.debug('Hello World')
- # end
- #
- # Named Tags (Hash) example:
- # SemanticLogger.tagged(tracking_number: 12345) do
- # logger.debug('Hello World')
- # end
- #
- # Notes:
- # - Named tags are the recommended approach since the tag consists of a name value pair this is more useful
- # than just a string value in the logs, or centralized logging system.
- # - This method is slow when using multiple text tags since it needs to flatten the tags and
- # remove empty elements to support Rails 4.
- # - It is recommended to keep tags as a list without any empty values, or contain any child arrays.
- # However, this api will convert:
- # `logger.tagged([['first', nil], nil, ['more'], 'other'])`
- # to:
- # `logger.tagged('first', 'more', 'other')`
- # - For better performance with clean tags, see `SemanticLogger.tagged`.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:201
- def tagged(*tags); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:221
- def tags; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:94
- def trace(message = T.unsafe(nil), payload = T.unsafe(nil), exception = T.unsafe(nil), &block); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:94
- def trace?; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:94
- def warn(message = T.unsafe(nil), payload = T.unsafe(nil), exception = T.unsafe(nil), &block); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:94
- def warn?; end
-
- # Set the logging level for this logger during the execution of the given block
- #
- # Refer to the documentation for `#level=` for more information about the possible log levels.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:40
- def with_level(new_level); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:218
- def with_tags(*tags); end
-
- private
-
- # Whether to log the supplied message based on the current filter if any
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:316
- def filtered?(log); end
-
- # Return the level index for fast comparisons
- # Returns the global default level index if the level has not been explicitly
- # set for this instance
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:311
- def level_index; end
-
- # Log message at the specified level
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:328
- def log_internal(level, index, message = T.unsafe(nil), payload = T.unsafe(nil), exception = T.unsafe(nil)); end
-
- # Measure the supplied block and log the message
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:370
- def measure_internal(level, index, message, params); end
-
- # For measuring methods and logging their duration.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:425
- def measure_method(index:, level:, message:, min_duration:, metric:, log_exception:, on_exception_level:); end
-
- # Ensure minimum log level is met
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:323
- def meets_log_level?(log); end
-end
-
-# pkg:gem/semantic_logger#lib/semantic_logger/concerns/compatibility.rb:4
-module SemanticLogger::Concerns; end
-
-# pkg:gem/semantic_logger#lib/semantic_logger/concerns/compatibility.rb:6
-module SemanticLogger::Concerns::Compatibility
- # pkg:gem/semantic_logger#lib/semantic_logger/concerns/compatibility.rb:40
- def add(severity, message = T.unsafe(nil), progname = T.unsafe(nil), &block); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/concerns/compatibility.rb:32
- def close; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/concerns/compatibility.rb:36
- def reopen(logdev = T.unsafe(nil)); end
-
- class << self
- # For compatibility with Ruby Logger only.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/concerns/compatibility.rb:10
- def included(base); end
- end
-end
-
-# Custom logger that maps all calls to debug to trace calls
-# This is useful for existing gems / libraries that log too much to debug
-# when most of the debug logging should be at the trace level
-#
-# pkg:gem/semantic_logger#lib/semantic_logger/debug_as_trace_logger.rb:5
-class SemanticLogger::DebugAsTraceLogger < ::SemanticLogger::Logger
- # pkg:gem/semantic_logger#lib/semantic_logger/debug_as_trace_logger.rb:9
- def benchmark_debug(message, params = T.unsafe(nil), &block); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/debug_as_trace_logger.rb:6
- def debug(message = T.unsafe(nil), payload = T.unsafe(nil), exception = T.unsafe(nil), &block); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/debug_as_trace_logger.rb:7
- def debug?; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/debug_as_trace_logger.rb:8
- def measure_debug(message, params = T.unsafe(nil), &block); end
-end
-
-# pkg:gem/semantic_logger#lib/semantic_logger/formatters.rb:2
-module SemanticLogger::Formatters
- class << self
- # Return formatter that responds to call.
- #
- # Supports formatter supplied as:
- # - Symbol
- # - Hash ( Symbol => { options })
- # - Instance of any of SemanticLogger::Formatters
- # - Proc
- # - Any object that responds to :call
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters.rb:26
- def factory(formatter); end
- end
-end
-
-# pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:4
-class SemanticLogger::Formatters::Base
- # Parameters
- # time_format: [String|Symbol|nil]
- # See Time#strftime for the format of this string.
- # :iso_8601 Outputs an ISO8601 Formatted timestamp.
- # :ms Output in miliseconds since epoch.
- # :notime Returns an empty string for time ( no time is output ).
- # Default: '%Y-%m-%d %H:%M:%S.%N'
- # log_host: [Boolean]
- # Whether or not to include hostname in logs
- # Default: true
- # log_application: [Boolean]
- # Whether or not to include application name in logs
- # Default: true
- # precision: [Integer]
- # How many fractional digits to log times with.
- # Default: PRECISION (6, except on older JRuby, where 3)
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:37
- def initialize(time_format: T.unsafe(nil), log_host: T.unsafe(nil), log_application: T.unsafe(nil), log_environment: T.unsafe(nil), precision: T.unsafe(nil)); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:5
- def log; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:5
- def log=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:5
- def log_application; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:5
- def log_application=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:5
- def log_environment; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:5
- def log_environment=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:5
- def log_host; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:5
- def log_host=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:5
- def logger; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:5
- def logger=(_arg0); end
-
- # Process ID
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:65
- def pid; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:5
- def precision; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:5
- def precision=(_arg0); end
-
- # Date & time
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:60
- def time; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:5
- def time_format; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:5
- def time_format=(_arg0); end
-
- private
-
- # Return the Time as a formatted string
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:72
- def format_time(time); end
-
- class << self
- # Return default time format string
- #
- # Parameters
- # precision: [Integer]
- # How many fractional digits to log times with.
- # Default: PRECISION (6, except on older JRuby, where 3)
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:55
- def build_time_format(precision = T.unsafe(nil)); end
- end
-end
-
-# Time precision varies by Ruby interpreter
-# JRuby 9.1.8.0 supports microseconds
-#
-# pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:9
-SemanticLogger::Formatters::Base::PRECISION = T.let(T.unsafe(nil), Integer)
-
-# pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:14
-class SemanticLogger::Formatters::Color < ::SemanticLogger::Formatters::Default
- # Adds color to the default log formatter
- #
- # Example:
- # # Use a colorized output logger.
- # SemanticLogger.add_appender(io: $stdout, formatter: :color)
- #
- # Example:
- # # Use a colorized output logger changing the color for info to yellow.
- # SemanticLogger.add_appender(io: $stdout, formatter: {color: {color_map: {info: SemanticLogger::AnsiColors::YELLOW}}})
- #
- # Example:
- # # Override the Awesome Print options to output hashes over multiple lines:
- # SemanticLogger.add_appender(io: $stdout, formatter: {color: {ap: {multiline: true}}})
- #
- # # Calling the appender added above:
- # SemanticLogger['Test'].info('hi', {a: 1, b: 2})
- # => true
- # => 2019-02-12 11:47:50.794339 I [35832:70112015269920] Test -- hi -- {
- # :a => 1,
- # :b => 2
- # }
- #
- # Parameters:
- # ap: [Hash]
- # Any valid Amazing Print option for rendering data.
- # These options can also be changed be creating a `~/.aprc` file.
- # See: https://github.com/amazing-print/amazing_print
- #
- # Note: The option :multiline is set to false if not supplied.
- # Note: Has no effect if Awesome Print is not installed.
- #
- # color_map: [Hash | SemanticLogger::Formatters::Color::ColorMap]
- # ColorMaps each of the log levels to a color
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:77
- def initialize(ap: T.unsafe(nil), color_map: T.unsafe(nil), **args); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:129
- def call(log, logger); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:15
- def color; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:15
- def color=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:15
- def color_map; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:15
- def color_map=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:101
- def duration; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:123
- def exception; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:83
- def level; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:105
- def name; end
-
- # Named Tags
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:92
- def named_tags; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:109
- def payload; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:87
- def tags; end
-end
-
-# Supply a custom color map for every log level
-#
-# pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:18
-class SemanticLogger::Formatters::Color::ColorMap
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:21
- def initialize(trace: T.unsafe(nil), debug: T.unsafe(nil), info: T.unsafe(nil), warn: T.unsafe(nil), error: T.unsafe(nil), fatal: T.unsafe(nil), bold: T.unsafe(nil), clear: T.unsafe(nil)); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:39
- def [](level); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:19
- def bold; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:19
- def bold=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:19
- def clear; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:19
- def clear=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:19
- def debug; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:19
- def debug=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:19
- def error; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:19
- def error=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:19
- def fatal; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:19
- def fatal=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:19
- def info; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:19
- def info=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:19
- def trace; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:19
- def trace=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:19
- def warn; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:19
- def warn=(_arg0); end
-end
-
-# Default non-colored text log output
-#
-# pkg:gem/semantic_logger#lib/semantic_logger/formatters/default.rb:4
-class SemanticLogger::Formatters::Default < ::SemanticLogger::Formatters::Base
- # Default text log format
- # Generates logs of the form:
- # 2011-07-19 14:36:15.660235 D [1149:ScriptThreadProcess] Rails -- Hello World
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/default.rb:79
- def call(log, logger); end
-
- # Duration
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/default.rb:49
- def duration; end
-
- # Exception
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/default.rb:72
- def exception; end
-
- # Ruby file name and line number that logged the message.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/default.rb:19
- def file_name_and_line; end
-
- # Log level
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/default.rb:9
- def level; end
-
- # Log message
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/default.rb:59
- def message; end
-
- # Class / app name
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/default.rb:54
- def name; end
-
- # Named Tags
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/default.rb:39
- def named_tags; end
-
- # Payload
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/default.rb:64
- def payload; end
-
- # Returns [String] the available process info
- # Example:
- # [18934:thread_name test_logging.rb:51]
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/default.rb:27
- def process_info; end
-
- # Tags
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/default.rb:34
- def tags; end
-
- # Name of the thread that logged the message.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/default.rb:14
- def thread_name; end
-end
-
-# Fluentd is similar to SemanticLogger::Formatters::Json but with log levels that are recognized
-# by kubernetes fluentd.
-#
-# pkg:gem/semantic_logger#lib/semantic_logger/formatters/fluentd.rb:7
-class SemanticLogger::Formatters::Fluentd < ::SemanticLogger::Formatters::Json
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/fluentd.rb:10
- def initialize(time_format: T.unsafe(nil), time_key: T.unsafe(nil), need_process_info: T.unsafe(nil), **args); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/fluentd.rb:15
- def level; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/fluentd.rb:8
- def need_process_info; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/fluentd.rb:20
- def process_info; end
-end
-
-# pkg:gem/semantic_logger#lib/semantic_logger/formatters/json.rb:4
-class SemanticLogger::Formatters::Json < ::SemanticLogger::Formatters::Raw
- # Default JSON time format is ISO8601
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/json.rb:6
- def initialize(time_format: T.unsafe(nil), time_key: T.unsafe(nil), **args); end
-
- # Returns log messages in JSON format
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/json.rb:11
- def call(log, logger); end
-end
-
-# Produces logfmt formatted messages
-#
-# The following fields are extracted from the raw log and included in the formatted message:
-# :timestamp, :level, :name, :message, :duration, :tags, :named_tags
-#
-# E.g.
-# timestamp="2020-07-20T08:32:05.375276Z" level=info name="DefaultTest" base="breakfast" spaces="second breakfast" double_quotes="\"elevensies\"" single_quotes="'lunch'" tag="success"
-#
-# All timestamps are ISO8601 formatteed
-# All user supplied values are escaped and surrounded by double quotes to avoid ambiguious message delimeters
-# `tags` are treated as keys with boolean values. Tag names are not formatted or validated, ensure you use valid logfmt format for tag names.
-# `named_tags` are flattened are merged into the top level message field. Any conflicting fields are overridden.
-# `payload` values take precedence over `tags` and `named_tags`. Any conflicting fields are overridden.
-#
-# Futher Reading https://brandur.org/logfmt
-#
-# pkg:gem/semantic_logger#lib/semantic_logger/formatters/logfmt.rb:20
-class SemanticLogger::Formatters::Logfmt < ::SemanticLogger::Formatters::Raw
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/logfmt.rb:21
- def initialize(time_format: T.unsafe(nil), time_key: T.unsafe(nil), **args); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/logfmt.rb:25
- def call(log, logger); end
-
- private
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/logfmt.rb:63
- def flatten_log; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/logfmt.rb:56
- def handle_exception; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/logfmt.rb:50
- def handle_payload; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/logfmt.rb:42
- def handle_tags; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/logfmt.rb:33
- def raw_to_logfmt; end
-end
-
-# pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:5
-class SemanticLogger::Formatters::Loki < ::SemanticLogger::Formatters::Base
- # Returns [String] a JSON batch of logs
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:17
- def batch(logs, logger); end
-
- # Returns [String] a single JSON log
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:9
- def call(log, logger); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:6
- def payload_value; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:6
- def payload_value=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:6
- def stream; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:6
- def stream=(_arg0); end
-
- private
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:56
- def application; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:30
- def build_stream; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:80
- def context; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:122
- def duration; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:60
- def environment; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:129
- def exception; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:102
- def format_time(log); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:52
- def host; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:64
- def level; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:98
- def message; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:115
- def metric; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:76
- def named_tags; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:106
- def payload; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:139
- def stringify_hash(hash); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:72
- def tags; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:68
- def thread; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:94
- def time; end
-end
-
-# Only output one line for each log entry.
-#
-# Notes:
-# * New lines are stripped from log messages.
-# * Exceptions only include the class and message, the stack trace is not shown.
-#
-# pkg:gem/semantic_logger#lib/semantic_logger/formatters/one_line.rb:8
-class SemanticLogger::Formatters::OneLine < ::SemanticLogger::Formatters::Default
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/one_line.rb:13
- def exception; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/one_line.rb:9
- def message; end
-end
-
-# pkg:gem/semantic_logger#lib/semantic_logger/formatters/open_telemetry.rb:4
-class SemanticLogger::Formatters::OpenTelemetry < ::SemanticLogger::Formatters::Raw
- # Log level
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/open_telemetry.rb:9
- def level; end
-
- # Payload is submitted directly as attributes
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/open_telemetry.rb:15
- def payload; end
-
- private
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/open_telemetry.rb:32
- def coerce_map(h); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/open_telemetry.rb:23
- def coerce_value(v); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/open_telemetry.rb:48
- def severity_number(severity); end
-end
-
-# primitives allowed by OTLP logs in Ruby: String, Integer, Float, TrueClass, FalseClass
-#
-# pkg:gem/semantic_logger#lib/semantic_logger/formatters/open_telemetry.rb:6
-SemanticLogger::Formatters::OpenTelemetry::PRIMS = T.let(T.unsafe(nil), Array)
-
-# pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:4
-class SemanticLogger::Formatters::Raw < ::SemanticLogger::Formatters::Base
- # By default Raw formatter does not reformat the time
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:9
- def initialize(time_format: T.unsafe(nil), time_key: T.unsafe(nil), **args); end
-
- # Application name
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:20
- def application; end
-
- # Returns log messages in Hash format
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:115
- def call(log, logger); end
-
- # Duration
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:70
- def duration; end
-
- # Environment
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:25
- def environment; end
-
- # Exception
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:93
- def exception; end
-
- # Ruby file name and line number that logged the message.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:51
- def file_name_and_line; end
-
- # Fields are added by populating this hash.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:6
- def hash; end
-
- # Fields are added by populating this hash.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:6
- def hash=(_arg0); end
-
- # Host name
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:15
- def host; end
-
- # Log level
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:35
- def level; end
-
- # Log message
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:83
- def message; end
-
- # Metric
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:109
- def metric; end
-
- # Class / app name
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:78
- def name; end
-
- # Named Tags
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:65
- def named_tags; end
-
- # Payload
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:88
- def payload; end
-
- # Process ID
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:41
- def pid; end
-
- # Tags
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:60
- def tags; end
-
- # Name of the thread that logged the message.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:46
- def thread_name; end
-
- # Date & time
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:30
- def time; end
-
- # Fields are added by populating this hash.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:6
- def time_key; end
-
- # Fields are added by populating this hash.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:6
- def time_key=(_arg0); end
-end
-
-# pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:4
-class SemanticLogger::Formatters::Signalfx < ::SemanticLogger::Formatters::Base
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:7
- def initialize(token:, dimensions: T.unsafe(nil), gauge_name: T.unsafe(nil), counter_name: T.unsafe(nil), time_format: T.unsafe(nil), **args); end
-
- # Returns [Hash] a batch of log messages.
- # Signalfx has a minimum resolution of 1 second.
- # Metrics of the same type, time (second), and dimensions can be aggregated together.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:110
- def batch(logs, logger); end
-
- # Returns [Hash] log message in Signalfx format.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:79
- def call(log, logger); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:5
- def counter_name; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:5
- def counter_name=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:5
- def dimensions; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:5
- def dimensions=(_arg0); end
-
- # Dimensions for this metric
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:57
- def format_dimensions; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:5
- def gauge_name; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:5
- def gauge_name=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:5
- def hash; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:5
- def hash=(_arg0); end
-
- # Create SignalFx friendly metric.
- # Strip leading '/'
- # Convert remaining '/' to '.'
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:24
- def metric; end
-
- # Date & time
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:46
- def time; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:5
- def token; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:5
- def token=(_arg0); end
-
- # Value of this metric
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:52
- def value; end
-
- private
-
- # Sum counters with the same time (second), name, and dimensions.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:151
- def add_counter(counters, metric); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:146
- def add_gauge(gauges, metric); end
-
- # Find Metrics with the same timestamp, metric name, and dimensions.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:157
- def find_match(list, metric); end
-end
-
-# Logging levels in order of most detailed to most severe
-#
-# pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:5
-SemanticLogger::LEVELS = T.let(T.unsafe(nil), Array)
-
-# pkg:gem/semantic_logger#lib/semantic_logger/levels.rb:4
-module SemanticLogger::Levels
- class << self
- # Internal method to return the log level as an internal index
- # Also supports mapping the ::Logger levels to SemanticLogger levels
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/levels.rb:17
- def index(level); end
-
- # Returns the symbolic level for the supplied level index
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/levels.rb:32
- def level(level_index); end
- end
-end
-
-# Logging levels in order of most detailed to most severe
-#
-# pkg:gem/semantic_logger#lib/semantic_logger/levels.rb:6
-SemanticLogger::Levels::LEVELS = T.let(T.unsafe(nil), Array)
-
-# Map the built-in `Logger` levels to SemanticLogger levels.
-#
-# pkg:gem/semantic_logger#lib/semantic_logger/levels.rb:9
-SemanticLogger::Levels::MAPPED_LEVELS = T.let(T.unsafe(nil), Array)
-
-# Log
-#
-# Class to hold all log entry information
-#
-# level
-# Log level of the supplied log call
-# :trace, :debug, :info, :warn, :error, :fatal
-#
-# thread_name
-# Name of the thread in which the logging call was called
-#
-# name
-# Class name supplied to the logging instance
-#
-# message
-# Text message to be logged
-#
-# payload
-# Optional Hash or Ruby Exception object to be logged
-#
-# time
-# The time at which the log entry was created
-#
-# duration
-# The time taken to complete a measure call
-#
-# tags
-# Any tags active on the thread when the log call was made
-#
-# level_index
-# Internal index of the log level
-#
-# exception
-# Ruby Exception object to log
-#
-# metric [Object]
-# Object supplied when measure_x was called
-#
-# backtrace [Array]
-# The backtrace captured at source when the log level >= SemanticLogger.backtrace_level
-#
-# metric_amount [Numeric]
-# Used for numeric or counter metrics.
-# For example, the number of inquiries or, the amount purchased etc.
-#
-# context [Hash]
-# Named contexts that were captured when the log entry was created.
-#
-# pkg:gem/semantic_logger#lib/semantic_logger/log.rb:49
-class SemanticLogger::Log
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:61
- def initialize(name, level, index = T.unsafe(nil)); end
-
- # Assign named arguments to this log entry, supplying defaults where applicable
- #
- # Returns [true|false] whether this log entry should be logged
- #
- # Example:
- # logger.info(name: 'value')
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:77
- def assign(message: T.unsafe(nil), payload: T.unsafe(nil), min_duration: T.unsafe(nil), exception: T.unsafe(nil), metric: T.unsafe(nil), metric_amount: T.unsafe(nil), duration: T.unsafe(nil), backtrace: T.unsafe(nil), log_exception: T.unsafe(nil), on_exception_level: T.unsafe(nil), dimensions: T.unsafe(nil)); end
-
- # Assign known keys to self, all other keys to the payload.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:133
- def assign_hash(hash); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:56
- def backtrace; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:56
- def backtrace=(_arg0); end
-
- # Returns [String] the exception backtrace including all of the child / caused by exceptions
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:195
- def backtrace_to_s; end
-
- # Strip the standard Rails colorizing from the logged message
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:273
- def cleansed_message; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:56
- def context; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:56
- def context=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:56
- def dimensions; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:56
- def dimensions=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:56
- def duration; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:56
- def duration=(_arg0); end
-
- # Returns [String] the duration in human readable form
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:223
- def duration_human; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:215
- def duration_to_s; end
-
- # Call the block for exception and any nested exception
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:173
- def each_exception; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:56
- def exception; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:56
- def exception=(_arg0); end
-
- # Extract the arguments from a Hash Payload
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:147
- def extract_arguments(payload, message = T.unsafe(nil)); end
-
- # Extract the filename and line number from the last entry in the supplied backtrace
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:256
- def extract_file_and_line(stack, short_name = T.unsafe(nil)); end
-
- # Returns [String, String] the file_name and line_number from the backtrace supplied
- # in either the backtrace or exception
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:267
- def file_name_and_line(short_name = T.unsafe(nil)); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:56
- def level; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:56
- def level=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:56
- def level_index; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:56
- def level_index=(_arg0); end
-
- # Returns [String] single character upper case log level
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:241
- def level_to_s; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:56
- def message; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:56
- def message=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:56
- def metric; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:56
- def metric=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:56
- def metric_amount; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:56
- def metric_amount=(_arg0); end
-
- # A metric only event has a metric but no message or exception.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:300
- def metric_only?; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:56
- def name; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:56
- def name=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:56
- def named_tags; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:56
- def named_tags=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:56
- def payload; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:56
- def payload=(_arg0); end
-
- # Returns [true|false] whether the log entry has a payload
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:284
- def payload?; end
-
- # Return the payload in text form
- # Returns nil if payload is missing or empty
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:279
- def payload_to_s; end
-
- # DEPRECATED
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:246
- def process_info(thread_name_length = T.unsafe(nil)); end
-
- # Lazy initializes the context hash and assigns a key value pair.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:295
- def set_context(key, value); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:56
- def tags; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:56
- def tags=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:56
- def thread_name; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:56
- def thread_name=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:56
- def time; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:56
- def time=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:288
- def to_h(host = T.unsafe(nil), application = T.unsafe(nil), environment = T.unsafe(nil)); end
-end
-
-# pkg:gem/semantic_logger#lib/semantic_logger/log.rb:253
-SemanticLogger::Log::CALLER_REGEXP = T.let(T.unsafe(nil), Regexp)
-
-# pkg:gem/semantic_logger#lib/semantic_logger/log.rb:171
-SemanticLogger::Log::MAX_EXCEPTIONS_TO_UNWRAP = T.let(T.unsafe(nil), Integer)
-
-# Keys passed in without a payload that will be extracted and the remainder passed into the payload.
-#
-# pkg:gem/semantic_logger#lib/semantic_logger/log.rb:51
-SemanticLogger::Log::NON_PAYLOAD_KEYS = T.let(T.unsafe(nil), Array)
-
-# pkg:gem/semantic_logger#lib/semantic_logger/loggable.rb:32
-module SemanticLogger::Loggable
- mixes_in_class_methods ::SemanticLogger::Loggable::ClassMethods
-
- class << self
- # pkg:gem/semantic_logger#lib/semantic_logger/loggable.rb:33
- def included(base); end
- end
-end
-
-# pkg:gem/semantic_logger#lib/semantic_logger/loggable.rb:65
-module SemanticLogger::Loggable::ClassMethods
- # Measure and log the performance of an instance method.
- #
- # Parameters:
- # method_name: [Symbol]
- # The name of the method that should be measured.
- #
- # options: [Hash]
- # Any valid options that can be passed to measure.
- #
- # Approximate overhead when logging a method call with a metric:
- # 0.044 ms per method call.
- # 0.009 ms per method call. If `min_duration` is not met
- # 0.0005 ms per method call. If `level` is not met
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/loggable.rb:79
- def logger_measure_method(method_name, min_duration: T.unsafe(nil), metric: T.unsafe(nil), log_exception: T.unsafe(nil), on_exception_level: T.unsafe(nil), message: T.unsafe(nil), level: T.unsafe(nil)); end
-
- private
-
- # Dynamic Module to intercept method calls for measuring purposes.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/loggable.rb:120
- def logger_measure_module; end
-end
-
-# Logger stores the class name to be used for all log messages so that every
-# log message written by this instance will include the class name
-#
-# pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:4
-class SemanticLogger::Logger < ::SemanticLogger::Base
- include ::SemanticLogger::Concerns::Compatibility
-
- # Returns a Logger instance
- #
- # Return the logger for a specific class, supports class specific log levels
- # logger = SemanticLogger::Logger.new(self)
- # OR
- # logger = SemanticLogger::Logger.new('MyClass')
- #
- # Parameters:
- # klass
- # A class, module or a string with the application/class name
- # to be used in the logger
- #
- # level
- # The initial log level to start with for this logger instance
- # Default: SemanticLogger.default_level
- #
- # filter [Regexp|Proc]
- # RegExp: Only include log messages where the class name matches the supplied
- # regular expression. All other messages will be ignored
- # Proc: Only include log messages where the supplied Proc returns true
- # The Proc must return true or false
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:59
- def initialize(klass, level = T.unsafe(nil), filter = T.unsafe(nil)); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:5
- def <<(message = T.unsafe(nil), payload = T.unsafe(nil), exception = T.unsafe(nil), &block); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:5
- def datetime_format; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:5
- def datetime_format=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:5
- def formatter; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:5
- def formatter=(_arg0); end
-
- # Place log request on the queue for the Appender thread to write to each
- # appender in the order that they were registered
- #
- # Subscribers are called inline before handing off to the queue so that
- # they can capture additional context information as needed.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:68
- def log(log, message = T.unsafe(nil), progname = T.unsafe(nil), &block); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:5
- def progname; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:5
- def progname=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:5
- def sev_threshold; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:5
- def sev_threshold=(level); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:5
- def silence_logger(new_level = T.unsafe(nil), &block); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:5
- def unknown(message = T.unsafe(nil), payload = T.unsafe(nil), exception = T.unsafe(nil), &block); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:5
- def unknown?; end
-
- class << self
- # pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:80
- def call_subscribers(log); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:22
- def processor; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:7
- def subscribe(object = T.unsafe(nil), &block); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:19
- def subscribers; end
-
- # Switch to the synchronous processor
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:27
- def sync!; end
-
- # Running without the background logging thread?
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:34
- def sync?; end
- end
-end
-
-# @formatter:off
-#
-# pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:521
-module SemanticLogger::Metric; end
-
-# pkg:gem/semantic_logger#lib/semantic_logger/metric/signalfx.rb:10
-class SemanticLogger::Metric::Signalfx < ::SemanticLogger::Appender::Http
- # Create SignalFx metrics appender.
- #
- # Parameters:
- # token: [String]
- # Access Token to use for sending metrics.
- # Obtain the Signalfx token via the Signalfx Web UI under `Organization` -> `Access Tokens`.
- #
- # dimensions: [Array]
- # Dimensions to forward to signalfx when they are present in the named tags of any log message.
- # By default `application` and `host` are always included as dimensions in all forwarded metrics.
- # Example: [:user_id, :state]
- #
- # filter: [Regexp|Proc]
- # RegExp: Only include log messages where the class name matches the supplied
- # regular expression. All other messages will be ignored.
- # Proc: Only include log messages where the supplied Proc returns true.
- # The Proc must return true or false.
- #
- # host: [String]
- # Name of this host to send as a dimension.
- # Default: SemanticLogger.host
- #
- # application: [String]
- # Name of this application to send as a dimension.
- # Default: SemanticLogger.application
- #
- # url: [String]
- # Override the SignalFx service url.
- # For historical data use: https://backfill.signalfx.com/v1/backfill
- # Default: https://ingest.signalfx.com
- #
- # Notes:
- #
- # When sending a metric to Signalfx, it is necessary to send both a `gauge` and a `counter` when a
- # duration is included in the metric, otherwise it is not possible to chart counts of the metric.
- # Unfortunately this doubles the number of metrics, but it is the way Signalfx works.
- # Using a `count` of a `gauge` in a chart will significantly under-count the number of occurrences.
- #
- # If dimensions are added to the metric, then the metric will be sent as-is and
- # the above logic will _not_ be applied.
- #
- # Example, Gauge metric, supplying the duration in `metric_amount`:
- # logger.info(metric: 'Filters.average', metric_amount: 1.2, dimensions: {user: 'jbloggs'})
- #
- # Example, Counter metric:
- # logger.info(metric: 'Filters.count', dimensions: {user: 'jbloggs'})
- #
- # Example, Counter metric with a count other than 1:
- # logger.info(metric: 'Filters.count', metric_amount: 23, dimensions: {user: 'jbloggs'})
- #
- # When a duration is supplied and no dimensions are supplied:
- # logger.info(metric: 'Common/User/authorize', duration: 1.4)
- #
- # Then it is translated into the following 2 log entries under the covers:
- # logger.info(metric: 'Application.average', metric_amount: 1.4, dimensions: {class: 'Common::User', action: 'authorize'})
- # logger.info(metric: 'Application.counter', metric_amount: 1, dimensions: {class: 'Common::User', action: 'authorize'})
- #
- # Similarly with a measure block which automatically supplies the duration:
- # logger.measure_info(metric: 'Common/User/authorize') do
- # sleep 1
- # end
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/metric/signalfx.rb:76
- def initialize(token:, dimensions: T.unsafe(nil), url: T.unsafe(nil), formatter: T.unsafe(nil), **args, &block); end
-
- # Logs in batches
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/metric/signalfx.rb:97
- def batch(logs); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/metric/signalfx.rb:11
- def full_url; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/metric/signalfx.rb:90
- def log(log); end
-
- # Only forward log entries that contain metrics.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/metric/signalfx.rb:104
- def should_log?(log); end
-end
-
-# pkg:gem/semantic_logger#lib/semantic_logger/metric/signalfx.rb:13
-SemanticLogger::Metric::Signalfx::END_POINT = T.let(T.unsafe(nil), String)
-
-# Thread that submits and processes log requests
-#
-# pkg:gem/semantic_logger#lib/semantic_logger/processor.rb:3
-class SemanticLogger::Processor < ::SemanticLogger::Appender::Async
- # pkg:gem/semantic_logger#lib/semantic_logger/processor.rb:26
- def initialize(max_queue_size: T.unsafe(nil)); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/processor.rb:24
- def appenders; end
-
- # Start the appender thread
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/processor.rb:32
- def start; end
-
- class << self
- # Internal logger for SemanticLogger
- # For example when an appender is not working etc..
- # By default logs to $stderr
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/processor.rb:15
- def logger; end
-
- # Internal logger for SemanticLogger
- # For example when an appender is not working etc..
- # By default logs to $stderr
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/processor.rb:9
- def logger=(_arg0); end
- end
-end
-
-# pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:527
-module SemanticLogger::Reporters; end
-
-# When using Minitest to run tests, log start and end messages for every test to the log file.
-# On completion the time it took to run the test is also logged.
-#
-# For example, add the following lines to `test_helper.rb`:
-# require 'minitest/reporters'
-#
-# reporters = [
-# Minitest::Reporters::ProgressReporter.new,
-# SemanticLogger::Reporters::Minitest.new
-# ]
-# Minitest::Reporters.use!(reporters)
-#
-# And add `gem minitest-reporters` to the Gemfile.
-#
-# Log entries similar to the following should show up in the log file:
-#
-# 2019-02-06 18:58:17.522467 I [84730:70256441962000] Minitest -- START RocketJob::DirmonEntry::with valid entry::#archive_file test_0001_moves file to archive dir
-# 2019-02-06 18:58:17.527492 I [84730:70256441962000] (4.980ms) Minitest -- PASS RocketJob::DirmonEntry::with valid entry::#archive_file test_0001_moves file to archive dir
-# 2019-02-06 18:58:17.527835 I [84730:70256441962000] Minitest -- START RocketJob::DirmonEntry::#job_class::with a valid job_class_name test_0001_return job class
-# 2019-02-06 18:58:17.529761 I [84730:70256441962000] (1.882ms) Minitest -- PASS RocketJob::DirmonEntry::#job_class::with a valid job_class_name test_0001_return job class
-#
-# pkg:gem/semantic_logger#lib/semantic_logger/reporters/minitest.rb:23
-class SemanticLogger::Reporters::Minitest < ::Minitest::AbstractReporter
- include ::SemanticLogger::Loggable
- extend ::SemanticLogger::Loggable::ClassMethods
-
- # pkg:gem/semantic_logger#lib/semantic_logger/reporters/minitest.rb:34
- def after_test(test); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/reporters/minitest.rb:30
- def before_test(test); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/reporters/minitest.rb:28
- def io; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/reporters/minitest.rb:28
- def io=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/reporters/minitest.rb:24
- def logger; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/reporters/minitest.rb:24
- def logger=(logger); end
-
- class << self
- # pkg:gem/semantic_logger#lib/semantic_logger/reporters/minitest.rb:24
- def logger; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/reporters/minitest.rb:24
- def logger=(logger); end
- end
-end
-
-# pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:5
-class SemanticLogger::Subscriber < ::SemanticLogger::Base
- # Initializer for Abstract Class SemanticLogger::Subscriber
- #
- # Parameters
- # level: [:trace | :debug | :info | :warn | :error | :fatal]
- # Override the log level for this subscriber.
- #
- # formatter: [Object|Proc]
- # An instance of a class that implements #call, or a Proc to be used to format
- # the output from this subscriber
- # Default: Use the built-in formatter (See: #call)
- #
- # filter: [Regexp|Proc]
- # RegExp: Only include log messages where the class name matches the supplied.
- # regular expression. All other messages will be ignored.
- # Proc: Only include log messages where the supplied Proc returns true
- # The Proc must return true or false.
- #
- # application: [String]
- # Name of this application to appear in log messages.
- # Default: SemanticLogger.application
- #
- # host: [String]
- # Name of this host to appear in log messages.
- # Default: SemanticLogger.host
- #
- # metrics: [Boolean]
- # Whether to log metric only entries with this subscriber.
- # Default: false
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:111
- def initialize(level: T.unsafe(nil), formatter: T.unsafe(nil), filter: T.unsafe(nil), application: T.unsafe(nil), environment: T.unsafe(nil), host: T.unsafe(nil), metrics: T.unsafe(nil), &block); end
-
- # Allow application name to be set globally or on a per subscriber basis.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:36
- def application; end
-
- # Allow application name to be set globally or on a per subscriber basis.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:8
- def application=(_arg0); end
-
- # A subscriber should implement close if it can.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:21
- def close; end
-
- # Whether this appender is logging to stdout or stderror
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:77
- def console_output?; end
-
- # Returns [SemanticLogger::Formatters::Default] default formatter for this subscriber.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:31
- def default_formatter; end
-
- # Allow environment name to be set globally or on a per subscriber basis.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:41
- def environment; end
-
- # Allow environment name to be set globally or on a per subscriber basis.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:8
- def environment=(_arg0); end
-
- # A subscriber should implement flush if it can.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:16
- def flush; end
-
- # Every appender has its own formatter
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:7
- def formatter; end
-
- # Set the formatter from Symbol|Hash|Block
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:62
- def formatter=(formatter); end
-
- # Allow host name to be set globally or on a per subscriber basis.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:46
- def host; end
-
- # Allow host name to be set globally or on a per subscriber basis.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:8
- def host=(_arg0); end
-
- # Returns the current log level if set, otherwise it logs everything it receives.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:11
- def level; end
-
- # Method called to log an event
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:26
- def log(log); end
-
- # Give each appender its own logger for logging.
- # For example trace messages sent to services or errors when something fails.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:52
- def logger; end
-
- # Give each appender its own logger for logging.
- # For example trace messages sent to services or errors when something fails.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:8
- def logger=(_arg0); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:8
- def metrics=(_arg0); end
-
- # Whether this log entry meets the criteria to be logged by this appender.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:72
- def should_log?(log); end
-
- private
-
- # Return the level index for fast comparisons.
- # Returns the lowest level index if the level has not been explicitly
- # set for this instance.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:127
- def level_index; end
-
- # Whether to log metric only entries with this subscriber
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:132
- def metrics?; end
-end
-
-# The SyncProcessor performs logging in the current thread.
-#
-# Appenders are designed to only be used by one thread at a time, so all calls
-# are monitor protected in case SyncProcessor is being used in a multi-threaded environment.
-#
-# pkg:gem/semantic_logger#lib/semantic_logger/sync_processor.rb:6
-class SemanticLogger::SyncProcessor
- # pkg:gem/semantic_logger#lib/semantic_logger/sync_processor.rb:49
- def initialize(appenders = T.unsafe(nil)); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/sync_processor.rb:7
- def add(*, **, &); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/sync_processor.rb:47
- def appenders; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/sync_processor.rb:19
- def close; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/sync_processor.rb:15
- def flush; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/sync_processor.rb:11
- def log(*, **, &); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/sync_processor.rb:23
- def reopen(*args); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/sync_processor.rb:54
- def start; end
-
- class << self
- # Internal logger for SemanticLogger
- # For example when an appender is not working etc..
- # By default logs to $stderr
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/sync_processor.rb:38
- def logger; end
-
- # Internal logger for SemanticLogger
- # For example when an appender is not working etc..
- # By default logs to $stderr
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/sync_processor.rb:32
- def logger=(_arg0); end
- end
-end
-
-# pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:531
-module SemanticLogger::Test; end
-
-# Logging class to captures all logging events in memory.
-#
-# Example:
-#
-# class UserTest < ActiveSupport::TestCase
-# describe User do
-# let(:logger) { SemanticLogger::Test::CaptureLogEvents.new }
-# let(:user) { User.new }
-#
-# it "logs message" do
-# user.stub(:logger, logger) do
-# user.enable!
-# end
-# assert log = logger.events.first
-# assert_equal "Hello World", log.message
-# assert_equal :info, log.level
-# end
-# end
-# end
-#
-# pkg:gem/semantic_logger#lib/semantic_logger/test/capture_log_events.rb:22
-class SemanticLogger::Test::CaptureLogEvents < ::SemanticLogger::Subscriber
- # By default collect all log levels, and collect metric only log events.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/test/capture_log_events.rb:26
- def initialize(level: T.unsafe(nil), metrics: T.unsafe(nil)); end
-
- # Supports batching of log events
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/test/capture_log_events.rb:37
- def batch(_logs); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/test/capture_log_events.rb:41
- def clear; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/test/capture_log_events.rb:23
- def events; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/test/capture_log_events.rb:23
- def events=(_arg0); end
-
- # Support silencing of log messages
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/test/capture_log_events.rb:46
- def level_index; end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/test/capture_log_events.rb:31
- def log(log); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/test/capture_log_events.rb:50
- def to_h; end
-end
-
-# pkg:gem/semantic_logger#lib/semantic_logger/test/minitest.rb:3
-module SemanticLogger::Test::Minitest
- # Verify a single log event has all the required attributes.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/test/minitest.rb:24
- def assert_semantic_logger_event(event, level: T.unsafe(nil), name: T.unsafe(nil), message: T.unsafe(nil), message_includes: T.unsafe(nil), payload: T.unsafe(nil), payload_includes: T.unsafe(nil), exception: T.unsafe(nil), exception_includes: T.unsafe(nil), backtrace: T.unsafe(nil), thread_name: T.unsafe(nil), tags: T.unsafe(nil), named_tags: T.unsafe(nil), context: T.unsafe(nil), level_index: T.unsafe(nil), duration: T.unsafe(nil), time: T.unsafe(nil), metric: T.unsafe(nil), metric_amount: T.unsafe(nil), dimensions: T.unsafe(nil)); end
-
- # Returns [Array] the log events from Semantic Logger
- # captured whilst executing the supplied block.
- #
- # Notes:
- # - All log messages are returned regardless of the global default log level.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/test/minitest.rb:9
- def semantic_logger_events(deprecated_klass = T.unsafe(nil), klass: T.unsafe(nil), silence: T.unsafe(nil), &block); end
-
- private
-
- # pkg:gem/semantic_logger#lib/semantic_logger/test/minitest.rb:74
- def assert_semantic_logger_entry(event, name, expected, actual = T.unsafe(nil)); end
-end
-
-# Internal-use only utility functions for Semantic Logger.
-# Not intended for public use.
-#
-# pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:4
-module SemanticLogger::Utils
- class << self
- # Borrow from Rails, when not running Rails
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:16
- def camelize(term); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:5
- def constantize_symbol(symbol, namespace = T.unsafe(nil)); end
-
- # Extract the backtrace stripping off the leading semantic logger entries.
- # Leaves all other system and gem path entries in place.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:38
- def extract_backtrace(stack = T.unsafe(nil)); end
-
- # Whether this path should be excluded from any cleansed backtrace
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:50
- def extract_path?(path); end
-
- # pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:45
- def extract_paths; end
-
- # Returns the visibility for an instance method
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:25
- def method_visibility(mod, method_name); end
-
- # Try to strip everything off of the supplied backtrace, until the first application stack entry is at the top.
- # For example all leading gem paths and built-in ruby code paths are removed from the top.
- # Once the first application entry is found, the remaining stack is returned.
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:57
- def strip_backtrace(stack = T.unsafe(nil)); end
-
- # Whether this path should be excluded from any cleansed backtrace
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:76
- def strip_path?(path); end
-
- # Paths to exclude in the stripped backtrace
- # Includes Gems and built-in Ruby code paths
- #
- # pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:66
- def strip_paths; end
- end
-end
-
-# pkg:gem/semantic_logger#lib/semantic_logger/version.rb:2
-SemanticLogger::VERSION = T.let(T.unsafe(nil), String)
diff --git a/sorbet/rbi/gems/semantic_logger@5.2.0.rbi b/sorbet/rbi/gems/semantic_logger@5.2.0.rbi
new file mode 100644
index 0000000..9b7de8f
--- /dev/null
+++ b/sorbet/rbi/gems/semantic_logger@5.2.0.rbi
@@ -0,0 +1,6684 @@
+# typed: true
+
+# DO NOT EDIT MANUALLY
+# This is an autogenerated file for types exported from the `semantic_logger` gem.
+# Please instead update this file by running `bin/tapioca gem semantic_logger`.
+
+
+module Process
+ extend ::ConnectionPool::ForkTracker
+ extend ::RedisClient::PIDCache::CoreExt
+ extend ::SemanticLogger::CoreExt::Process
+ extend ::ActiveSupport::ForkTracker::CoreExt
+end
+
+# Send log messages to Bugsnag
+#
+# Example:
+# SemanticLogger.add_appender(appender: :bugsnag)
+#
+# Forward all log messages to CloudWatch Logs.
+#
+# Example:
+#
+# SemanticLogger.add_appender(
+# appender: :cloudwatch_logs,
+# client_kwargs: {region: "eu-west-1"},
+# group: "/my/application",
+# create_stream: true
+# )
+# Forward all log messages to Elasticsearch.
+#
+# Example:
+#
+# SemanticLogger.add_appender(
+# appender: :elasticsearch,
+# url: 'http://localhost:9200'
+# )
+# Forward all log messages to Elasticsearch one at a time via a HTTP post.
+#
+# Note:
+# * Other than in very low volume environments it is recommended to rather use the Elasticsearch appender,
+# since it supports bulk logging.
+#
+# Example:
+# SemanticLogger.add_appender(
+# appender: :elasticsearch_http,
+# url: 'http://localhost:9200'
+# )
+# File appender
+#
+# Writes log messages to a file or open iostream
+#
+# Forward log entries to a Graylog server.
+#
+# Example:
+# SemanticLogger.add_appender(
+# appender: :graylog,
+# url: 'udp://localhost:12201'
+# )
+#
+# Notes:
+# * trace is not supported by Graylog, so trace level logging will appear as debug in Graylog.
+#
+# In the Graylog Web UI search screen, it is recommended to include the following fields:
+# `duration`, `level`, `message`, `metric`, `name`, `tags
+# Send log messages to honeybadger
+#
+# Example:
+# SemanticLogger.add_appender(appender: :honeybadger)
+#
+# Send log messages to honeybadger events/insights API
+#
+# Example:
+# SemanticLogger.add_appender(appender: :honeybadger_insights)
+#
+# Log to any HTTP(S) server that accepts log messages in JSON form
+#
+# Features:
+# * JSON Formatted messages.
+# * Uses a persistent http connection, if the server supports it.
+# * SSL encryption (https).
+#
+# Example:
+# SemanticLogger.add_appender(
+# appender: :http,
+# url: 'http://localhost:8088/path'
+# )
+#
+# Batching:
+# By default each log message is posted individually. To post multiple log
+# messages in a single request as a JSON array (for example to the Filebeat
+# http_endpoint input), enable batching when adding the appender:
+# SemanticLogger.add_appender(
+# appender: :http,
+# url: 'http://localhost:8088/path',
+# batch: true
+# )
+# Forward all log messages to Apache Kafka.
+#
+# Example:
+#
+# SemanticLogger.add_appender(
+# appender: :kafka,
+#
+# # At least one of these nodes must be available:
+# seed_brokers: ["kafka1:9092", "kafka2:9092"],
+#
+# # Set an optional client id in order to identify the client to Kafka:
+# client_id: "my-application",
+# )
+# Forward application metrics to a Loki instance using HTTP push API
+#
+# Example:
+# SemanticLogger.add_appender(
+# appender: :loki,
+# url: "https://logs-prod-001.grafana.net",
+# username: "grafana_username",
+# password: "grafana_token_here",
+# compress: true
+# )
+# Send log messages to NewRelic
+#
+# The :error and :fatal log entries will show up under
+# "Applications" > "Application Name" > "Events" > "Errors" in New Relic.
+#
+# Example:
+# SemanticLogger.add_appender(appender: :new_relic)
+# Send log messages to NewRelic
+#
+# All log entries will appear under
+# "Logs" in New Relic
+#
+# == Caveats
+#
+# * The NewRelic agent only sends logs to NewRelic when log forwarding is enabled. There is however an open
+# issue to get this fixed: https://github.com/newrelic/newrelic-ruby-agent/issues/1614. Please see the guide
+# for a workaround.
+#
+# Example:
+# SemanticLogger.add_appender(appender: :new_relic_logs)
+# Open Telemetry Appender
+#
+# Writes log messages, and metrics to Open Telemetry.
+#
+# Forward all log messages to OpenSearch (e.g. AWS OpenSearch).
+#
+# OpenSearch is a fork of Elasticsearch 7.10. The client API and bulk
+# protocol are identical, so this appender reuses the same pipeline as the
+# Elasticsearch appender; only the backing client gem differs. Use this
+# appender (with the `opensearch-ruby` gem) instead of `:elasticsearch`
+# when talking to an OpenSearch server, since modern `elasticsearch` gems
+# reject non-Elasticsearch servers via a product check.
+#
+# Example:
+#
+# SemanticLogger.add_appender(
+# appender: :opensearch,
+# url: 'http://localhost:9200'
+# )
+# Forward all log messages to RabbitMQ.
+#
+# Example:
+#
+# SemanticLogger.add_appender(
+# appender: :rabbitmq,
+#
+# # Name of the queue in RabbitMQ where to publish the logs. This queue will be bound to "amqp.direct" exchange.
+# queue_name: 'semantic_logger',
+#
+# # This host will be used for RabbitMQ connection.
+# # NOTE this is different than :host option which is used by the logger directly.
+# rabbitmq_host: '127.0.0.1',
+#
+# # RabbitMQ credentials
+# username: 'my-username',
+# password: 'my-secrect-pass',
+#
+# # All other options accepted by Bunny.new call
+# vhost: 'production',
+# )
+# Send log messages to sentry
+#
+# Example:
+# SemanticLogger.add_appender(appender: :sentry)
+#
+# Send log messages to sentry
+#
+# Example:
+# SemanticLogger.add_appender(appender: :sentry_ruby)
+#
+# Splunk log appender.
+#
+# Use the official splunk gem to log messages to Splunk.
+#
+# Deprecated: will be removed in v6. Use the :splunk_http appender instead.
+# The splunk-sdk-ruby gem (last released in 2015) does not verify the server's TLS certificate,
+# so its connection, including the login credentials, is open to interception.
+#
+# Example
+# SemanticLogger.add_appender(
+# appender: :splunk,
+# username: 'username',
+# password: 'password',
+# host: 'localhost',
+# port: 8089,
+# scheme: :https,
+# index: 'main'
+# )
+# Splunk log appender using the Splunk HTTP(S) listener.
+#
+# Use the newer, faster and more complete JSON over HTTP interface for Splunk.
+#
+# To configure Splunk to receive log messages via this appender:
+# http://dev.splunk.com/view/event-collector/SP-CAAAE7F
+#
+# Example
+# SemanticLogger.add_appender(
+# appender: :splunk_http,
+# url: 'http://localhost:8080',
+# token: '70CA900C-3D7E-42A4-9C79-7975D1C422A8'
+# )
+# Send log messages to local syslog, or remote syslog servers over TCP or UDP.
+#
+# Example:
+# # Log to a local Syslog daemon
+# SemanticLogger.add_appender(appender: :syslog)
+#
+# Example:
+# # Log to a remote Syslog server over TCP:
+# SemanticLogger.add_appender(
+# appender: :syslog,
+# url: 'tcp://myloghost:514'
+# )
+#
+# Example:
+# # Log to a remote Syslog server over UDP:
+# SemanticLogger.add_appender(
+# appender: :syslog,
+# url: 'udp://myloghost:514'
+# )
+#
+# Example:
+# # Log to a remote Syslog server using the CEE format over TCP:
+# SemanticLogger.add_appender(
+# appender: :syslog,
+# url: 'tcp://myloghost:514'
+# )
+#
+# Send log messages to any standard Ruby logging class.
+#
+# Forwards logging call to loggers such as Logger, log4r, etc.
+# Base logger
+#
+# Abstract base class for loggers
+#
+# Implements common behavior such as log level, default text formatter etc
+#
+# Logger class variable mix-in
+#
+# Lazy initialize a logger class variable with instance accessor
+#
+# By including this mix-in into any class it will define a class level logger
+# and also make it accessible via instance methods
+#
+# Example:
+# require 'semantic_logger'
+# SemanticLogger.default_level = :debug
+# SemanticLogger.add_appender(io: $stdout, formatter: :color)
+#
+# class ExternalSupplier
+# # Create class and instance logger methods
+# include SemanticLogger::Loggable
+#
+# def call_supplier(amount, name)
+# logger.debug "Calculating with amount", { amount: amount, name: name }
+#
+# # Measure and log on completion how long the call took to the external supplier
+# logger.measure_info "Calling external interface" do
+# # Code to call the external supplier ...
+# end
+# end
+# end
+#
+# Notes:
+# * To forcibly replace Rails or any other existing logging methods
+# use `prepend` instead of `include`. For example:
+# ExternalSupplier.prepend SemanticLogger::Loggable
+# Send Metrics to NewRelic
+#
+# The :error and :fatal log entries will show up under
+# "Applications" > "Application Name" > "Events" > "Errors" in New Relic.
+#
+# Example:
+# SemanticLogger.add_appender(metric: :new_relic)
+# Forward application metrics to SignalFx.
+#
+# Example:
+# SemanticLogger.add_appender(
+# metric: :signalfx,
+# token: 'SIGNALFX_ORG_ACCESS_TOKEN'
+# )
+# Abstract Subscriber
+#
+# Abstract base class for all appenders.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/version.rb:1
+module SemanticLogger
+ class << self
+ # Return a logger for the supplied class or class_name.
+ #
+ # When `SemanticLogger.cache_loggers` is enabled (opt-in, default off) and a
+ # Class or Module is supplied, the same Logger instance is returned for every
+ # call with that class. This makes it possible to obtain a logger once and
+ # later change its level (or filter) and have every holder of that logger see
+ # the change.
+ #
+ # A String is always given its own new Logger instance, even when caching is
+ # enabled: callers that pass a string typically want an independent logger
+ # (for example to set a different level per call site). Anonymous classes
+ # (those with no `name`) are never cached, to avoid pinning short-lived
+ # dynamically created classes in memory.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:20
+ def [](klass); end
+
+ # Add a new logging appender as a new destination for all log messages
+ # emitted from Semantic Logger
+ #
+ # Appenders will be written to in the order that they are added
+ #
+ # If a block is supplied then it will be used to customize the format
+ # of the messages sent to that appender. See SemanticLogger::Logger.new for
+ # more information on custom formatters
+ #
+ # Parameters
+ # file_name: [String]
+ # File name to write log messages to.
+ #
+ # Or,
+ # io: [IO]
+ # An IO Stream to log to.
+ # For example $stdout, $stderr, etc.
+ #
+ # Or,
+ # appender: [Symbol|SemanticLogger::Subscriber]
+ # A symbol identifying the appender to create.
+ # For example:
+ # :bugsnag, :elasticsearch, :graylog, :http, :mongodb, :new_relic, :splunk_http, :syslog, :wrapper
+ # Or,
+ # An instance of an appender derived from SemanticLogger::Subscriber
+ # For example:
+ # SemanticLogger::Appender::Http.new(url: 'http://localhost:8088/path')
+ #
+ # Or,
+ # logger: [Logger|Log4r]
+ # An instance of a Logger or a Log4r logger.
+ #
+ # level: [:trace | :debug | :info | :warn | :error | :fatal]
+ # Override the log level for this appender.
+ # Default: SemanticLogger.default_level
+ #
+ # formatter: [Symbol|Object|Proc]
+ # Any of the following symbol values: :default, :color, :json, :logfmt, etc...
+ # Or,
+ # An instance of a class that implements #call
+ # Or,
+ # A Proc to be used to format the output from this appender
+ # Default: :default
+ #
+ # filter: [Regexp|Proc]
+ # RegExp: Only include log messages where the class name matches the supplied.
+ # regular expression. All other messages will be ignored.
+ # Proc: Only include log messages where the supplied Proc returns true
+ # The Proc must return true or false.
+ #
+ # Examples:
+ #
+ # # Send all logging output to Standard Out (Screen)
+ # SemanticLogger.add_appender(io: $stdout)
+ #
+ # # Send all logging output to a file
+ # SemanticLogger.add_appender(file_name: 'logfile.log')
+ #
+ # # Send all logging output to a file and only :info and above to standard output
+ # SemanticLogger.add_appender(file_name: 'logfile.log')
+ # SemanticLogger.add_appender(io: $stdout, level: :info)
+ #
+ # Log to log4r, Logger, etc.:
+ #
+ # # Send Semantic logging output to an existing logger
+ # require 'logger'
+ # require 'semantic_logger'
+ #
+ # # Built-in Ruby logger
+ # log = Logger.new($stdout)
+ # log.level = Logger::DEBUG
+ #
+ # SemanticLogger.default_level = :debug
+ # SemanticLogger.add_appender(logger: log)
+ #
+ # logger = SemanticLogger['Example']
+ # logger.info "Hello World"
+ # logger.debug("Login time", user: 'Joe', duration: 100, ip_address: '127.0.0.1')
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:198
+ def add_appender(**args, &); end
+
+ # Add signal handlers for Semantic Logger
+ #
+ # Two signal handlers will be registered by default:
+ #
+ # 1. Changing the log_level:
+ #
+ # The log level can be changed without restarting the process by sending the
+ # log_level_signal, which by default is 'USR2'
+ #
+ # When the log_level_signal is raised on this process, the global default log level
+ # rotates through the following log levels in the following order, starting
+ # from the current global default level:
+ # :fatal, :error, :warn, :info, :debug, :trace
+ #
+ # If the current level is :trace it wraps around back to :fatal
+ #
+ # 2. Logging a Ruby thread dump
+ #
+ # When the signal is raised on this process, Semantic Logger will write the list
+ # of threads to the log file, along with their back-traces when available
+ #
+ # For JRuby users this thread dump differs form the standard QUIT triggered
+ # Java thread dump which includes system threads and Java stack traces.
+ #
+ # It is recommended to name any threads you create in the application, by
+ # calling the following from within the thread itself:
+ # Thread.current.name = 'My Worker'
+ #
+ # Also adds JRuby Garbage collection logging so that any garbage collections
+ # that exceed the time threshold will be logged. Default: 100 ms
+ # Currently only supported when running JRuby
+ #
+ # Note:
+ # To only register one of the signal handlers, set the other to nil
+ # Set gc_log_microseconds to nil to not enable JRuby Garbage collections
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:340
+ def add_signal_handler(log_level_signal = T.unsafe(nil), thread_dump_signal = T.unsafe(nil), gc_log_microseconds = T.unsafe(nil)); end
+
+ # Returns [SemanticLogger::Subscriber] a copy of the list of active
+ # appenders for debugging etc.
+ # Use SemanticLogger.add_appender and SemanticLogger.remove_appender
+ # to manipulate the active appenders list
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:223
+ def appenders; end
+
+ # Returns [String] name of this application for logging purposes
+ # Note: Not all appenders use `application`
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:97
+ def application; end
+
+ # Override the default application
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:102
+ def application=(application); end
+
+ # Returns the current backtrace level
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:74
+ def backtrace_level; end
+
+ # Sets the level at which backtraces should be captured
+ # for every log message.
+ #
+ # By enabling backtrace capture the filename and line number of where
+ # message was logged can be written to the log file. Additionally, the backtrace
+ # can be forwarded to error management services such as Bugsnag.
+ #
+ # Warning:
+ # Capturing backtraces is very expensive and should not be done all
+ # the time. It is recommended to run it at :error level in production.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:67
+ def backtrace_level=(level); end
+
+ # Returns the current backtrace level index
+ # For internal use only
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:80
+ def backtrace_level_index; end
+
+ # Whether `SemanticLogger[Class]` returns a shared, cached Logger instance per
+ # class. Disabled by default. Strings are never cached (see #[]).
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:28
+ def cache_loggers=(cache_loggers); end
+
+ # Returns whether logger caching is enabled.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:34
+ def cache_loggers?; end
+
+ # Clear out all previously registered appenders
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:215
+ def clear_appenders!; end
+
+ # Discard all cached loggers so that subsequent `SemanticLogger[Class]` calls
+ # build fresh instances. Primarily useful in tests, or after redefining a
+ # class that was previously cached.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:41
+ def clear_logger_cache; end
+
+ # Close all appenders and flush any outstanding messages.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:234
+ def close; end
+
+ # Returns the global default log level
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:53
+ def default_level; end
+
+ # Sets the global default log level
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:46
+ def default_level=(level); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:592
+ def default_level_index; end
+
+ # Returns [String] name of this environment for logging purposes
+ # Note: Not all appenders use `environment`
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:108
+ def environment; end
+
+ # Override the default environment
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:113
+ def environment=(environment); end
+
+ # If the tag being supplied is definitely a string then this fast
+ # tag api can be used for short lived tags
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:375
+ def fast_tag(tag); end
+
+ # Flush all queued log entries disk, database, etc.
+ # All queued log messages are written and then each appender is flushed in turn.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:229
+ def flush; end
+
+ # Returns [String] name of this host for logging purposes
+ # Note: Not all appenders use `host`
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:86
+ def host; end
+
+ # Override the default host name
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:91
+ def host=(host); end
+
+ # Returns the check_interval which is the number of messages between checks
+ # to determine if the appender thread is falling behind.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:564
+ def lag_check_interval; end
+
+ # Set the check_interval which is the number of messages between checks
+ # to determine if the appender thread is falling behind.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:570
+ def lag_check_interval=(lag_check_interval); end
+
+ # Returns the amount of time in seconds
+ # to determine if the appender thread is falling behind.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:576
+ def lag_threshold_s; end
+
+ # :nodoc
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:451
+ def named_tagged(hash); end
+
+ # Returns [Hash] a copy of the named tags currently active for this thread.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:464
+ def named_tags; end
+
+ # Drop log messages instead of blocking the calling thread when the main
+ # pipeline queue is full.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:588
+ def non_blocking=(non_blocking); end
+
+ # Returns [true|false] whether log messages are dropped instead of blocking
+ # when the main pipeline queue is full.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:582
+ def non_blocking?; end
+
+ # Supply a callback to be called whenever a log entry is created.
+ # Useful for capturing appender specific context information.
+ #
+ # Parameters
+ # object: [Object | Proc]
+ # [Proc] the block to call.
+ # [Object] any object on which to call #call.
+ #
+ # Example:
+ # SemanticLogger.on_log do |log|
+ # log.set_context(:honeybadger, Honeybadger.get_context)
+ # end
+ #
+ # Example:
+ # module CaptureContext
+ # def call(log)
+ # log.set_context(:honeybadger, Honeybadger.get_context)
+ # end
+ # end
+ # SemanticLogger.on_log(CaptureContext)
+ #
+ # Note:
+ # * This callback is called within the thread of the application making the logging call.
+ # * If these callbacks are slow they will slow down the application.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:301
+ def on_log(object = T.unsafe(nil), &); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:481
+ def pop_named_tags(quantity = T.unsafe(nil)); end
+
+ # Remove specified number of tags from the current tag list
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:445
+ def pop_tags(quantity = T.unsafe(nil)); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:476
+ def push_named_tags(hash); end
+
+ # Add tags to the current scope
+ #
+ # Note:
+ # - This method does not flatten the array or remove any empty elements, or duplicates
+ # since the performance penalty is excessive.
+ # - To get the flattening behavior use the slower api:
+ # `logger.push_tags`
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:439
+ def push_tags(*tags); end
+
+ # Returns [Integer] the number of log entries waiting to be written to the appenders.
+ #
+ # When this number grows it is because the logging appender thread is not
+ # able to write to the appenders fast enough. Either reduce the amount of
+ # logging, increase the log level, reduce the number of appenders, or
+ # look into speeding up the appenders themselves
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:536
+ def queue_size; end
+
+ # Remove an existing appender
+ # Currently only supports appender instances
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:207
+ def remove_appender(appender); end
+
+ # Re-open any open file handles etc. to resources.
+ #
+ # Called automatically in the child process after a fork (see reopen_on_fork?),
+ # and may also be called manually.
+ #
+ # To avoid reopening twice after a single fork (for example when the automatic
+ # fork hook and a framework's `after_fork` callback both fire), reopen is a no-op
+ # if it has already run in the current process. Pass `force: true` to override
+ # this guard and reopen unconditionally, for example when re-opening file handles
+ # in the same process after an external log rotation.
+ #
+ # Note:
+ # Not all appender's implement reopen.
+ # Check the code for each appender you are using before relying on this behavior.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:252
+ def reopen(force: T.unsafe(nil)); end
+
+ # Enable or disable automatic reopening of appenders after a fork.
+ #
+ # # Opt out of the automatic behavior and manage reopen manually:
+ # SemanticLogger.reopen_on_fork = false
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:273
+ def reopen_on_fork=(reopen_on_fork); end
+
+ # Whether appenders are automatically reopened in the child process after a fork.
+ #
+ # Enabled by default. A `Process._fork` hook (Ruby 3.1+) calls SemanticLogger.reopen
+ # in the child after `fork`, `Process.daemon`, `IO.popen`, `Kernel#system`, and
+ # backticks, so framework specific `after_fork` hooks (Puma, Unicorn, Resque,
+ # Spring, etc.) are no longer required.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:265
+ def reopen_on_fork?; end
+
+ # Silence noisy log levels by changing the default_level within the block
+ #
+ # This setting is thread-safe and only applies to the current thread
+ #
+ # Any threads spawned within the block will not be affected by this setting
+ #
+ # #silence can be used to both raise and lower the log level within
+ # the supplied block.
+ #
+ # Example:
+ #
+ # # Perform trace level logging within the block when the default is higher
+ # SemanticLogger.default_level = :info
+ #
+ # logger.debug 'this will _not_ be logged'
+ #
+ # SemanticLogger.silence(:trace) do
+ # logger.debug "this will be logged"
+ # end
+ #
+ # Parameters
+ # new_level
+ # The new log level to apply within the block
+ # Default: :error
+ #
+ # Example:
+ # # Silence all logging for this thread below :error level
+ # SemanticLogger.silence do
+ # logger.info "this will _not_ be logged"
+ # logger.warn "this neither"
+ # logger.error "but errors will be logged"
+ # end
+ #
+ # Note:
+ # #silence does not affect any loggers which have had their log level set
+ # explicitly. I.e. That do not rely on the global default level
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:522
+ def silence(new_level = T.unsafe(nil)); end
+
+ # Returns [Hash] operational statistics for the logging pipeline.
+ #
+ # Useful for exporting Semantic Logger's own health to a monitoring system such as
+ # Prometheus, statsd, etc. The returned Hash contains:
+ #
+ # queue_size: [Integer] Number of log messages waiting on the main pipeline queue.
+ # capped: [Boolean] Whether the main queue has a maximum size.
+ # max_queue_size: [Integer] Maximum queue size, or nil when uncapped.
+ # thread_active: [Boolean] Whether the main pipeline thread is running.
+ # processed: [Integer] Cumulative number of log messages processed since startup.
+ # dropped: [Integer] Cumulative number of log messages dropped at the main queue.
+ # appenders: [Array] Per-appender statistics. Appenders that run their own
+ # async thread report their queue_size and
+ # processed/dropped/failed counts; appenders that log
+ # inline report `async: false`.
+ #
+ # All counters are cumulative since process startup. They are thread-safe to read and
+ # are maintained without adding any locking to the logging hot path.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:558
+ def stats; end
+
+ # Run Semantic Logger in Synchronous mode.
+ #
+ # I.e. Instead of logging messages in a separate thread for better performance,
+ # log them using the current thread.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:600
+ def sync!; end
+
+ # Running in synchronous mode?
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:605
+ def sync?; end
+
+ # Add the tags or named tags to the list of tags to log for this thread whilst the supplied block is active.
+ #
+ # Returns result of block.
+ #
+ # Tagged example:
+ # SemanticLogger.tagged(12345, 'jack') do
+ # logger.debug('Hello World')
+ # end
+ #
+ # Named Tags (Hash) example:
+ # SemanticLogger.tagged(tracking_number: 12345) do
+ # logger.debug('Hello World')
+ # end
+ #
+ # Notes:
+ # - Tags should be a list without any empty values, or contain any array.
+ # - `logger.tagged` is a slower api that will flatten the example below:
+ # `logger.tagged([['first', nil], nil, ['more'], 'other'])`
+ # to the equivalent of:
+ # `logger.tagged('first', 'more', 'other')`
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:407
+ def tagged(*tags, &); end
+
+ # Returns a copy of the [Array] of [String] tags currently active for this thread
+ # Returns nil if no tags are set
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:426
+ def tags; end
+
+ private
+
+ # Lazily initialized thread-safe cache of one Logger per Class/Module.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:619
+ def logger_cache; end
+ end
+end
+
+# Formatting & colors used by optional color formatter
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/ansi_colors.rb:3
+module SemanticLogger::AnsiColors; end
+
+# pkg:gem/semantic_logger#lib/semantic_logger/ansi_colors.rb:6
+SemanticLogger::AnsiColors::BLACK = T.let(T.unsafe(nil), String)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/ansi_colors.rb:10
+SemanticLogger::AnsiColors::BLUE = T.let(T.unsafe(nil), String)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/ansi_colors.rb:5
+SemanticLogger::AnsiColors::BOLD = T.let(T.unsafe(nil), String)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/ansi_colors.rb:4
+SemanticLogger::AnsiColors::CLEAR = T.let(T.unsafe(nil), String)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/ansi_colors.rb:12
+SemanticLogger::AnsiColors::CYAN = T.let(T.unsafe(nil), String)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/ansi_colors.rb:8
+SemanticLogger::AnsiColors::GREEN = T.let(T.unsafe(nil), String)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/ansi_colors.rb:11
+SemanticLogger::AnsiColors::MAGENTA = T.let(T.unsafe(nil), String)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/ansi_colors.rb:7
+SemanticLogger::AnsiColors::RED = T.let(T.unsafe(nil), String)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/ansi_colors.rb:13
+SemanticLogger::AnsiColors::WHITE = T.let(T.unsafe(nil), String)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/ansi_colors.rb:9
+SemanticLogger::AnsiColors::YELLOW = T.let(T.unsafe(nil), String)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/appender.rb:2
+module SemanticLogger::Appender
+ class << self
+ # Returns [SemanticLogger::Subscriber] appender for the supplied options
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender.rb:35
+ def factory(async: T.unsafe(nil), batch: T.unsafe(nil), max_queue_size: T.unsafe(nil), lag_check_interval: T.unsafe(nil), lag_threshold_s: T.unsafe(nil), batch_size: T.unsafe(nil), batch_seconds: T.unsafe(nil), non_blocking: T.unsafe(nil), dropped_message_report_seconds: T.unsafe(nil), async_max_retries: T.unsafe(nil), **args, &); end
+
+ private
+
+ # Returns [Subscriber] instance from the supplied options.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender.rb:76
+ def build(io: T.unsafe(nil), file_name: T.unsafe(nil), appender: T.unsafe(nil), metric: T.unsafe(nil), logger: T.unsafe(nil), **args, &); end
+ end
+end
+
+# Proxy that allows any appender to run asynchronously in a separate thread.
+#
+# The worker thread and the in-memory queue are owned by an internal
+# SemanticLogger::QueueProcessor. This proxy forwards log/flush/close/reopen on to the
+# processor, and forwards the remaining appender methods (name, level, ...) directly to
+# the wrapped appender so they keep executing on the caller's thread.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:11
+class SemanticLogger::Appender::Async
+ extend ::Forwardable
+
+ # Appender proxy to allow an existing appender to run asynchronously in a separate thread.
+ #
+ # Parameters:
+ # appender: [SemanticLogger::Subscriber]
+ # The appender to log to in a separate thread.
+ #
+ # max_queue_size: [Integer]
+ # The maximum number of log messages to hold on the queue before blocking attempts to add to the queue.
+ # -1: The queue size is uncapped and will never block no matter how long the queue is.
+ # Default: 10,000
+ #
+ # lag_threshold_s [Float]
+ # Log a warning when a log message has been on the queue for longer than this period in seconds.
+ # Default: 30
+ #
+ # lag_check_interval: [Integer]
+ # Number of messages to process before checking for slow logging.
+ # Default: 1,000
+ # Note: Not applicable when batch: true.
+ #
+ # batch: [true|false]
+ # Process log messages in batches via the appender's #batch method, instead of one at a time.
+ # The appender must implement #batch.
+ # Default: false
+ #
+ # batch_size: [Integer]
+ # Maximum number of messages to batch up before sending.
+ # Default: 300
+ # Note: Only applicable when batch: true.
+ #
+ # batch_seconds: [Integer]
+ # Maximum number of seconds between sending batches.
+ # Default: 5
+ # Note: Only applicable when batch: true.
+ #
+ # non_blocking: [true|false]
+ # Whether to drop log messages instead of blocking the calling thread when the queue is full.
+ # When true and the queue is capped, attempts to add to a full queue return immediately and
+ # the message is dropped. The number of dropped messages is logged to the internal logger
+ # periodically (see dropped_message_report_seconds). Only applies to a capped queue.
+ # Default: false
+ #
+ # dropped_message_report_seconds: [Integer]
+ # When non_blocking is enabled, log the count of dropped messages to the internal logger
+ # at most once every this number of seconds. Also limits how often messages discarded
+ # because their content could not be written are reported, after the first.
+ # Default: 30
+ #
+ # async_max_retries: [Integer]
+ # Maximum number of consecutive times to restart the worker thread (with a back-off)
+ # after it raises an exception while processing messages, before giving up and stopping
+ # the thread. The counter resets after any message is processed successfully.
+ # -1: Retry indefinitely and never stop the thread (the pre-v5 behaviour).
+ # Default: 100
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:87
+ def initialize(appender:, **args); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:26
+ def active?(*args, **, &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:14
+ def appender; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:17
+ def application(*args, **, &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:26
+ def batch?(*args, **, &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:26
+ def capped?(*args, **, &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:26
+ def close(*args, **, &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:17
+ def console_output?(*args, **, &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:17
+ def console_stream(*args, **, &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:26
+ def dropped_count(*args, **, &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:17
+ def environment(*args, **, &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:26
+ def failed_count(*args, **, &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:17
+ def filter(*args, **, &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:26
+ def flush(*args, **, &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:17
+ def host(*args, **, &block); end
+
+ # Returns [String] the class and object address of this proxy, whether it batches, and the
+ # wrapped appender's own #inspect, which shows only what that appender says is safe, but none of
+ # the instance variables of this proxy or its queue processor. See Subscriber#inspect.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:95
+ def inspect; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:26
+ def lag_check_interval(*args, **, &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:26
+ def lag_check_interval=(*args, **, &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:26
+ def lag_threshold_s(*args, **, &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:26
+ def lag_threshold_s=(*args, **, &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:17
+ def level(*args, **, &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:17
+ def level=(*args, **, &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:26
+ def log(*args, **, &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:17
+ def logger(*args, **, &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:17
+ def logger=(*args, **, &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:26
+ def max_queue_size(*args, **, &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:17
+ def name(*args, **, &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:26
+ def non_blocking=(*args, **, &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:26
+ def non_blocking?(*args, **, &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:26
+ def processed_count(*args, **, &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:14
+ def processor; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:26
+ def queue(*args, **, &block); end
+
+ # Re-open appender after a fork.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:101
+ def reopen; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:17
+ def should_log?(*args, **, &block); end
+
+ # Returns [Hash] operational statistics for this appender.
+ #
+ # name: [String] Name of the wrapped appender.
+ # async: [true] This appender logs asynchronously via a separate thread.
+ # thread_active: [Boolean] Whether the worker thread is currently running.
+ # queue_size: [Integer] Number of log messages currently waiting to be written.
+ # capped: [Boolean] Whether the queue has a maximum size.
+ # max_queue_size: [Integer] Maximum queue size, or nil when uncapped.
+ # processed: [Integer] Cumulative number of log messages written since startup.
+ # dropped: [Integer] Cumulative number of log messages dropped because the queue
+ # was full (only possible when non_blocking is enabled).
+ # failed: [Integer] Cumulative number of log messages discarded because their
+ # content could not be written (see Subscriber#message_error?).
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:119
+ def stats; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/async.rb:26
+ def thread(*args, **, &block); end
+end
+
+# pkg:gem/semantic_logger#lib/semantic_logger/appender/bugsnag.rb:14
+class SemanticLogger::Appender::Bugsnag < ::SemanticLogger::Subscriber
+ # Create Bugsnag Error / Exception Appender
+ #
+ # Parameters
+ # level: [:trace | :debug | :info | :warn | :error | :fatal]
+ # Override the log level for this appender.
+ # Default: :error
+ #
+ # formatter: [Object|Proc]
+ # An instance of a class that implements #call, or a Proc to be used to format
+ # the output from this appender
+ # Default: Use the built-in formatter (See: #call)
+ #
+ # filter: [Regexp|Proc]
+ # RegExp: Only include log messages where the class name matches the supplied.
+ # regular expression. All other messages will be ignored.
+ # Proc: Only include log messages where the supplied Proc returns true
+ # The Proc must return true or false.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/bugsnag.rb:32
+ def initialize(level: T.unsafe(nil), **args, &block); end
+
+ # Returns [Hash] of parameters to send to Bugsnag.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/bugsnag.rb:43
+ def call(log, logger); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/bugsnag.rb:53
+ def log(log); end
+
+ private
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/bugsnag.rb:66
+ def bugsnag_notify(exception, hash, level); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/bugsnag.rb:78
+ def extract_exception(log); end
+
+ # Bugsnag supports: error, warning or info
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/bugsnag.rb:91
+ def log_level(level); end
+end
+
+# Abstract base appender for Elasticsearch-compatible search engines.
+#
+# Implements the shared bulk-indexing pipeline used by both the
+# {Elasticsearch} and {OpenSearch} appenders. Subclasses only need to
+# supply the backing client class.
+#
+# This class is internal: applications add an appender via
+# `SemanticLogger.add_appender(appender: :elasticsearch, ...)` or
+# `appender: :opensearch`, never by referencing this class directly.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_base.rb:14
+class SemanticLogger::Appender::ElasticsearchBase < ::SemanticLogger::Subscriber
+ # Create an Elasticsearch-compatible appender over persistent HTTP(S).
+ #
+ # Parameters:
+ # index: [String]
+ # Prefix of the index to store the logs in.
+ # The final index appends the date so that indexes are used per day.
+ # I.e. The final index will look like 'semantic_logger-YYYY.MM.DD'
+ # Default: 'semantic_logger'
+ #
+ # date_pattern: [String]
+ # The time format used to generate the full index name. Useful
+ # if you want monthly indexes ('%Y.%m') or weekly ('%Y.%W').
+ # Default: '%Y.%m.%d'
+ #
+ # type: [String]
+ # Deprecated and ignored. Document `_type` has been unused since
+ # Elasticsearch 7 and is ignored by OpenSearch. Passing it logs a
+ # deprecation warning; it will be removed in v6.
+ #
+ # level: [:trace | :debug | :info | :warn | :error | :fatal]
+ # Override the log level for this appender.
+ # Default: SemanticLogger.default_level
+ #
+ # formatter: [Object|Proc|Symbol|Hash]
+ # An instance of a class that implements #call, or a Proc to be used to format
+ # the output from this appender
+ # Default: :raw_json (See: #call)
+ #
+ # filter: [Regexp|Proc]
+ # RegExp: Only include log messages where the class name matches the supplied.
+ # regular expression. All other messages will be ignored.
+ # Proc: Only include log messages where the supplied Proc returns true
+ # The Proc must return true or false.
+ #
+ # host: [String]
+ # Name of this host to appear in log messages.
+ # Default: SemanticLogger.host
+ #
+ # application: [String]
+ # Name of this application to appear in log messages.
+ # Default: SemanticLogger.application
+ #
+ # Client Parameters (passed through to the backing client):
+ # url: [String]
+ # Fully qualified address to the service.
+ # Default: 'http://localhost:9200'
+ #
+ # hosts: [String|Hash|Array]
+ # Single host passed as a String or Hash, or multiple hosts
+ # passed as an Array; `host` or `url` keys are also valid.
+ # Note:
+ # :url above is ignored when supplying this option.
+ #
+ # resurrect_after [Float]
+ # After how many seconds a dead connection should be tried again.
+ #
+ # reload_connections [true|false|Integer]
+ # Reload connections after X requests.
+ # Default: false
+ #
+ # randomize_hosts [true|false]
+ # Shuffle connections on initialization and reload.
+ # Default: false
+ #
+ # sniffer_timeout [Integer]
+ # Timeout for reloading connections in seconds.
+ # Default: 1
+ #
+ # retry_on_failure [true|false|Integer]
+ # Retry X times when request fails before raising and exception.
+ # Default: false
+ #
+ # retry_on_status [Array]
+ # Retry when specific status codes are returned.
+ #
+ # reload_on_failure [true|false]
+ # Reload connections after failure.
+ # Default: false
+ #
+ # request_timeout [Integer]
+ # The request timeout to be passed to transport in options.
+ #
+ # adapter [Symbol]
+ # A specific adapter for Faraday (e.g. `:patron`)
+ #
+ # transport_options [Hash]
+ # Options to be passed to the `Faraday::Connection` constructor.
+ #
+ # transport_class [Constant]
+ # A specific transport class to use, will be initialized by
+ # the client and passed hosts and all arguments.
+ #
+ # transport [Object]
+ # A specific transport instance.
+ #
+ # serializer_class [Constant]
+ # A specific serializer class to use, will be initialized by
+ # the transport and passed the transport instance.
+ #
+ # selector
+ # An instance of a connection selector strategy.
+ #
+ # send_get_body_as [String]
+ # Specify the HTTP method to use for GET requests with a body.
+ # Default: 'GET'
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_base.rb:123
+ def initialize(url: T.unsafe(nil), index: T.unsafe(nil), date_pattern: T.unsafe(nil), type: T.unsafe(nil), level: T.unsafe(nil), formatter: T.unsafe(nil), filter: T.unsafe(nil), application: T.unsafe(nil), environment: T.unsafe(nil), host: T.unsafe(nil), data_stream: T.unsafe(nil), **client_args, &); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_base.rb:169
+ def batch(logs); end
+
+ # The whole batch is formatted into a single bulk request before anything is sent.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_base.rb:180
+ def batch_all_or_nothing?; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_base.rb:15
+ def batch_size; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_base.rb:15
+ def batch_size=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_base.rb:15
+ def client; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_base.rb:15
+ def client=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_base.rb:15
+ def client_args; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_base.rb:15
+ def client_args=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_base.rb:15
+ def date_pattern; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_base.rb:15
+ def date_pattern=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_base.rb:15
+ def flush_interval; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_base.rb:15
+ def flush_interval=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_base.rb:15
+ def index; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_base.rb:15
+ def index=(_arg0); end
+
+ # The url without its credentials, and the index. See Subscriber#inspect.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_base.rb:185
+ def inspect_details; end
+
+ # Log to the index for today
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_base.rb:164
+ def log(log); end
+
+ # The url is left to the client gem to parse, since it also takes a comma separated list of
+ # urls, an Array of them, or hosts without a scheme.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_base.rb:159
+ def reopen; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_base.rb:15
+ def timeout_interval; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_base.rb:15
+ def timeout_interval=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_base.rb:15
+ def url; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_base.rb:15
+ def url=(_arg0); end
+
+ private
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_base.rb:224
+ def bulk_index(log); end
+
+ # Returns [String] the log message formatted as a bulk line, serialized by Utils.to_json
+ # and handed to the client as a String. The client gem's serializer writes Infinity and NaN
+ # as bare words, which is not JSON, and does not repair invalid UTF-8, a structure nested too
+ # deeply, or a Struct (written through its #inspect), so such an entry was dropped or its
+ # objects' instance variables were written. Serializing is part of formatting, so an error
+ # doing so discards the message rather than stalling the appender (see #format_log). A
+ # formatter that returns a String is taken to have serialized the line itself.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_base.rb:204
+ def bulk_line(log); end
+
+ # Serializes the action lines; the documents already are (see #bulk_line).
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_base.rb:209
+ def bulk_write(messages); end
+
+ # The backing client class, e.g. ::Elasticsearch::Client or ::OpenSearch::Client.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_base.rb:193
+ def client_class; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_base.rb:231
+ def default_formatter; end
+end
+
+# pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_http.rb:15
+class SemanticLogger::Appender::ElasticsearchHttp < ::SemanticLogger::Appender::Http
+ # Create Elasticsearch appender over persistent HTTP(S)
+ #
+ # Parameters:
+ # index: [String]
+ # Prefix of the index to store the logs in Elasticsearch.
+ # The final index appends the date so that indexes are used per day.
+ # I.e. The final index will look like 'semantic_logger-YYYY.MM.DD'
+ # Default: 'semantic_logger'
+ #
+ # type: [String]
+ # Deprecated and ignored. Document `_type` has been unused since
+ # Elasticsearch 7. Passing it logs a deprecation warning; it will be
+ # removed in v6.
+ #
+ # level: [:trace | :debug | :info | :warn | :error | :fatal]
+ # Override the log level for this appender.
+ # Default: SemanticLogger.default_level
+ #
+ # formatter: [Object|Proc|Symbol|Hash]
+ # An instance of a class that implements #call, or a Proc to be used to format
+ # the output from this appender
+ # Default: Use the built-in formatter (See: #call)
+ #
+ # filter: [Regexp|Proc]
+ # RegExp: Only include log messages where the class name matches the supplied.
+ # regular expression. All other messages will be ignored.
+ # Proc: Only include log messages where the supplied Proc returns true
+ # The Proc must return true or false.
+ #
+ # host: [String]
+ # Name of this host to appear in log messages.
+ # Default: SemanticLogger.host
+ #
+ # application: [String]
+ # Name of this application to appear in log messages.
+ # Default: SemanticLogger.application
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_http.rb:54
+ def initialize(index: T.unsafe(nil), type: T.unsafe(nil), url: T.unsafe(nil), **http_args, &); end
+
+ # Deletes all log data captured for a day.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_http.rb:80
+ def delete_all(date = T.unsafe(nil)); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_http.rb:16
+ def index; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_http.rb:16
+ def index=(_arg0); end
+
+ # Log to the index for today.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/elasticsearch_http.rb:75
+ def log(log); end
+end
+
+# pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:8
+class SemanticLogger::Appender::File < ::SemanticLogger::Subscriber
+ # Create an appender to log to a named file.
+ #
+ # Parameters
+ # file_name [String]
+ # Name of the file to write to.
+ #
+ # File name format directives:
+ # %p - Process Id
+ # %n - Short hostname (SemanticLogger.host). Everything before the first period in the hostname.
+ # %N - Full hostname (SemanticLogger.host)
+ # %a - Application name (SemanticLogger.application)
+ # %e - Environment name (SemanticLogger.environment)
+ # %D - Current Date. Equivalent to "%Y%m%d"
+ # %T - Current Time. Equivalent to "%H%M%S"
+ # %% - Literal `%` character
+ #
+ # Date:
+ # %Y - Year with century
+ # %C - year / 100 (round down. 20 in 2009)
+ # %y - year % 100 (00..99)
+ # %m - Month of the year, zero-padded (01..12)
+ # %d - Day of the month, zero-padded (01..31)
+ # %j - Day of the year (001..366)
+ # %U - Week number of the year. The week starts with Sunday. (00..53)
+ # %W - Week number of the year. The week starts with Monday. (00..53)
+ #
+ # Time:
+ # %H - 24 Hour of the day, zero-padded (00..23)
+ # %M - Minute of the hour (00..59)
+ # %S - Second of the minute (00..60)
+ #
+ # Examples:
+ # Create a log file name consisting of the short host name, process id, date, and time.
+ # "log/production-%n-%p-%D-%T.log"
+ #
+ # :level [:trace | :debug | :info | :warn | :error | :fatal]
+ # Override the log level for this appender.
+ # Default: SemanticLogger.default_level
+ #
+ # :formatter: [Object|Proc]
+ # An instance of a class that implements #call, or a Proc to be used to format
+ # the output from this appender
+ # Default: Use the built-in formatter (See: #call)
+ #
+ # :filter [Regexp|Proc]
+ # RegExp: Only include log messages where the class name matches the supplied
+ # regular expression. All other messages will be ignored.
+ # Proc: Only include log messages where the supplied Proc returns true
+ # The Proc must return true or false.
+ #
+ # :append [true|false]
+ # Append to the log file if already present?
+ # Default: true
+ #
+ # :exclusive_lock [true|false]
+ # Obtain an exclusive lock on the file, for operating systems that support it.
+ # Prevents multiple processes from trying to write to the same log file.
+ # Default: false
+ #
+ # :encoding ["UTF-8", "UTF-16", etc.]
+ # Encoding to use when writing to the file.
+ # Default: Encoding::BINARY
+ #
+ # :permissions [Integer]
+ # Octal file permissions to apply to the log file.
+ # Log files frequently contain sensitive information, so restrict access
+ # by supplying for example `0o640` (owner read/write, group read).
+ # Applied both when the file is created and to an existing log file, which must be
+ # a regular file owned by the process, with a single hard link, that the file_name
+ # names directly rather than through a symbolic link. Nothing is written to any
+ # other file, or when the file cannot be opened: the appender raises IOError when it
+ # is created, and when the file is later reopened, it reports why and writes nothing
+ # until the file is fixed, trying again every few seconds.
+ # Default: nil (use the process umask, the standard Ruby behavior)
+ #
+ # :retry_count [Integer]
+ # Number of times to attempt to re-open the file name when an error occurs trying to
+ # write to the file.
+ # Note: Set to 0 to disable retries.
+ # Default: 1
+ #
+ # :reopen_period [String]
+ # Specify a period after which to re-open the log file, specified in minutes, hours, or days.
+ # The format of the duration must start with an Integer or Float number,
+ # followed by the duration specified as:
+ # "m" : minutes
+ # "h" : hours
+ # "d" : days
+ # The time is rounded down to the specified time interval, so that:
+ # - "1h" will re-open every hour at the beginning of the hour.
+ # - "30m" will re-open every 30 minutes at the beginning of the 30th minute.
+ # - "1d" will re-open every day at midnight.
+ # Examples:
+ # "60m" : Every 60 minutes at the beginning of the minute: 10:24:00, 11:24:00, 12:24:00, ...
+ # "1h" : Every hour at the beginning of the hour: 10:00:00, 11:00:00, 12:00:00, ...
+ # "1d" : Every day at the beginning of the day: "20211008 00:00:00", "20211009 00:00:00", ...
+ # Default: nil (Disabled)
+ #
+ # :reopen_count [Integer]
+ # Close and re-open the log file after every `reopen_count` number of logged entries.
+ # Default: 0 (Disabled)
+ #
+ # :reopen_size [Integer]
+ # Approximate number of bytes to write to a log file by this process before closing and re-opening it.
+ # Notes:
+ # - When `append: true` and the file already exists, it reads the size of the current log file
+ # and starts with that size.
+ # - If the current log file size already exceeds the `reopen_size`, its current size is ignored.
+ # - The `reopen_size` is only the amount of bytes written by this process, it excludes data
+ # written by other processes. Use a unique filename to prevent multiple processes from writing to
+ # the same log file at the same time.
+ # Default: 0 (Disabled)
+ #
+ # Example
+ # require "semantic_logger"
+ #
+ # # Enable trace level logging
+ # SemanticLogger.default_level = :info
+ #
+ # # Log to a file
+ # SemanticLogger.add_appender(file_name: "application.log", formatter: :color)
+ #
+ # logger = SemanticLogger["test"]
+ # logger.info "Hello World"
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:146
+ def initialize(file_name, retry_count: T.unsafe(nil), append: T.unsafe(nil), reopen_period: T.unsafe(nil), reopen_count: T.unsafe(nil), reopen_size: T.unsafe(nil), encoding: T.unsafe(nil), exclusive_lock: T.unsafe(nil), permissions: T.unsafe(nil), **args, &); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:9
+ def append; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:9
+ def append=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:11
+ def current_file_name; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:9
+ def encoding; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:9
+ def encoding=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:9
+ def exclusive_lock; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:9
+ def exclusive_lock=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:9
+ def file_name; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:9
+ def file_name=(_arg0); end
+
+ # Flush all pending logs to disk.
+ # Waits for all sent documents to be written to disk
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:235
+ def flush; end
+
+ # See Subscriber#inspect.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:240
+ def inspect_details; end
+
+ # Since only one appender thread will be writing to the file at a time
+ # it is not necessary to protect access to the file with a semaphore.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:208
+ def log(log); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:11
+ def log_count; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:11
+ def log_size; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:9
+ def permissions; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:9
+ def permissions=(_arg0); end
+
+ # After forking an active process call #reopen to re-open
+ # open the file handles etc to resources.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:177
+ def reopen; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:11
+ def reopen_at; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:9
+ def reopen_count; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:9
+ def reopen_count=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:9
+ def reopen_period; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:9
+ def reopen_period=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:9
+ def reopen_size; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:9
+ def reopen_size=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:9
+ def retry_count; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:9
+ def retry_count=(_arg0); end
+
+ private
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:351
+ def apply_format_directives(file_name); end
+
+ # Round down the current time based on the period, then add on the duration for that period
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:410
+ def calculate_reopen_at(duration, period, time = T.unsafe(nil)); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:325
+ def close_quietly(file); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:246
+ def current_file_name=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:357
+ def format_directive(directive); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:246
+ def log_count=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:246
+ def log_size=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:331
+ def monotonic_time; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:384
+ def next_reopen_period(period_string); end
+
+ # Returns why the log file could not be opened with permissions.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:299
+ def open_refusal(error); end
+
+ # Opens the log file and applies the permissions to it, when it is safe to do so (see
+ # #permissions_refusal). Returns the open file, or nil after closing it and recording why it is
+ # refused, so that nothing is written to it.
+ #
+ # Changing the permissions of a file that another name links to could loosen them on an
+ # unrelated file, such as a private key linked into a shared log directory. Writing log messages
+ # to a file that this process does not own, or that another name links to, would let whoever
+ # controls it read them, despite the permissions asked for. So with permissions, the appender
+ # fails closed: it raises when it is created (see #initialize), and when the file is later
+ # reopened, on a rotation, a fork, or a write retry, it stops writing and reports why (see
+ # #refused) until the file is fixed (see #refused_retry_due?).
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:259
+ def open_with_permissions(options); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:391
+ def parse_period(period_string); end
+
+ # Returns why the permissions must not be applied to the open log file, nor log messages
+ # written to it, or nil when they can.
+ #
+ # It must be a regular file owned by this process, with a single hard link, since a hard link
+ # planted in the log directory is otherwise indistinguishable from the file it links to. The
+ # path must also still name it, so that swapping the path after opening cannot redirect the
+ # log messages.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:312
+ def permissions_refusal(file); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:294
+ def refusal_message; end
+
+ # Records why the log file is refused, and returns nil.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:276
+ def refuse(reason, cause = T.unsafe(nil)); end
+
+ # Reports why log messages are not being written to the log file, once for each file and
+ # reason, and returns false.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:285
+ def refused; end
+
+ # A refused log file is opened again every few seconds, and at the next scheduled reopen,
+ # rather than for every message.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:345
+ def refused_retry_due?; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:246
+ def reopen_at=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:335
+ def time_to_reopen?; end
+end
+
+# Seconds to wait before opening a refused log file again.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:19
+SemanticLogger::Appender::File::REFUSED_RETRY_INTERVAL = T.let(T.unsafe(nil), Integer)
+
+# With permissions, the log file is opened without following a symbolic link, so that a link
+# planted in the log directory can neither create nor open the file it points at, without
+# blocking, so that a planted FIFO fails to open instead of waiting for a reader, and without
+# becoming the controlling terminal.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/appender/file.rb:17
+SemanticLogger::Appender::File::SECURE_OPEN_FLAGS = T.let(T.unsafe(nil), Integer)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/appender/honeybadger.rb:14
+class SemanticLogger::Appender::Honeybadger < ::SemanticLogger::Subscriber
+ # Honeybadger Appender
+ #
+ # Parameters
+ # level: [:trace | :debug | :info | :warn | :error | :fatal]
+ # Override the log level for this appender.
+ # Default: :error
+ #
+ # formatter: [Object|Proc|Symbol|Hash]
+ # An instance of a class that implements #call, or a Proc to be used to format
+ # the output from this appender
+ # Default: Use the built-in formatter (See: #call)
+ #
+ # filter: [Regexp|Proc]
+ # RegExp: Only include log messages where the class name matches the supplied.
+ # regular expression. All other messages will be ignored.
+ # Proc: Only include log messages where the supplied Proc returns true
+ # The Proc must return true or false.
+ #
+ # host: [String]
+ # Name of this host to appear in log messages.
+ # Default: SemanticLogger.host
+ #
+ # application: [String]
+ # Name of this application to appear in log messages.
+ # Default: SemanticLogger.application
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/honeybadger.rb:40
+ def initialize(level: T.unsafe(nil), **args, &block); end
+
+ # Send an error notification to honeybadger
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/honeybadger.rb:45
+ def log(log); end
+
+ private
+
+ # Use Raw Formatter by default
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/honeybadger.rb:65
+ def default_formatter; end
+end
+
+# pkg:gem/semantic_logger#lib/semantic_logger/appender/honeybadger_insights.rb:14
+class SemanticLogger::Appender::HoneybadgerInsights < ::SemanticLogger::Subscriber
+ # Honeybadger Appender
+ #
+ # Parameters
+ # level: [:trace | :debug | :info | :warn | :error | :fatal]
+ # Override the log level for this appender.
+ # Default: :error
+ #
+ # formatter: [Object|Proc|Symbol|Hash]
+ # An instance of a class that implements #call, or a Proc to be used to format
+ # the output from this appender
+ # Default: Use the built-in formatter (See: #call)
+ #
+ # filter: [Regexp|Proc]
+ # RegExp: Only include log messages where the class name matches the supplied.
+ # regular expression. All other messages will be ignored.
+ # Proc: Only include log messages where the supplied Proc returns true
+ # The Proc must return true or false.
+ #
+ # host: [String]
+ # Name of this host to appear in log messages.
+ # Default: SemanticLogger.host
+ #
+ # application: [String]
+ # Name of this application to appear in log messages.
+ # Default: SemanticLogger.application
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/honeybadger_insights.rb:40
+ def initialize(level: T.unsafe(nil), **args, &block); end
+
+ # Send log to honeybadger events API
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/honeybadger_insights.rb:45
+ def log(log); end
+
+ private
+
+ # Use Raw Formatter by default
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/honeybadger_insights.rb:56
+ def default_formatter; end
+end
+
+# pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:31
+class SemanticLogger::Appender::Http < ::SemanticLogger::Subscriber
+ # Create HTTP(S) log appender
+ #
+ # Parameters:
+ # url: [String]
+ # Valid URL to post to.
+ # Example: http://example.com/some_path
+ # To enable SSL include https in the URL.
+ # Example: https://example.com/some_path
+ # verify_mode will default: OpenSSL::SSL::VERIFY_PEER
+ # A query string is kept and sent with every request that submits log data,
+ # for the log servers that are configured through it.
+ # Example: http://example.com/some_path?source=my_app
+ #
+ # application: [String]
+ # Name of this application to appear in log messages.
+ # Default: SemanticLogger.application
+ #
+ # host: [String]
+ # Name of this host to appear in log messages.
+ # Default: SemanticLogger.host
+ #
+ # username: [String]
+ # User name for basic Authentication.
+ # Default: nil ( do not use basic auth )
+ #
+ # password: [String]
+ # Password for basic Authentication.
+ #
+ # header: [Hash]
+ # Custom HTTP headers to send with each request.
+ # Default: {} ( do not send any custom headers)
+ # Example: {"Authorization" => "Bearer BEARER_TOKEN"}
+ #
+ # compress: [true|false]
+ # Whether to compress the JSON string with GZip.
+ # Default: false
+ #
+ # ssl: [Hash]
+ # Specific SSL options: For more details see NET::HTTP.start
+ # ca_file, ca_path, cert, cert_store, ciphers, key, ssl_timeout,
+ # ssl_version, verify_callback, verify_depth and verify_mode.
+ #
+ # proxy_url: [String]
+ # URL of proxy server to use for HTTP(s) connections. Should
+ # include username and password if required.
+ # Example: http://user@pass:example.com/some_path
+ # To enable SSL include https in the URL.
+ # Example: https://example.com/some_path
+ # If this is set to :ENV, Net::HTTP will use the environment http_proxy*
+ # variables if they are set. If set to nil then no proxy will be used,
+ # even if the environment variables are set.
+ #
+ # level: [:trace | :debug | :info | :warn | :error | :fatal]
+ # Override the log level for this appender.
+ # Default: SemanticLogger.default_level
+ #
+ # formatter: [Object|Proc]
+ # An instance of a class that implements #call, or a Proc to be used to format
+ # the output from this appender
+ # Default: Use the built-in formatter (See: #call)
+ #
+ # filter: [Regexp|Proc]
+ # RegExp: Only include log messages where the class name matches the supplied.
+ # regular expression. All other messages will be ignored.
+ # Proc: Only include log messages where the supplied Proc returns true
+ # The Proc must return true or false.
+ #
+ # open_timeout: [Float]
+ # Default: 2.0
+ #
+ # read_timeout: [Float]
+ # Default: 1.0
+ #
+ # continue_timeout: [Float]
+ # Default: 1.0
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:117
+ def initialize(url:, compress: T.unsafe(nil), ssl: T.unsafe(nil), username: T.unsafe(nil), password: T.unsafe(nil), header: T.unsafe(nil), proxy_url: T.unsafe(nil), open_timeout: T.unsafe(nil), read_timeout: T.unsafe(nil), continue_timeout: T.unsafe(nil), **args, &); end
+
+ # Forward a batch of log messages to the HTTP Server in a single request.
+ # Only used when the appender is created with `batch: true`.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:219
+ def batch(logs); end
+
+ # The whole batch is formatted into a single request before anything is sent.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:233
+ def batch_all_or_nothing?; end
+
+ # The HTTP appender supports batching, but only when explicitly requested
+ # via `batch: true`, so that the default behaviour (one request per log
+ # message) is preserved.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:228
+ def batch_by_default?; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:32
+ def compress; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:32
+ def compress=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:32
+ def continue_timeout; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:32
+ def continue_timeout=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:32
+ def header; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:32
+ def header=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:34
+ def http; end
+
+ # Only the redacted url, since the instance variables hold the password, the authorization
+ # headers, and any credential a subclass adds. See Subscriber#inspect.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:245
+ def inspect_details; end
+
+ # Forward log messages to HTTP Server
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:211
+ def log(log); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:32
+ def open_timeout; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:32
+ def open_timeout=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:34
+ def path; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:34
+ def port; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:34
+ def proxy_url; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:34
+ def query; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:32
+ def read_timeout; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:32
+ def read_timeout=(_arg0); end
+
+ # Returns [String] the scheme, host, and any non-default port of the url. Safe to log.
+ # See Utils.redacted_url.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:239
+ def redacted_url; end
+
+ # Re-open after process fork
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:182
+ def reopen; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:34
+ def server; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:34
+ def ssl_options; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:34
+ def url; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:32
+ def username; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:32
+ def username=(_arg0); end
+
+ private
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:261
+ def compress_data(data); end
+
+ # Use JSON Formatter by default
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:257
+ def default_formatter; end
+
+ # HTTP Delete
+ #
+ # The query string of the configured url is _not_ applied here: it configures how
+ # the server ingests log data, and servers reject it on a maintenance request.
+ # Appender::ElasticsearchHttp#delete_all deletes an index, and Elasticsearch fails
+ # the request with a 400 when it carries unrecognized parameters.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:287
+ def delete(request_uri = T.unsafe(nil)); end
+
+ # Returns [URI] the parsed url, without the url in the error raised for an invalid one.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:252
+ def parse_url(url); end
+
+ # HTTP Post
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:270
+ def post(body, request_uri = T.unsafe(nil)); end
+
+ # Process HTTP Request
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:309
+ def process_request(request, body = T.unsafe(nil)); end
+
+ # HTTP Put
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:276
+ def put(body, request_uri = T.unsafe(nil)); end
+
+ # Applies the query string of the configured url, if any, to the uri of a request
+ # that submits log data.
+ #
+ # Kept out of `path` on purpose: subclasses build their own request paths from it
+ # (Appender::ElasticsearchHttp appends the index name and `_doc` to it), and the
+ # query has to stay at the end of the request uri regardless.
+ #
+ # @param request_uri [String] path of the request, `path` by default.
+ # @return [String]
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:301
+ def uri_with_query(request_uri); end
+end
+
+# Maximum number of bytes of an error response body to write to the internal logger.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:37
+SemanticLogger::Appender::Http::MAX_LOGGED_RESPONSE_BODY = T.let(T.unsafe(nil), Integer)
+
+# Describes a valid url in the error raised for an invalid one.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/appender/http.rb:40
+SemanticLogger::Appender::Http::URL_FORMAT_HINT = T.let(T.unsafe(nil), String)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/appender/io.rb:7
+class SemanticLogger::Appender::IO < ::SemanticLogger::Subscriber
+ # Create a Stream Logger appender instance.
+ #
+ # Parameters
+ # io [IO]
+ # An IO stream to which to write the log messages to.
+ #
+ # :level [:trace | :debug | :info | :warn | :error | :fatal]
+ # Override the log level for this appender.
+ # Default: SemanticLogger.default_level
+ #
+ # :formatter: [Object|Proc]
+ # An instance of a class that implements #call, or a Proc to be used to format
+ # the output from this appender
+ # Default: Use the built-in formatter (See: #call)
+ #
+ # :filter [Regexp|Proc]
+ # RegExp: Only include log messages where the class name matches the supplied
+ # regular expression. All other messages will be ignored.
+ # Proc: Only include log messages where the supplied Proc returns true
+ # The Proc must return true or false.
+ #
+ # Example
+ # require "semantic_logger"
+ #
+ # # Enable trace level logging
+ # SemanticLogger.default_level = :info
+ #
+ # # Log to screen
+ # SemanticLogger.add_appender(io: $stdout, formatter: :color)
+ #
+ # logger = SemanticLogger['test']
+ # logger.info 'Hello World'
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/io.rb:40
+ def initialize(io, **args, &); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/io.rb:63
+ def console_stream; end
+
+ # Flush all pending logs to disk.
+ # Waits for all sent documents to be written to disk
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/io.rb:59
+ def flush; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/io.rb:49
+ def log(log); end
+end
+
+# pkg:gem/semantic_logger#lib/semantic_logger/appender/loki.rb:13
+class SemanticLogger::Appender::Loki < ::SemanticLogger::Appender::Http
+ # Create Grafana Loki appender.
+ #
+ # Parameters:
+ # filter: [Regexp|Proc]
+ # RegExp: Only include log messages where the class name matches the supplied
+ # regular expression. All other messages will be ignored.
+ # Proc: Only include log messages where the supplied Proc returns true.
+ # The Proc must return true or false.
+ #
+ # host: [String]
+ # Name of this host to send as a dimension.
+ # Default: SemanticLogger.host
+ #
+ # application: [String]
+ # Name of this application to send as a dimension.
+ # Default: SemanticLogger.application
+ #
+ # url: [String]
+ # Define the loki instance URL.
+ # Example: https://logs-prod-999.grafana.net
+ # A query string is kept and sent with every request.
+ # Example: https://logs-prod-999.grafana.net?orgid=my_org
+ # Default: nil
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/loki.rb:39
+ def initialize(url: T.unsafe(nil), formatter: T.unsafe(nil), header: T.unsafe(nil), path: T.unsafe(nil), **args, &); end
+
+ # Logs in batches
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/loki.rb:63
+ def batch(logs); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/loki.rb:56
+ def log(log); end
+
+ class << self
+ # Appends the ingestion path to the supplied url, keeping any query string at the
+ # end of the url where Appender::Http can parse it out.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/loki.rb:50
+ def ingestion_url(url, path); end
+ end
+end
+
+# pkg:gem/semantic_logger#lib/semantic_logger/appender/loki.rb:14
+SemanticLogger::Appender::Loki::INGESTION_PATH = T.let(T.unsafe(nil), String)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/appender/sentry_ruby.rb:14
+class SemanticLogger::Appender::SentryRuby < ::SemanticLogger::Subscriber
+ # Create Appender
+ #
+ # Parameters
+ # level: [:trace | :debug | :info | :warn | :error | :fatal]
+ # Override the log level for this appender.
+ # Default: :error
+ #
+ # formatter: [Object|Proc|Symbol|Hash]
+ # An instance of a class that implements #call, or a Proc to be used to format
+ # the output from this appender
+ # Default: Use the built-in formatter (See: #call)
+ #
+ # filter: [Regexp|Proc]
+ # RegExp: Only include log messages where the class name matches the supplied.
+ # regular expression. All other messages will be ignored.
+ # Proc: Only include log messages where the supplied Proc returns true
+ # The Proc must return true or false.
+ #
+ # host: [String]
+ # Name of this host to appear in log messages.
+ # Default: SemanticLogger.host
+ #
+ # application: [String]
+ # Name of this application to appear in log messages.
+ # Default: SemanticLogger.application
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/sentry_ruby.rb:49
+ def initialize(level: T.unsafe(nil), **args, &block); end
+
+ # Send an error notification to sentry
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/sentry_ruby.rb:62
+ def log(log); end
+
+ private
+
+ # Use Raw Formatter by default
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/sentry_ruby.rb:103
+ def default_formatter; end
+
+ # Returns [Array] the fingerprint taken from the named tags or payload, an Array of
+ # Strings, Symbols, or numbers. Returns nil when there is none, or it is of another type, which
+ # is then left where it is and sent to Sentry as data. As for the user, taking it from the
+ # payload is deprecated.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/sentry_ruby.rb:164
+ def extract_fingerprint!(source, from_payload: T.unsafe(nil)); end
+
+ # Extract tags.
+ #
+ # Named tags will be stringified (both key and value).
+ # Unnamed tags will be stringified and joined with a comma. Then they will
+ # be used as a "tag" named tag. If such a tag already exists, it is also
+ # joined with a comma.
+ #
+ # Finally, the tag names are limited to 32 characters and the tag values to 256.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/sentry_ruby.rb:208
+ def extract_tags!(context); end
+
+ # Extract user data from named tags or payload.
+ #
+ # Keys :user_id and :user_email will be used as :id and :email respectively.
+ # Keys :username and :ip_address will be used verbatim.
+ #
+ # Any additional value nested in a :user key will be added, provided any of
+ # the above keys is already present.
+ #
+ # The payload can hold untrusted data, such as a request body, so taking the user from it is
+ # deprecated, and the named tags win: a payload field is only taken when the named tags do not
+ # set it, and its value is a String, Symbol, or Integer. A payload value that is not taken is
+ # left where it is, and sent to Sentry as data.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/sentry_ruby.rb:119
+ def extract_user!(named_tags, payload); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/sentry_ruby.rb:172
+ def fingerprint_part?(part); end
+
+ # Adds the fields of a :user Hash in the payload that the user does not have yet, when each of
+ # its keys is a Symbol or String, and each of its values a String, Symbol, or Integer.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/sentry_ruby.rb:141
+ def merge_payload_user!(user, payload); end
+
+ # Warns once that the Sentry user or fingerprint was taken from the payload.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/sentry_ruby.rb:187
+ def payload_context_deprecated; end
+
+ # Returns [Hash] a copy of the payload that keys can be taken out of. A payload that is not a
+ # Hash is sent to Sentry as the extra named payload.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/sentry_ruby.rb:178
+ def payload_copy(payload); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/sentry_ruby.rb:152
+ def user_key?(key); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/sentry_ruby.rb:156
+ def user_value?(value); end
+end
+
+# The types of value accepted in a fingerprint, which Sentry turns into Strings.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/appender/sentry_ruby.rb:22
+SemanticLogger::Appender::SentryRuby::FINGERPRINT_PART_TYPES = T.let(T.unsafe(nil), Array)
+
+# Keys of the named tags or payload that set the Sentry user, mapped to its fields.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/appender/sentry_ruby.rb:16
+SemanticLogger::Appender::SentryRuby::USER_KEYS = T.let(T.unsafe(nil), Hash)
+
+# The types of value taken from the payload for a field of the Sentry user.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/appender/sentry_ruby.rb:19
+SemanticLogger::Appender::SentryRuby::USER_VALUE_TYPES = T.let(T.unsafe(nil), Array)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/appender/splunk_http.rb:17
+class SemanticLogger::Appender::SplunkHttp < ::SemanticLogger::Appender::Http
+ # Create Splunk appender over persistent HTTP(S)
+ #
+ # Parameters:
+ # token: [String]
+ # Token created in Splunk for this HTTP Appender
+ # Mandatory.
+ #
+ # source_type: [String]
+ # Optional: Source type to display in Splunk
+ #
+ # index: [String]
+ # Optional: Name of a valid index for this message in Splunk.
+ #
+ # url: [String]
+ # Valid URL to post to.
+ # Example: http://example.com
+ # To enable SSL include https in the URL.
+ # Example: https://example.com
+ # verify_mode will default: OpenSSL::SSL::VERIFY_PEER
+ #
+ # application: [String]
+ # Name of this application to appear in log messages.
+ # Default: SemanticLogger.application
+ #
+ # host: [String]
+ # Name of this host to appear in log messages.
+ # Default: SemanticLogger.host
+ #
+ # compress: [true|false]
+ # Splunk supports HTTP Compression, enable by default.
+ # Default: true
+ #
+ # ssl: [Hash]
+ # Specific SSL options: For more details see NET::HTTP.start
+ # ca_file, ca_path, cert, cert_store, ciphers, key, open_timeout, read_timeout, ssl_timeout,
+ # ssl_version, use_ssl, verify_callback, verify_depth and verify_mode.
+ #
+ # level: [:trace | :debug | :info | :warn | :error | :fatal]
+ # Override the log level for this appender.
+ # Default: SemanticLogger.default_level
+ #
+ # formatter: [Object|Proc]
+ # An instance of a class that implements #call, or a Proc to be used to format
+ # the output from this appender
+ # Default: Use the built-in formatter (See: #call)
+ #
+ # filter: [Regexp|Proc]
+ # RegExp: Only include log messages where the class name matches the supplied.
+ # regular expression. All other messages will be ignored.
+ # Proc: Only include log messages where the supplied Proc returns true
+ # The Proc must return true or false.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/splunk_http.rb:71
+ def initialize(token: T.unsafe(nil), source_type: T.unsafe(nil), index: T.unsafe(nil), compress: T.unsafe(nil), **args, &); end
+
+ # Returns [String] JSON to send to Splunk.
+ #
+ # For splunk format requirements see:
+ # https://docs.splunk.com/Documentation/Splunk/latest/Data/FormateventsforHTTPEventCollector
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/splunk_http.rb:90
+ def call(log, logger); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/splunk_http.rb:18
+ def index; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/splunk_http.rb:18
+ def index=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/splunk_http.rb:18
+ def source_type; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/splunk_http.rb:18
+ def source_type=(_arg0); end
+end
+
+# pkg:gem/semantic_logger#lib/semantic_logger/appender/syslog.rb:32
+class SemanticLogger::Appender::Syslog < ::SemanticLogger::Subscriber
+ # Create a Syslog appender instance.
+ #
+ # Parameters
+ # url: [String]
+ # Default: 'syslog://localhost'
+ # For writing logs to a remote syslog server
+ # URL of server: protocol://host:port
+ # Uses port 514 by default for TCP and UDP.
+ # local syslog example: 'syslog://localhost'
+ # TCP example with default port: 'tcp://logger'
+ # TCP example with custom port: 'tcp://logger:8514'
+ # UDP example with default port: 'udp://logger'
+ # UDP example with custom port: 'udp://logger:8514'
+ # When using the :syslog protocol, logs will always be sent to the localhost syslog
+ #
+ # host: [String]
+ # Host name to provide to the remote syslog.
+ # Default: SemanticLogger.host
+ #
+ # tcp_client: [Hash]
+ # Default: {}
+ # Only used with the TCP protocol.
+ # Specify custom parameters to pass into Net::TCPClient.new
+ # For a list of options see the net_tcp_client documentation:
+ # https://github.com/reidmorrison/net_tcp_client/blob/master/lib/net/tcp_client/tcp_client.rb
+ #
+ # level: [:trace | :debug | :info | :warn | :error | :fatal]
+ # Override the log level for this appender.
+ # Default: SemanticLogger.default_level
+ #
+ # filter: [Regexp|Proc]
+ # RegExp: Only include log messages where the class name matches the supplied.
+ # regular expression. All other messages will be ignored.
+ # Proc: Only include log messages where the supplied Proc returns true
+ # The Proc must return true or false.
+ #
+ # application: [String]
+ # Identity of the program.
+ # Default: SemanticLogger.application
+ #
+ # max_size: [Integer]
+ # Set your own packet size.
+ # Default: 1024 bytes
+ #
+ # options: [Integer]
+ # Default: ::Syslog::LOG_PID | ::Syslog::LOG_CONS (when logging to a local syslog daemon)
+ # Any of the following (options can be logically OR'd together)
+ # ::Syslog::LOG_CONS
+ # ::Syslog::LOG_NDELAY
+ # ::Syslog::LOG_NOWAIT
+ # ::Syslog::LOG_ODELAY
+ # ::Syslog::LOG_PERROR
+ # ::Syslog::LOG_PID
+ # Note:
+ # - Only applicable when logging to a local syslog instance.
+ # I.e. When `url: 'syslog://localhost'`
+ #
+ # facility: [Integer]
+ # Default: ::Syslog::LOG_USER (the same value as SemanticLogger::Formatters::Syslog::LOG_USER)
+ # Type of program (can be logically OR'd together)
+ # ::Syslog::LOG_AUTH
+ # ::Syslog::LOG_AUTHPRIV
+ # ::Syslog::LOG_CONSOLE
+ # ::Syslog::LOG_CRON
+ # ::Syslog::LOG_DAEMON
+ # ::Syslog::LOG_FTP
+ # ::Syslog::LOG_KERN
+ # ::Syslog::LOG_LRP
+ # ::Syslog::LOG_MAIL
+ # ::Syslog::LOG_NEWS
+ # ::Syslog::LOG_NTP
+ # ::Syslog::LOG_SECURITY
+ # ::Syslog::LOG_SYSLOG
+ # ::Syslog::LOG_USER
+ # ::Syslog::LOG_UUCP
+ # ::Syslog::LOG_LOCAL0
+ # ::Syslog::LOG_LOCAL1
+ # ::Syslog::LOG_LOCAL2
+ # ::Syslog::LOG_LOCAL3
+ # ::Syslog::LOG_LOCAL4
+ # ::Syslog::LOG_LOCAL5
+ # ::Syslog::LOG_LOCAL6
+ # ::Syslog::LOG_LOCAL7
+ #
+ # level_map: [Hash | SemanticLogger::Formatters::Syslog::LevelMap]
+ # Supply a custom map of SemanticLogger levels to syslog levels.
+ #
+ # Example:
+ # # Change the warn level to LOG_NOTICE level instead of a the default of LOG_WARNING.
+ # SemanticLogger.add_appender(appender: :syslog, level_map: {warn: ::Syslog::LOG_NOTICE})
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/syslog.rb:125
+ def initialize(url: T.unsafe(nil), facility: T.unsafe(nil), max_size: T.unsafe(nil), level_map: T.unsafe(nil), options: T.unsafe(nil), tcp_client: T.unsafe(nil), **args, &); end
+
+ # Returns [SemanticLogger::Formatters::Base] default formatter for this Appender
+ # depending on the protocol selected
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/syslog.rb:229
+ def default_formatter; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/syslog.rb:33
+ def facility; end
+
+ # Flush is called by the semantic_logger during shutdown.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/syslog.rb:218
+ def flush; end
+
+ # The url without any credentials. See Subscriber#inspect.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/syslog.rb:248
+ def inspect_details; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/syslog.rb:33
+ def level_map; end
+
+ # Write the log using the specified protocol and server.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/syslog.rb:201
+ def log(log); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/syslog.rb:33
+ def max_size; end
+
+ # Over UDP, a log message too large for a datagram (Errno::EMSGSIZE) cannot be sent by retrying.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/syslog.rb:223
+ def message_error?(exception); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/syslog.rb:33
+ def options; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/syslog.rb:33
+ def port; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/syslog.rb:33
+ def protocol; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/syslog.rb:33
+ def remote_syslog; end
+
+ # After forking an active process call #reopen to re-open
+ # open the handles to resources
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/syslog.rb:183
+ def reopen; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/syslog.rb:33
+ def server; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/syslog.rb:33
+ def url; end
+
+ private
+
+ # Returns the supplied `formatter:` argument, with this appender's facility, level map, and
+ # maximum packet size added when it names one of the PACKET_FORMATTERS, so that they are not
+ # silently ignored. Options in a
+ # `{syslog: {...}}` Hash take precedence. A formatter instance keeps its own settings.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/syslog.rb:258
+ def with_packet_options(formatter); end
+end
+
+# The formatters that build remote syslog packets, and so need this appender's facility, level map,
+# and maximum packet size.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/appender/syslog.rb:244
+SemanticLogger::Appender::Syslog::PACKET_FORMATTERS = T.let(T.unsafe(nil), Array)
+
+# UDP log appender.
+#
+# Write log messages to UDP.
+# By default messages are in JSON format.
+#
+# Example:
+# SemanticLogger.add_appender(
+# appender: :udp,
+# server: 'server:3300',
+# )
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/appender/udp.rb:14
+class SemanticLogger::Appender::Udp < ::SemanticLogger::Subscriber
+ # Create UDP log appender.
+ #
+ # server: [String]
+ # URL of the server to write UDP messages to.
+ #
+ # udp_flags: [Integer]
+ # Should be a bitwise OR of Socket::MSG_* constants.
+ # Default: 0
+ #
+ # Common Appender Parameters:
+ # application: [String]
+ # Name of this application to appear in log messages.
+ # Default: SemanticLogger.application
+ #
+ # host: [String]
+ # Name of this host to appear in log messages.
+ # Default: SemanticLogger.host
+ #
+ # level: [:trace | :debug | :info | :warn | :error | :fatal]
+ # Override the log level for this appender.
+ # Default: SemanticLogger.default_level
+ #
+ # formatter: [Object|Proc]
+ # An instance of a class that implements #call, or a Proc to be used to format
+ # the output from this appender
+ # Default: Use the built-in formatter (See: #call)
+ #
+ # filter: [Regexp|Proc]
+ # RegExp: Only include log messages where the class name matches the supplied.
+ # regular expression. All other messages will be ignored.
+ # Proc: Only include log messages where the supplied Proc returns true
+ # The Proc must return true or false.
+ #
+ # metrics: [Boolean]
+ # Send metrics only events over udp.
+ # Default: true
+ #
+ # Limitations:
+ # * UDP packet size is limited by the connected network and any routers etc
+ # that the message has to traverse. See https://en.wikipedia.org/wiki/Maximum_transmission_unit
+ #
+ # Example:
+ # SemanticLogger.add_appender(
+ # appender: :udp,
+ # server: 'server:3300'
+ # )
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/udp.rb:64
+ def initialize(server:, udp_flags: T.unsafe(nil), metrics: T.unsafe(nil), **args, &); end
+
+ # Close is called during shutdown, or with reopen
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/udp.rb:93
+ def close; end
+
+ # Flush is called by the semantic_logger during shutdown.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/udp.rb:88
+ def flush; end
+
+ # See Subscriber#inspect.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/udp.rb:103
+ def inspect_details; end
+
+ # Write the log using the specified protocol and server.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/udp.rb:82
+ def log(log); end
+
+ # A log message too large for a datagram (Errno::EMSGSIZE) cannot be sent by retrying.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/udp.rb:98
+ def message_error?(exception); end
+
+ # After forking an active process call #reopen to re-open
+ # open the handles to resources
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/udp.rb:74
+ def reopen; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/udp.rb:15
+ def server; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/udp.rb:15
+ def server=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/udp.rb:16
+ def socket; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/udp.rb:15
+ def udp_flags; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/udp.rb:15
+ def udp_flags=(_arg0); end
+
+ private
+
+ # Returns [SemanticLogger::Formatters::Default] formatter default for this Appender
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/udp.rb:110
+ def default_formatter; end
+end
+
+# pkg:gem/semantic_logger#lib/semantic_logger/appender/wrapper.rb:6
+class SemanticLogger::Appender::Wrapper < ::SemanticLogger::Subscriber
+ # Forward all logging calls to the supplied logging instance.
+ #
+ # Parameters
+ # logger: [Object]
+ # Instance of an existing logger conforming to the Ruby Logger methods.
+ #
+ # level: [:trace | :debug | :info | :warn | :error | :fatal]
+ # Override the log level for this appender.
+ # Default: SemanticLogger.default_level
+ #
+ # formatter: [Object|Proc]
+ # An instance of a class that implements #call, or a Proc to be used to format
+ # the output from this appender
+ # Default: Use the built-in formatter (See: #call)
+ #
+ # filter: [Regexp|Proc]
+ # RegExp: Only include log messages where the class name matches the supplied.
+ # regular expression. All other messages will be ignored.
+ # Proc: Only include log messages where the supplied Proc returns true
+ # The Proc must return true or false.
+ #
+ # Ruby Logger
+ # require 'logger'
+ # require 'semantic_logger'
+ #
+ # ruby_logger = Logger.new($stdout)
+ # SemanticLogger.add_appender(logger: ruby_logger)
+ #
+ # logger = SemanticLogger['test']
+ # logger.info('Hello World', some: :payload)
+ #
+ # Install the `rails_semantic_logger` gem to replace the Rails logger with Semantic Logger.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/wrapper.rb:41
+ def initialize(logger:, **args, &); end
+
+ # Close underlying log
+ # Waits for all queued log messages to be written to disk.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/wrapper.rb:72
+ def close; end
+
+ # Flush all pending logs to disk.
+ # Waits for all queued log messages to be written to disk.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/wrapper.rb:66
+ def flush; end
+
+ # Pass log calls to the underlying Rails, log4j or Ruby logger
+ # trace entries are mapped to debug since :trace is not supported by the
+ # Ruby or Rails Loggers
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/wrapper.rb:58
+ def log(log); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appender/wrapper.rb:7
+ def logger; end
+end
+
+# Manage a collection of appenders.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/appenders.rb:3
+class SemanticLogger::Appenders < ::Concurrent::Array
+ # pkg:gem/semantic_logger#lib/semantic_logger/appenders.rb:6
+ def initialize(logger = T.unsafe(nil)); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appenders.rb:12
+ def add(**args, &); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appenders.rb:78
+ def close; end
+
+ # Whether any of the existing appenders already output to the console?
+ # I.e. Writes to stdout or stderr.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appenders.rb:33
+ def console_output?; end
+
+ # The console streams (:stdout and/or :stderr) already being written to by the existing appenders.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appenders.rb:27
+ def console_streams; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appenders.rb:68
+ def flush; end
+
+ # Write the log message to every appender that should log it. An appender that fails is
+ # reported, and the others still write the message.
+ #
+ # A stack overflow is not a failure of the appender but of the thread, which must not overflow
+ # again: on macOS a second stack overflow on the same thread crashes Ruby. It is raised to the
+ # processor running this thread instead, and the message goes to no further appenders.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appenders.rb:58
+ def log(log); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appenders.rb:4
+ def logger; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/appenders.rb:4
+ def logger=(_arg0); end
+
+ # After a fork reopen each appender.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appenders.rb:94
+ def reopen; end
+
+ # Returns [Array] operational statistics for each appender.
+ #
+ # Appenders that run asynchronously (see SemanticLogger::Appender::Async#stats) report
+ # their queue size and processed/dropped/failed counts. Appenders that log inline on the
+ # processor thread report only their name with `async: false`.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/appenders.rb:42
+ def stats; end
+end
+
+# pkg:gem/semantic_logger#lib/semantic_logger/base.rb:8
+class SemanticLogger::Base
+ # Initializer for Abstract Class SemanticLogger::Base
+ #
+ # Parameters
+ # klass [String]
+ # Name of the class, module, or other identifier for which the log messages
+ # are being logged
+ #
+ # level [Symbol]
+ # Only allow log entries of this level or higher to be written to this appender
+ # For example if set to :warn, this appender would only log :warn and :fatal
+ # log messages when other appenders could be logging :info and lower
+ #
+ # filter [Regexp|Proc|Module]
+ # RegExp: Only include log messages where the class name matches the supplied
+ # regular expression. All other messages will be ignored
+ # Proc: Only include log messages where the supplied Proc returns true
+ # The Proc must return true or false
+ # Module: A module that implements `.call`. For example:
+ # module ComplexFilter
+ # def self.call(log)
+ # (/\AExclude/ =~ log.message).nil?
+ # end
+ # end
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:324
+ def initialize(klass, level = T.unsafe(nil), filter = T.unsafe(nil)); end
+
+ # Log a thread backtrace
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:155
+ def backtrace(thread: T.unsafe(nil), level: T.unsafe(nil), message: T.unsafe(nil), payload: T.unsafe(nil), metric: T.unsafe(nil), metric_amount: T.unsafe(nil)); end
+
+ # Backward compatibility
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:152
+ def benchmark(level, message, params = T.unsafe(nil), &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:109
+ def benchmark_debug(message, params = T.unsafe(nil), &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:109
+ def benchmark_error(message, params = T.unsafe(nil), &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:109
+ def benchmark_fatal(message, params = T.unsafe(nil), &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:109
+ def benchmark_info(message, params = T.unsafe(nil), &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:109
+ def benchmark_trace(message, params = T.unsafe(nil), &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:109
+ def benchmark_warn(message, params = T.unsafe(nil), &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:109
+ def debug(message = T.unsafe(nil), payload = T.unsafe(nil), exception = T.unsafe(nil), &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:109
+ def debug?; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:109
+ def error(message = T.unsafe(nil), payload = T.unsafe(nil), exception = T.unsafe(nil), &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:109
+ def error?; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:280
+ def fast_tag(tag, &); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:109
+ def fatal(message = T.unsafe(nil), payload = T.unsafe(nil), exception = T.unsafe(nil), &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:109
+ def fatal?; end
+
+ # Class name to be logged
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:10
+ def filter; end
+
+ # Class name to be logged
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:10
+ def filter=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:109
+ def info(message = T.unsafe(nil), payload = T.unsafe(nil), exception = T.unsafe(nil), &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:109
+ def info?; end
+
+ # Tags permanently bound to this logger instance via `#tagged` (without a block).
+ # Empty for a regular (non-child) logger.
+ # Only assigned to when building a child logger via `#tagged` (see #tagged_child).
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:255
+ def instance_named_tags; end
+
+ # Tags permanently bound to this logger instance via `#tagged` (without a block).
+ # Empty for a regular (non-child) logger.
+ # Only assigned to when building a child logger via `#tagged` (see #tagged_child).
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:255
+ def instance_tags; end
+
+ # Returns the level set by an enclosing `#with_level` block on the current fiber,
+ # otherwise the level set for this instance, otherwise the global default level.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:33
+ def level; end
+
+ # Set the logging level for this logger
+ #
+ # Note: This level is only for this particular instance. It does not override
+ # the log level in any logging instance or the default log level
+ # SemanticLogger.default_level
+ #
+ # Must be one of the values in SemanticLogger::LEVELS, or
+ # nil if this logger instance should use the global default level
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:20
+ def level=(level); end
+
+ # Write log data to underlying data storage
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:285
+ def log(_log_); end
+
+ # Dynamically supply the log level with every measurement call
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:142
+ def measure(level, message, params = T.unsafe(nil), &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:109
+ def measure_debug(message, params = T.unsafe(nil), &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:109
+ def measure_error(message, params = T.unsafe(nil), &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:109
+ def measure_fatal(message, params = T.unsafe(nil), &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:109
+ def measure_info(message, params = T.unsafe(nil), &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:109
+ def measure_trace(message, params = T.unsafe(nil), &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:109
+ def measure_warn(message, params = T.unsafe(nil), &block); end
+
+ # Class name to be logged
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:10
+ def name; end
+
+ # Class name to be logged
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:10
+ def name=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:249
+ def named_tags; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:270
+ def pop_tags(quantity = T.unsafe(nil)); end
+
+ # Returns the list of tags pushed after flattening them out and removing blanks
+ #
+ # Note:
+ # - This method is slow since it needs to flatten the tags and remove empty elements
+ # to support Rails 4.
+ # - For better performance with clean tags, use `SemanticLogger.push_tags`
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:263
+ def push_tags(*tags); end
+
+ # Whether this log entry meets the criteria to be logged by this appender.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:290
+ def should_log?(log); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:275
+ def silence(new_level = T.unsafe(nil), &); end
+
+ # Add the tags or named tags to the list of tags to log for this thread whilst the supplied block is active.
+ #
+ # Returns result of block.
+ #
+ # Tagged example:
+ # SemanticLogger.tagged(12345, 'jack') do
+ # logger.debug('Hello World')
+ # end
+ #
+ # Named Tags (Hash) example:
+ # SemanticLogger.tagged(tracking_number: 12345) do
+ # logger.debug('Hello World')
+ # end
+ #
+ # Notes:
+ # - Named tags are the recommended approach since the tag consists of a name value pair this is more useful
+ # than just a string value in the logs, or centralized logging system.
+ # - This method is slow when using multiple text tags since it needs to flatten the tags and
+ # remove empty elements to support Rails 4.
+ # - It is recommended to keep tags as a list without any empty values, or contain any child arrays.
+ # However, this api will convert:
+ # `logger.tagged([['first', nil], nil, ['more'], 'other'])`
+ # to:
+ # `logger.tagged('first', 'more', 'other')`
+ # - For better performance with clean tags, see `SemanticLogger.tagged`.
+ #
+ # Child logger:
+ # - When called *without* a block, returns a new logger instance that permanently
+ # carries the supplied tags ("instance tags"). Those tags are added to every log
+ # entry emitted by the returned logger, and _only_ that logger, even across threads.
+ # Unlike the block form they are not pushed onto the thread, so other loggers are
+ # unaffected. This is the recommended way to bind a logger to an object's identity:
+ # logger = SemanticLogger['Cart'].tagged(cart_id: cart.id)
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:222
+ def tagged(*tags); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:245
+ def tags; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:109
+ def trace(message = T.unsafe(nil), payload = T.unsafe(nil), exception = T.unsafe(nil), &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:109
+ def trace?; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:109
+ def warn(message = T.unsafe(nil), payload = T.unsafe(nil), exception = T.unsafe(nil), &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:109
+ def warn?; end
+
+ # Change the log level of this instance while the block runs, on the current fiber only.
+ #
+ # Other threads and fibers that share this instance keep logging at its own level.
+ # The level set with `#level=` is left untouched, so an instance that follows the
+ # global default level keeps following it after the block. Blocks can be nested.
+ #
+ # Matches Ruby's `Logger#with_level`, which Sidekiq calls to apply a job's `log_level`.
+ # Accepts the same levels as `#level=`. Returns the result of the block.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:48
+ def with_level(level); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:242
+ def with_tags(*tags); end
+
+ protected
+
+ # Tags permanently bound to this logger instance via `#tagged` (without a block).
+ # Empty for a regular (non-child) logger.
+ # Only assigned to when building a child logger via `#tagged` (see #tagged_child).
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:297
+ def instance_named_tags=(_arg0); end
+
+ # Tags permanently bound to this logger instance via `#tagged` (without a block).
+ # Empty for a regular (non-child) logger.
+ # Only assigned to when building a child logger via `#tagged` (see #tagged_child).
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:297
+ def instance_tags=(_arg0); end
+
+ private
+
+ # Merge the result of a logging block into the log entry.
+ #
+ # Zero-arity blocks (e.g. `logger.info { "msg" }` or a zero-arity lambda) are called without
+ # arguments. Lambdas enforce their arity, so yielding the log to a zero-arity lambda would
+ # raise ArgumentError. Blocks that accept an argument still receive the log so they can read
+ # or mutate it.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:469
+ def apply_block_result(log, &block); end
+
+ # Merge this logger's instance tags into the supplied Log entry.
+ #
+ # Composition (mirrors the per-logger merge rule proposed in PR #301):
+ # - Positional: thread tags first, then this logger's instance tags appended.
+ # - Named: instance named tags merged on top of the thread named tags, so on a
+ # key conflict the logger's own identity wins (it is the more specific value).
+ # Only this logger's entries are affected; the thread context is left untouched.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:396
+ def apply_instance_tags(log); end
+
+ # Level to use when no level has been set for this instance: the global default level.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:356
+ def fallback_level; end
+
+ # Level index to use when no level has been set for this instance. Unlike
+ # `#fallback_level`, it honors `SemanticLogger.silence`.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:362
+ def fallback_level_index; end
+
+ # Whether to log the supplied message based on the current filter if any
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:372
+ def filtered?(log); end
+
+ # Return the level index for fast comparisons, resolved in the same order as `#level`.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:351
+ def level_index; end
+
+ # Log message at the specified level
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:430
+ def log_internal(level, index, message = T.unsafe(nil), payload = T.unsafe(nil), exception = T.unsafe(nil), &block); end
+
+ # Measure the supplied block and log the message
+ #
+ # The options can hold untrusted data, so an option with a value that is not valid for it is
+ # ignored (see Log.argument?) and its default is used instead.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:483
+ def measure_internal(level, index, message, params); end
+
+ # For measuring methods and logging their duration.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:554
+ def measure_method(index:, level:, message:, min_duration:, metric:, log_exception:, on_exception_level:); end
+
+ # Returns the value of the measure option that is also a log argument, or nil when it is not
+ # supplied or its value is not valid for that argument.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:539
+ def measure_option(params, key); end
+
+ # Returns the level to silence other log messages to within a measure block, or nil when none
+ # is supplied or it is not a valid level.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:546
+ def measure_silence_level(params); end
+
+ # Ensure minimum log level is met
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:379
+ def meets_log_level?(log); end
+
+ # Build a new Log entry, layering this logger's instance tags on top of the
+ # current thread context.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:385
+ def new_log(level, index = T.unsafe(nil)); end
+
+ # Returns a copy of this logger that permanently carries the supplied tags.
+ # Positional (string) and named (Hash) tags may be mixed; they are merged on
+ # top of any instance tags this logger already carries.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:409
+ def tagged_child(tags); end
+
+ # Level index set for this instance by an enclosing `#with_level` block on the current fiber.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/base.rb:367
+ def with_level_index; end
+end
+
+# pkg:gem/semantic_logger#lib/semantic_logger/concerns/compatibility.rb:4
+module SemanticLogger::Concerns; end
+
+# pkg:gem/semantic_logger#lib/semantic_logger/concerns/compatibility.rb:6
+module SemanticLogger::Concerns::Compatibility
+ # pkg:gem/semantic_logger#lib/semantic_logger/concerns/compatibility.rb:40
+ def add(severity, message = T.unsafe(nil), progname = T.unsafe(nil), &); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/concerns/compatibility.rb:32
+ def close; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/concerns/compatibility.rb:36
+ def reopen(logdev = T.unsafe(nil)); end
+
+ class << self
+ # For compatibility with Ruby Logger only.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/concerns/compatibility.rb:10
+ def included(base); end
+ end
+end
+
+# pkg:gem/semantic_logger#lib/semantic_logger/core_ext/process.rb:2
+module SemanticLogger::CoreExt; end
+
+# Reopen all appenders in the child process after a fork.
+#
+# Prepended onto `Process.singleton_class` when Semantic Logger is loaded.
+# Enabled by default; opt out with `SemanticLogger.reopen_on_fork = false`.
+#
+# `Process._fork` (Ruby 3.1+) is the single method that every fork path routes
+# through (`Kernel#fork`, `Process.fork`, `IO.popen`, `Kernel#system`, and
+# backticks), so overriding it covers them all with one hook.
+#
+# Note: both `_fork` and `daemon` must be overridden to reliably restart the
+# appender thread, since `Process.daemon` does not route through `_fork`
+# (https://bugs.ruby-lang.org/issues/18911). Do not collapse this down to only
+# `_fork`.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/core_ext/process.rb:16
+module SemanticLogger::CoreExt::Process
+ # `_fork` runs in both the parent and the child. It returns 0 in the child
+ # and the child's pid in the parent, so only reopen in the child. Reopening
+ # in the parent would needlessly recreate its queue and worker thread,
+ # risking the loss of messages still on the queue.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/core_ext/process.rb:21
+ def _fork; end
+
+ # `Process.daemon` does not route through `_fork`, so reopen explicitly. Once
+ # it returns, the caller is running as the daemon (child) process.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/core_ext/process.rb:29
+ def daemon(*, **, &); end
+end
+
+# Custom logger that maps all calls to debug to trace calls
+# This is useful for existing gems / libraries that log too much to debug
+# when most of the debug logging should be at the trace level
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/debug_as_trace_logger.rb:5
+class SemanticLogger::DebugAsTraceLogger < ::SemanticLogger::Logger
+ # pkg:gem/semantic_logger#lib/semantic_logger/debug_as_trace_logger.rb:9
+ def benchmark_debug(message, params = T.unsafe(nil), &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/debug_as_trace_logger.rb:6
+ def debug(message = T.unsafe(nil), payload = T.unsafe(nil), exception = T.unsafe(nil), &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/debug_as_trace_logger.rb:7
+ def debug?; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/debug_as_trace_logger.rb:8
+ def measure_debug(message, params = T.unsafe(nil), &block); end
+end
+
+# Separates the detail that Ruby's Exception#detailed_message adds to an exception's message,
+# such as did_you_mean suggestions or error_highlight's source snippet, from the message itself.
+#
+# Internal: Log caches the result for each of its exceptions; see Log#exception_details.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/exception_details.rb:6
+module SemanticLogger::ExceptionDetails
+ class << self
+ # Returns [String] the detail that #detailed_message adds to the exception's message, without
+ # the class name that Ruby also adds, or nil when there is none or it cannot be separated.
+ #
+ # Never raises, so that an exception's own #detailed_message cannot stop a log entry being
+ # written.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/exception_details.rb:16
+ def extract(exception, source: T.unsafe(nil)); end
+
+ private
+
+ # Whether error_highlight adds a source snippet to this exception's #detailed_message.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/exception_details.rb:45
+ def error_highlighted?(exception); end
+
+ # Returns [String] the exception's #detailed_message, with or without error_highlight's
+ # source snippet, or nil when the snippet cannot be left out.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/exception_details.rb:32
+ def full_detailed_message(exception, source); end
+ end
+end
+
+# Ruby's own Exception#detailed_message: the message, decorated with the class name.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/exception_details.rb:8
+SemanticLogger::ExceptionDetails::DETAILED_MESSAGE = T.let(T.unsafe(nil), UnboundMethod)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters.rb:2
+module SemanticLogger::Formatters
+ class << self
+ # Return formatter that responds to call.
+ #
+ # Supports formatter supplied as:
+ # - Symbol
+ # - Hash ( Symbol => { options })
+ # - Instance of any of SemanticLogger::Formatters
+ # - Proc
+ # - Any object that responds to :call
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters.rb:28
+ def factory(formatter); end
+ end
+end
+
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:4
+class SemanticLogger::Formatters::Base
+ # Parameters
+ # time_format: [String|Symbol|nil]
+ # See Time#strftime for the format of this string.
+ # :iso_8601 Outputs an ISO8601 Formatted timestamp.
+ # :ms Output in miliseconds since epoch.
+ # :notime Returns an empty string for time ( no time is output ).
+ # Default: '%Y-%m-%d %H:%M:%S.%N'
+ # log_host: [Boolean]
+ # Whether or not to include hostname in logs
+ # Default: true
+ # log_application: [Boolean]
+ # Whether or not to include application name in logs
+ # Default: true
+ # precision: [Integer]
+ # How many fractional digits to log times with.
+ # Default: PRECISION (6, except on older JRuby, where 3)
+ # escape_control_chars: [Boolean]
+ # Replace control characters (newlines, the ANSI escape, etc.) in
+ # untrusted log data (logger name, thread name, message, payload, tags,
+ # named tags, and the message and backtrace lines of the exception and
+ # of each exception that caused it) with a printable escaped form, e.g. "\n".
+ # This prevents log forging and terminal escape-sequence injection
+ # when logging data that may contain attacker-controlled content.
+ # Note: Has no effect on structured formatters such as :json, which
+ # already escape control characters via JSON encoding.
+ # Default: false (preserve newlines and ANSI colors in text output)
+ # log_exception_details: [true|false|:with_source]
+ # Whether to log the detail that Ruby's Exception#detailed_message adds to an
+ # exception's message, such as did_you_mean suggestions ("Did you mean? upcase") or
+ # the detail an exception class supplies by overriding #detailed_message.
+ # :with_source also logs error_highlight's snippet of the failing source line. It is
+ # about 100 times slower, since it re-parses that source file, and it copies source
+ # code into the log.
+ # On Ruby 3.2 a NameError or NoMethodError builds its message from receiver.inspect each
+ # time it is asked, and logging the details asks for it twice more, so turn this off when
+ # inspecting the receivers of logged exceptions is slow.
+ # Default: true for the Default, Color, and Pattern text formatters, false otherwise.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:72
+ def initialize(time_format: T.unsafe(nil), log_host: T.unsafe(nil), log_application: T.unsafe(nil), log_environment: T.unsafe(nil), precision: T.unsafe(nil), escape_control_chars: T.unsafe(nil), log_exception_details: T.unsafe(nil)); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:5
+ def escape_control_chars; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:5
+ def escape_control_chars=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:5
+ def log; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:5
+ def log=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:5
+ def log_application; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:5
+ def log_application=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:5
+ def log_environment; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:5
+ def log_environment=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:5
+ def log_exception_details; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:5
+ def log_exception_details=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:5
+ def log_host; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:5
+ def log_host=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:5
+ def logger; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:5
+ def logger=(_arg0); end
+
+ # Process ID
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:104
+ def pid; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:5
+ def precision; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:5
+ def precision=(_arg0); end
+
+ # Date & time
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:99
+ def time; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:5
+ def time_format; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:5
+ def time_format=(_arg0); end
+
+ private
+
+ # Whether this formatter logs exception details unless told otherwise. See #initialize.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:131
+ def default_log_exception_details; end
+
+ # When `escape_control_chars` is enabled, return a copy of the supplied
+ # value with any control characters replaced by a printable escaped form
+ # so that untrusted log data cannot forge log entries or inject terminal
+ # escape sequences. Otherwise the value is returned unchanged.
+ #
+ # Note: This escapes (preserves) control characters, and is opt-in. It is
+ # distinct from Log#cleansed_message, which unconditionally *strips* ANSI
+ # colorization from the message for structured (JSON/Loki) output.
+ #
+ # A string with invalid byte sequences, for example an exception message that quotes
+ # untrusted binary input, or in another encoding, is first converted to valid UTF-8
+ # (dropping the invalid bytes), since matching against it would raise and the log entry
+ # would be lost.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:123
+ def escape_control_characters(value); end
+
+ # Returns [String] the backtrace of the logged exception, followed by each exception
+ # that caused it, as laid out by Log#backtrace_to_s.
+ #
+ # When `escape_control_chars` is enabled, the message of each cause and each backtrace
+ # line is passed through #escape_control_characters, the same as the message of the
+ # logged exception: causes are often parser or validation errors that quote untrusted
+ # input, and a backtrace can be set from untrusted data.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:150
+ def exception_backtrace; end
+
+ # Returns [String] the detail Ruby adds to the message of the supplied exception (see
+ # Log#exception_details), or nil when there is none or this formatter does not log it.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:137
+ def exception_details_for(exception); end
+
+ # Return the Time as a formatted string
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:157
+ def format_time(time); end
+
+ class << self
+ # Return default time format string
+ #
+ # Parameters
+ # precision: [Integer]
+ # How many fractional digits to log times with.
+ # Default: PRECISION (6, except on older JRuby, where 3)
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:94
+ def build_time_format(precision = T.unsafe(nil)); end
+ end
+end
+
+# Matches C0 control characters (including newlines and the ANSI escape) and DEL.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:19
+SemanticLogger::Formatters::Base::CONTROL_CHARS = T.let(T.unsafe(nil), Regexp)
+
+# Printable escapes for the most common control characters. Any other
+# control character is escaped to its hexadecimal `\xHH` form by
+# #escape_control_characters.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:11
+SemanticLogger::Formatters::Base::CONTROL_CHAR_ESCAPES = T.let(T.unsafe(nil), Hash)
+
+# Time precision varies by Ruby interpreter
+# JRuby 9.1.8.0 supports microseconds
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/base.rb:23
+SemanticLogger::Formatters::Base::PRECISION = T.let(T.unsafe(nil), Integer)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:14
+class SemanticLogger::Formatters::Color < ::SemanticLogger::Formatters::Default
+ # Adds color to the default log formatter
+ #
+ # Example:
+ # # Use a colorized output logger.
+ # SemanticLogger.add_appender(io: $stdout, formatter: :color)
+ #
+ # Example:
+ # # Use a colorized output logger changing the color for info to yellow.
+ # SemanticLogger.add_appender(io: $stdout, formatter: {color: {color_map: {info: SemanticLogger::AnsiColors::YELLOW}}})
+ #
+ # Example:
+ # # Override the Awesome Print options to output hashes over multiple lines:
+ # SemanticLogger.add_appender(io: $stdout, formatter: {color: {ap: {multiline: true}}})
+ #
+ # # Calling the appender added above:
+ # SemanticLogger['Test'].info('hi', {a: 1, b: 2})
+ # => true
+ # => 2019-02-12 11:47:50.794339 I [35832:70112015269920] Test -- hi -- {
+ # :a => 1,
+ # :b => 2
+ # }
+ #
+ # Parameters:
+ # ap: [Hash]
+ # Any valid Amazing Print option for rendering data.
+ # These options can also be changed be creating a `~/.aprc` file.
+ # See: https://github.com/amazing-print/amazing_print
+ #
+ # Note: The option :multiline is set to false if not supplied.
+ # Note: Has no effect if Awesome Print is not installed.
+ # Note: With `escape_control_chars: true` the payload is always rendered plain
+ # (without colors) and on a single line, then escaped.
+ #
+ # color_map: [Hash | SemanticLogger::Formatters::Color::ColorMap]
+ # ColorMaps each of the log levels to a color
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:79
+ def initialize(ap: T.unsafe(nil), color_map: T.unsafe(nil), **args); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:139
+ def call(log, logger); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:15
+ def color; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:15
+ def color=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:15
+ def color_map; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:15
+ def color_map=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:108
+ def duration; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:130
+ def exception; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:85
+ def level; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:112
+ def name; end
+
+ # Named Tags
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:97
+ def named_tags; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:116
+ def payload; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:89
+ def tags; end
+
+ private
+
+ # Returns [Hash] the Amazing Print options to render the payload with.
+ #
+ # When `escape_control_chars` is enabled the payload is rendered plain, on one line:
+ # the colors and line breaks Amazing Print adds cannot be told apart from control
+ # characters in the data (for example an object whose #inspect returns them), and
+ # escaping them all leaves no colors or line breaks to keep.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:152
+ def ai_options; end
+end
+
+# Supply a custom color map for every log level
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:18
+class SemanticLogger::Formatters::Color::ColorMap
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:21
+ def initialize(trace: T.unsafe(nil), debug: T.unsafe(nil), info: T.unsafe(nil), warn: T.unsafe(nil), error: T.unsafe(nil), fatal: T.unsafe(nil), bold: T.unsafe(nil), clear: T.unsafe(nil)); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:39
+ def [](level); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:19
+ def bold; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:19
+ def bold=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:19
+ def clear; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:19
+ def clear=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:19
+ def debug; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:19
+ def debug=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:19
+ def error; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:19
+ def error=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:19
+ def fatal; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:19
+ def fatal=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:19
+ def info; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:19
+ def info=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:19
+ def trace; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:19
+ def trace=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:19
+ def warn; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/color.rb:19
+ def warn=(_arg0); end
+end
+
+# Default non-colored text log output
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/default.rb:4
+class SemanticLogger::Formatters::Default < ::SemanticLogger::Formatters::Base
+ # Default text log format
+ # Generates logs of the form:
+ # 2011-07-19 14:36:15.660235 D [1149:ScriptThreadProcess] Rails -- Hello World
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/default.rb:96
+ def call(log, logger); end
+
+ # Duration
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/default.rb:56
+ def duration; end
+
+ # Exception
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/default.rb:79
+ def exception; end
+
+ # The detail Ruby adds to the exception's message, such as did_you_mean suggestions.
+ # See Base#initialize for the `log_exception_details` option.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/default.rb:89
+ def exception_details; end
+
+ # Ruby file name and line number that logged the message.
+ #
+ # The file name is escaped like the other fields, since it comes from the first line of the
+ # backtrace, which a log call can supply from untrusted data.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/default.rb:22
+ def file_name_and_line; end
+
+ # Log level
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/default.rb:9
+ def level; end
+
+ # Log message
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/default.rb:66
+ def message; end
+
+ # Class / app name
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/default.rb:61
+ def name; end
+
+ # Named Tags
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/default.rb:44
+ def named_tags; end
+
+ # Payload
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/default.rb:71
+ def payload; end
+
+ # Returns [String] the available process info
+ # Example:
+ # [18934:thread_name test_logging.rb:51]
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/default.rb:30
+ def process_info; end
+
+ # Tags
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/default.rb:37
+ def tags; end
+
+ # Name of the thread that logged the message.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/default.rb:14
+ def thread_name; end
+
+ private
+
+ # Text output is read by people, who benefit most from exception details.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/default.rb:106
+ def default_log_exception_details; end
+end
+
+# Formatter conforming to the Elastic Common Schema (ECS).
+#
+# Emits log events using the nested field names defined by ECS so that they
+# integrate cleanly with Filebeat and the Elastic stack (Elasticsearch,
+# Kibana) without requiring an ingest pipeline to rename fields.
+#
+# Usage:
+# SemanticLogger.add_appender(io: $stdout, formatter: :ecs)
+#
+# # Route the payload, metric, and other SemanticLogger-specific data into
+# # a custom top-level namespace (default "semantic_logger"):
+# SemanticLogger.add_appender(io: $stdout, formatter: {ecs: {namespace: "my_app"}})
+#
+# # Or merge the payload directly into ECS `labels` instead of a namespace:
+# SemanticLogger.add_appender(io: $stdout, formatter: {ecs: {namespace: nil}})
+#
+# == Field mapping (SemanticLogger -> ECS 8.x)
+# time -> @timestamp (ISO-8601)
+# level -> log.level
+# name -> log.logger
+# file_name / line -> log.origin.file.name / log.origin.file.line
+# message -> message
+# thread_name -> process.thread.name
+# pid -> process.pid
+# host -> host.hostname
+# application -> service.name
+# environment -> service.environment
+# exception -> error.type / error.message / error.stack_trace
+# duration -> event.duration (nanoseconds, as required by ECS)
+# tags -> tags (ECS top-level array)
+# named_tags -> labels.* (scalar key/value pairs)
+# payload -> .* (or labels.* when namespace is nil)
+# metric/metric_amount -> .metric / .metric_amount
+#
+# == Reference
+# * https://www.elastic.co/docs/reference/ecs
+# * https://www.elastic.co/docs/reference/ecs/ecs-custom-fields-in-ecs
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/ecs.rb:41
+class SemanticLogger::Formatters::Ecs < ::SemanticLogger::Formatters::Raw
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/ecs.rb:53
+ def initialize(namespace: T.unsafe(nil), time_format: T.unsafe(nil), time_key: T.unsafe(nil), **args); end
+
+ # Returns a batch of log events as a single JSON array.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/ecs.rb:66
+ def batch(logs, logger); end
+
+ # Returns the log event as a single line of ECS-formatted JSON, so it can
+ # be written to stdout / a file and shipped by Filebeat or Elastic Agent.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/ecs.rb:61
+ def call(log, logger); end
+
+ # namespace: [String|Symbol|nil]
+ # Top-level field set used to hold SemanticLogger-specific data that has
+ # no native ECS home (payload, metric, metric_amount). A proper-noun
+ # namespace is guaranteed never to collide with a current or future ECS
+ # field. Set to nil to merge the payload into ECS `labels` instead.
+ # Default: "semantic_logger"
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/ecs.rb:51
+ def namespace; end
+
+ private
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/ecs.rb:123
+ def add_error(result, hash); end
+
+ # ECS event.duration is measured in nanoseconds.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/ecs.rb:117
+ def add_event(result, hash); end
+
+ # Place SemanticLogger-specific data (payload, metric) that has no native
+ # ECS home into the configured namespace, plus named_tags into labels.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/ecs.rb:135
+ def add_extras(result, hash); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/ecs.rb:110
+ def add_origin(result, hash); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/ecs.rb:103
+ def add_service(result, hash); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/ecs.rb:86
+ def base(hash); end
+
+ # Remap the flat hash built by Raw#call into the nested ECS field layout.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/ecs.rb:73
+ def ecs_hash(hash); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/ecs.rb:97
+ def process(hash); end
+end
+
+# ECS version this formatter targets.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/ecs.rb:43
+SemanticLogger::Formatters::Ecs::ECS_VERSION = T.let(T.unsafe(nil), String)
+
+# Fluentd is similar to SemanticLogger::Formatters::Json but with log levels that are recognized
+# by kubernetes fluentd.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/fluentd.rb:7
+class SemanticLogger::Formatters::Fluentd < ::SemanticLogger::Formatters::Json
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/fluentd.rb:10
+ def initialize(time_format: T.unsafe(nil), time_key: T.unsafe(nil), need_process_info: T.unsafe(nil), log_host: T.unsafe(nil), **args); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/fluentd.rb:32
+ def file_name_and_line; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/fluentd.rb:15
+ def level; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/fluentd.rb:8
+ def need_process_info; end
+
+ # Ignore process fields: pid, thread, file and line by default.
+ # These are rarely useful under Fluentd (e.g. containerized processes
+ # usually have pid 1), so they are only included when explicitly requested
+ # via `need_process_info: true`.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/fluentd.rb:24
+ def pid; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/fluentd.rb:28
+ def thread_name; end
+end
+
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/json.rb:4
+class SemanticLogger::Formatters::Json < ::SemanticLogger::Formatters::Raw
+ # Default JSON time format is ISO8601
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/json.rb:6
+ def initialize(time_format: T.unsafe(nil), time_key: T.unsafe(nil), **args); end
+
+ # Returns a batch of log messages as a single JSON array.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/json.rb:16
+ def batch(logs, logger); end
+
+ # Returns log messages in JSON format
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/json.rb:11
+ def call(log, logger); end
+end
+
+# Produces logfmt formatted messages
+#
+# The following fields are extracted from the raw log and included in the formatted message:
+# :timestamp, :level, :name, :message, :duration, :tags, :named_tags
+#
+# E.g.
+# timestamp="2020-07-20T08:32:05.375276Z" level=info name="DefaultTest" base="breakfast"
+# spaces="second breakfast" double_quotes="\"elevensies\"" single_quotes="'lunch'" tag="success"
+#
+# All timestamps are ISO8601 formatteed
+# All user supplied values are escaped and surrounded by double quotes to avoid ambiguious message delimeters
+# `tags` are treated as keys with boolean values.
+# In every key (tags, named tags, payload), spaces, control and format characters, `=`, and `"`
+# are replaced with `_`, so that untrusted data cannot inject fields or lines, or disguise a key.
+# `tags`, `named_tags`, and `payload` are flattened into the top level fields. A key named like
+# one of the entry's own fields (the time key, `level`, `name`, `message`, `duration`,
+# `duration_ms`, `tag`) or an exception field is prefixed with its source, as in `payload.level`,
+# so that logged data cannot replace those fields. So is a key that starts with `tags.`,
+# `named_tags.`, or `payload.`, so that it cannot forge another source's field. Other keys that
+# are the same once encoded, such as `:user` and `"user"`, or `"a b"` and `"a=b"`, are written
+# once, with the value from the later source: `payload` values take precedence over
+# `named_tags`, and `named_tags` over `tags`.
+# An exception is emitted as `exception_name`, `exception_message`, `stack_trace`, and `cause`,
+# and with `log_exception_details` also `exception_details`.
+#
+# Futher Reading https://brandur.org/logfmt
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/logfmt.rb:31
+class SemanticLogger::Formatters::Logfmt < ::SemanticLogger::Formatters::Raw
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/logfmt.rb:70
+ def initialize(time_format: T.unsafe(nil), time_key: T.unsafe(nil), **args); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/logfmt.rb:81
+ def call(log, logger); end
+
+ # Also writes and reserves the new time key in place of the old one.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/logfmt.rb:76
+ def time_key=(time_key); end
+
+ private
+
+ # Adds a field from logged data, under the name returned by #field_name.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/logfmt.rb:128
+ def add_field(prefix, key, value); end
+
+ # Returns [String] the logfmt name of a key from logged data: the key encoded by #logfmt_key,
+ # prefixed with its source, as in "payload.level", when it names one of the entry's own fields
+ # or starts with a source's prefix, so that untrusted data cannot replace or forge that field,
+ # or a field from another source.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/logfmt.rb:137
+ def field_name(prefix, key); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/logfmt.rb:153
+ def flatten_log; end
+
+ # Integers, true, false, and nil have a single JSON form, so they skip the cost of `to_json`.
+ # Strings, the most common values, are checked first.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/logfmt.rb:164
+ def format_value(value); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/logfmt.rb:120
+ def handle_exception; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/logfmt.rb:107
+ def handle_payload; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/logfmt.rb:102
+ def handle_tags; end
+
+ # Returns [String] the key as valid UTF-8, with every character that would break the logfmt
+ # structure replaced by an underscore. Keys come from tags, named tags, and payloads, which
+ # can hold untrusted data; unescaped, they could inject fields or forge an entire line.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/logfmt.rb:199
+ def logfmt_key(key); end
+
+ # Names the entry's own fields from the time key, and reserves those names and the
+ # exception's, so that logged data cannot use them.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/logfmt.rb:182
+ def name_entry_fields; end
+
+ # Whether the name is already a valid logfmt key, made of ASCII characters that are all safe.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/logfmt.rb:192
+ def plain_name?(name); end
+
+ # @parsed maps the logfmt name of each field to its value. Logged data is added after the
+ # entry's own fields, and a field with the same name as an earlier one replaces its value, so
+ # the payload takes precedence over named tags, and named tags over tags.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/logfmt.rb:92
+ def raw_to_logfmt; end
+
+ # Remembers the name of a Symbol key that is not reserved, while there is room. The cache is
+ # replaced rather than updated, since a formatter can be shared by several threads.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/logfmt.rb:148
+ def remember_symbol(symbol, name); end
+end
+
+# The entry's own fields in the Raw hash, written in this order after the time key.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/logfmt.rb:33
+SemanticLogger::Formatters::Logfmt::ENTRY_FIELDS = T.let(T.unsafe(nil), Array)
+
+# The exception's fields in the Raw hash, mapped to their logfmt names, so that the exception's
+# name and message do not replace the entry's own.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/logfmt.rb:40
+SemanticLogger::Formatters::Logfmt::EXCEPTION_FIELDS = T.let(T.unsafe(nil), Hash)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/logfmt.rb:51
+SemanticLogger::Formatters::Logfmt::NAMED_TAGS_PREFIX = T.let(T.unsafe(nil), String)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/logfmt.rb:52
+SemanticLogger::Formatters::Logfmt::PAYLOAD_PREFIX = T.let(T.unsafe(nil), String)
+
+# The most Symbol keys to remember the names of, so that untrusted keys cannot grow the cache
+# without bound.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/logfmt.rb:68
+SemanticLogger::Formatters::Logfmt::PLAIN_SYMBOL_CACHE_SIZE = T.let(T.unsafe(nil), Integer)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/logfmt.rb:53
+SemanticLogger::Formatters::Logfmt::SOURCE_PREFIXES = T.let(T.unsafe(nil), Array)
+
+# Prefixes that mark a key from logged data with its source, when the key alone would name
+# one of the entry's own fields, or look like a key marked this way.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/logfmt.rb:50
+SemanticLogger::Formatters::Logfmt::TAGS_PREFIX = T.let(T.unsafe(nil), String)
+
+# The field that tells an entry with an exception from one without.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/logfmt.rb:36
+SemanticLogger::Formatters::Logfmt::TAG_FIELD = T.let(T.unsafe(nil), String)
+
+# The ASCII subset of UNSAFE_KEY_CHARS, which is much faster to match against the ASCII keys
+# that make up nearly every log event.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/logfmt.rb:64
+SemanticLogger::Formatters::Logfmt::UNSAFE_ASCII_KEY_CHARS = T.let(T.unsafe(nil), Regexp)
+
+# Characters that cannot appear in a logfmt key: spaces and control characters (including
+# NEL), which would end the key or the line, the `=` and `"` delimiters, LINE SEPARATOR and
+# PARAGRAPH SEPARATOR, which some readers treat as newlines, and the invisible format
+# characters, such as ZERO WIDTH SPACE and RIGHT-TO-LEFT OVERRIDE, which would let a key pass
+# for another one, such as "level" followed by a ZERO WIDTH SPACE for "level".
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/logfmt.rb:60
+SemanticLogger::Formatters::Logfmt::UNSAFE_KEY_CHARS = T.let(T.unsafe(nil), Regexp)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:5
+class SemanticLogger::Formatters::Loki < ::SemanticLogger::Formatters::Base
+ # Returns [String] a JSON batch of logs
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:17
+ def batch(logs, logger); end
+
+ # Returns [String] a single JSON log
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:9
+ def call(log, logger); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:6
+ def payload_value; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:6
+ def payload_value=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:6
+ def stream; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:6
+ def stream=(_arg0); end
+
+ private
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:56
+ def application; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:30
+ def build_stream; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:80
+ def context; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:119
+ def duration; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:60
+ def environment; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:126
+ def exception; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:96
+ def format_time(log); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:52
+ def host; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:64
+ def level; end
+
+ # Returns [String] the value as Loki accepts it.
+ #
+ # A structure is written once, as JSON, depth-limited and repaired by Utils.to_json.
+ # Encoding each nested level into a String that the next level encodes again doubled the
+ # escaping at every level, so a request parameter 30 levels deep produced gigabytes. A
+ # structure's #to_s is its #inspect, which would also expose the instance variables of any
+ # object it holds.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:150
+ def loki_value(value); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:92
+ def message; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:112
+ def metric; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:76
+ def named_tags; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:100
+ def payload; end
+
+ # Loki only accepts Strings as keys and values.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:137
+ def stringify_hash(hash); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:72
+ def tags; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:68
+ def thread; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/loki.rb:88
+ def time; end
+end
+
+# Only output one line for each log entry.
+#
+# Notes:
+# * New lines and carriage returns are stripped from every text field: the name, thread name,
+# file name, tags, named tags, message, payload and exception message.
+# With `escape_control_chars: true` they, and all other control characters, are escaped
+# instead, like the other text formatters.
+# * Exceptions only include the class and message, the stack trace is not shown.
+# * Exception details, when enabled, are joined onto the same line.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/one_line.rb:12
+class SemanticLogger::Formatters::OneLine < ::SemanticLogger::Formatters::Default
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/one_line.rb:50
+ def exception; end
+
+ # The exception details, with each line trimmed and joined by a space.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/one_line.rb:58
+ def exception_details; end
+
+ # A log call can supply the backtrace that the file name comes from.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/one_line.rb:36
+ def file_name_and_line; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/one_line.rb:41
+ def message; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/one_line.rb:31
+ def name; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/one_line.rb:23
+ def named_tags; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/one_line.rb:45
+ def payload; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/one_line.rb:17
+ def tags; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/one_line.rb:13
+ def thread_name; end
+
+ private
+
+ # Off by default, so that existing one line output does not change.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/one_line.rb:68
+ def default_log_exception_details; end
+
+ # Returns [String] the value without line breaks, so that the entry stays on one line.
+ #
+ # A String with invalid bytes, such as a request parameter decoded from "%FF", or in another
+ # encoding, such as a binary request body, is converted to valid UTF-8 first, since deleting
+ # from it, or joining it with UTF-8 text, would raise and lose the entry.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/one_line.rb:77
+ def one_line(value); end
+end
+
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/open_telemetry.rb:4
+class SemanticLogger::Formatters::OpenTelemetry < ::SemanticLogger::Formatters::Raw
+ # Returns the attributes hash submitted to the OpenTelemetry SDK.
+ #
+ # Unlike the JSON formatters there is no single `.to_json` boundary here:
+ # the hash is handed to the OTLP exporter, which requires valid UTF-8. Cleanse
+ # the whole structure so binary / non UTF-8 strings cannot break the export.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/open_telemetry.rb:13
+ def call(log, logger); end
+
+ # Log level
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/open_telemetry.rb:18
+ def level; end
+
+ # Payload is submitted directly as attributes, which must be a Hash. A log call can supply
+ # any value as the payload, such as a String parsed from a request body, so any other value
+ # is submitted as a single "payload" attribute.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/open_telemetry.rb:26
+ def payload; end
+
+ private
+
+ # A primitive as-is, and anything else as a String: a structure (such as a Hash, Struct, or
+ # Set) as JSON, depth-limited and repaired by Utils.to_json, rather than its #to_s, which is
+ # its #inspect and would expose the instance variables of any object it holds.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/open_telemetry.rb:42
+ def coerce_element(v); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/open_telemetry.rb:49
+ def coerce_map(h); end
+
+ # An attribute value: a primitive, or an Array of them.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/open_telemetry.rb:35
+ def coerce_value(v); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/open_telemetry.rb:57
+ def severity_number(severity); end
+end
+
+# primitives allowed by OTLP logs in Ruby: String, Integer, Float, TrueClass, FalseClass
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/open_telemetry.rb:6
+SemanticLogger::Formatters::OpenTelemetry::PRIMS = T.let(T.unsafe(nil), Array)
+
+# Formats log messages using a configurable pattern string, so a custom
+# log line layout can be specified directly in the configuration without
+# having to write a new formatter class.
+#
+# Pattern placeholders use the form `%{directive}`, where `directive` is the
+# name of any of the formatting methods (inherited from Default, or defined
+# below). Named tags support a parameterized form: `%{named_tags:request_id}`
+# returns the value of a single named tag. Use `%%{...}` to emit a literal
+# `%{...}` without interpolation.
+#
+# Example:
+# SemanticLogger.add_appender(
+# io: $stdout,
+# formatter: {
+# pattern: { pattern: "%{time} %{level} %{name} -- %{message}" }
+# }
+# )
+#
+# Available directives:
+# time Formatted timestamp. Optionally accepts a strftime
+# format, e.g. time:%Y-%m-%dT%H:%M:%S.%6N.
+# level Full level name, e.g. "debug".
+# level_short Single character level, e.g. "D".
+# name Logger / class name.
+# message Log message.
+# payload Payload rendered as a string.
+# exception_class Class of the logged exception, e.g. "RuntimeError".
+# exception_message Message of the logged exception.
+# exception_details Detail Ruby adds to the exception's message, such as
+# did_you_mean suggestions (see the log_exception_details option).
+# backtrace Backtrace of the logged exception.
+# duration Human readable duration, e.g. "1.2ms".
+# duration_ms Duration in milliseconds (numeric).
+# thread_name Name of the thread that logged the message.
+# pid Process id.
+# file_name Ruby file name that logged the message, e.g. "app.rb".
+# line Line number within the Ruby file, e.g. 42.
+# tags Tags, comma separated.
+# named_tags All named tags, or one tag with named_tags:key.
+# host Host name.
+# application Application name.
+# environment Environment name.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/pattern.rb:47
+class SemanticLogger::Formatters::Pattern < ::SemanticLogger::Formatters::Default
+ # Parameters:
+ # pattern: [String]
+ # The pattern string used to format every log entry.
+ # Default: DEFAULT_PATTERN
+ #
+ # Plus all the options supported by SemanticLogger::Formatters::Base.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/pattern.rb:89
+ def initialize(pattern: T.unsafe(nil), **args); end
+
+ # Application name.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/pattern.rb:191
+ def application; end
+
+ # Backtrace of the logged exception.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/pattern.rb:138
+ def backtrace; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/pattern.rb:200
+ def call(log, logger); end
+
+ # Human readable duration (without the Default formatter's surrounding parentheses).
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/pattern.rb:143
+ def duration; end
+
+ # Duration in milliseconds.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/pattern.rb:148
+ def duration_ms; end
+
+ # Environment name.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/pattern.rb:196
+ def environment; end
+
+ # Class of the logged exception, e.g. "RuntimeError".
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/pattern.rb:128
+ def exception_class; end
+
+ # Message of the logged exception.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/pattern.rb:133
+ def exception_message; end
+
+ # Name of the Ruby file that logged the message, e.g. "app.rb". Escaped like the other
+ # fields, since a log call can supply the backtrace it comes from.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/pattern.rb:154
+ def file_name; end
+
+ # Host name.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/pattern.rb:186
+ def host; end
+
+ # Full level name, e.g. "debug" (Default formatter uses the short "D").
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/pattern.rb:108
+ def level; end
+
+ # Single character level, e.g. "D".
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/pattern.rb:113
+ def level_short; end
+
+ # Line number within the Ruby file that logged the message.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/pattern.rb:159
+ def line; end
+
+ # Log message (without the "-- " prefix the Default formatter adds).
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/pattern.rb:118
+ def message; end
+
+ # With a key: the value of a single named tag, e.g. %{named_tags:request_id}.
+ # Without a key: all named tags rendered as "key: value, ...".
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/pattern.rb:172
+ def named_tags(key = T.unsafe(nil)); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/pattern.rb:48
+ def pattern; end
+
+ # Raw payload rendered as a string.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/pattern.rb:123
+ def payload; end
+
+ # Tags joined by a comma (without the Default formatter's surrounding brackets).
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/pattern.rb:164
+ def tags; end
+
+ # Formatted timestamp. With a strftime format argument, e.g.
+ # %{time:%Y-%m-%dT%H:%M:%S.%6N}, the time is formatted with that string.
+ # Without an argument it uses the formatter's configured time_format.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/pattern.rb:101
+ def time(format = T.unsafe(nil)); end
+
+ private
+
+ # Parse the pattern string into an array of tokens: frozen literal strings
+ # and Token structs for each %{directive} placeholder. %%{...} is an escape
+ # that produces a literal %{...}.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/pattern.rb:214
+ def compile(string); end
+end
+
+# Approximates the Default formatter's output.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/pattern.rb:51
+SemanticLogger::Formatters::Pattern::DEFAULT_PATTERN = T.let(T.unsafe(nil), String)
+
+# The directives that may appear in a pattern. The value is whether the
+# directive accepts a parameter, e.g. %{named_tags:request_id}.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/pattern.rb:55
+SemanticLogger::Formatters::Pattern::DIRECTIVES = T.let(T.unsafe(nil), Hash)
+
+# A single interpolated directive within a compiled pattern.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/pattern.rb:80
+class SemanticLogger::Formatters::Pattern::Token < ::Struct
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/pattern.rb:80
+ def arguments; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/pattern.rb:80
+ def arguments=(_); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/pattern.rb:80
+ def method_name; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/pattern.rb:80
+ def method_name=(_); end
+
+ class << self
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/pattern.rb:80
+ def [](*_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/pattern.rb:80
+ def inspect; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/pattern.rb:80
+ def keyword_init?; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/pattern.rb:80
+ def members; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/pattern.rb:80
+ def new(*_arg0); end
+ end
+end
+
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:4
+class SemanticLogger::Formatters::Raw < ::SemanticLogger::Formatters::Base
+ # By default Raw formatter does not reformat the time
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:9
+ def initialize(time_format: T.unsafe(nil), time_key: T.unsafe(nil), **args); end
+
+ # Application name
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:20
+ def application; end
+
+ # Returns log messages in Hash format
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:114
+ def call(log, logger); end
+
+ # Duration
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:70
+ def duration; end
+
+ # Environment
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:25
+ def environment; end
+
+ # Exception
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:93
+ def exception; end
+
+ # Ruby file name and line number that logged the message.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:51
+ def file_name_and_line; end
+
+ # Fields are added by populating this hash.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:6
+ def hash; end
+
+ # Fields are added by populating this hash.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:6
+ def hash=(_arg0); end
+
+ # Host name
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:15
+ def host; end
+
+ # Log level
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:35
+ def level; end
+
+ # Log message
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:83
+ def message; end
+
+ # Metric
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:108
+ def metric; end
+
+ # Class / app name
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:78
+ def name; end
+
+ # Named Tags
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:65
+ def named_tags; end
+
+ # Payload
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:88
+ def payload; end
+
+ # Process ID
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:41
+ def pid; end
+
+ # Tags
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:60
+ def tags; end
+
+ # Name of the thread that logged the message.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:46
+ def thread_name; end
+
+ # Date & time
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:30
+ def time; end
+
+ # Fields are added by populating this hash.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:6
+ def time_key; end
+
+ # Fields are added by populating this hash.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/raw.rb:6
+ def time_key=(_arg0); end
+end
+
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:4
+class SemanticLogger::Formatters::Signalfx < ::SemanticLogger::Formatters::Base
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:7
+ def initialize(token:, dimensions: T.unsafe(nil), gauge_name: T.unsafe(nil), counter_name: T.unsafe(nil), time_format: T.unsafe(nil), **args); end
+
+ # Returns [Hash] a batch of log messages.
+ # Signalfx has a minimum resolution of 1 second.
+ # Metrics of the same type, time (second), and dimensions can be aggregated together.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:110
+ def batch(logs, logger); end
+
+ # Returns [Hash] log message in Signalfx format.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:79
+ def call(log, logger); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:5
+ def counter_name; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:5
+ def counter_name=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:5
+ def dimensions; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:5
+ def dimensions=(_arg0); end
+
+ # Dimensions for this metric
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:57
+ def format_dimensions; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:5
+ def gauge_name; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:5
+ def gauge_name=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:5
+ def hash; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:5
+ def hash=(_arg0); end
+
+ # Create SignalFx friendly metric.
+ # Strip leading '/'
+ # Convert remaining '/' to '.'
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:24
+ def metric; end
+
+ # Date & time
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:46
+ def time; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:5
+ def token; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:5
+ def token=(_arg0); end
+
+ # Value of this metric
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:52
+ def value; end
+
+ private
+
+ # Sum counters with the same time (second), name, and dimensions.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:151
+ def add_counter(counters, metric); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:146
+ def add_gauge(gauges, metric); end
+
+ # Find Metrics with the same timestamp, metric name, and dimensions.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/signalfx.rb:157
+ def find_match(list, metric); end
+end
+
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:3
+class SemanticLogger::Formatters::Syslog < ::SemanticLogger::Formatters::Default
+ # Create a Syslog Log Formatter
+ #
+ # Parameters:
+ # facility: [Integer]
+ # One of the ::Syslog::LOG_* facility constants, for example ::Syslog::LOG_LOCAL0.
+ # Default: LOG_USER
+ #
+ # level_map: [Hash | SemanticLogger::Formatters::Syslog::LevelMap]
+ # Supply a custom map of SemanticLogger levels to syslog levels.
+ #
+ # escape_control_chars: [Boolean]
+ # Replace control characters (newlines, the ANSI escape, etc.) in
+ # untrusted log data with a printable escaped form so that they cannot
+ # forge or split syslog records.
+ # Default: true (unlike other formatters, since syslog frames records
+ # with a separator)
+ #
+ # max_size: [Integer]
+ # Maximum size of each syslog packet, in bytes.
+ # Default: DEFAULT_MAX_SIZE (1024)
+ #
+ # Example:
+ # # Change the warn level to LOG_NOTICE level instead of a the default of LOG_WARNING.
+ # SemanticLogger.add_appender(appender: :syslog, level_map: {warn: ::Syslog::LOG_NOTICE})
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:132
+ def initialize(facility: T.unsafe(nil), level_map: T.unsafe(nil), max_size: T.unsafe(nil), escape_control_chars: T.unsafe(nil), **args); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:163
+ def call(log, logger); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:5
+ def facility; end
+
+ # Set the facility to one of the ::Syslog::LOG_* facility constants.
+ # Raises ArgumentError for any other value, so that a mistake surfaces here rather than on
+ # every log entry.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:148
+ def facility=(facility); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:5
+ def level_map; end
+
+ # Set the map of log levels to syslog severities, as a LevelMap or a Hash of overrides.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:154
+ def level_map=(level_map); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:4
+ def max_size; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:4
+ def max_size=(_arg0); end
+
+ # Time is part of the syslog packet and is not included in the formatted message.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:159
+ def time; end
+
+ private
+
+ # Create Syslog Packet
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:174
+ def create_syslog_packet(message); end
+
+ # Off by default, so that existing syslog records do not change.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:186
+ def default_log_exception_details; end
+
+ class << self
+ # Returns [Integer] the facility number (0 to 23) that the syslog protocol sends, for a facility
+ # given as documented: one of the `::Syslog::LOG_*` facility constants, such as
+ # `::Syslog::LOG_LOCAL0`. syslog(3) defines each of those as the facility number shifted left
+ # by 3 bits, so `::Syslog::LOG_USER` is 8 and its facility number is 1.
+ #
+ # Raises ArgumentError for any other value, including a bare facility number.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:51
+ def facility_number(facility); end
+
+ # Load the syslog_protocol gem, which builds the packets for remote syslog.
+ # Called when a syslog formatter is created, so the gem is only needed by applications
+ # that log to a remote syslog server.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:100
+ def require_syslog_protocol; end
+ end
+end
+
+# Default maximum size of a syslog packet, in bytes, as for the syslog appender.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:40
+SemanticLogger::Formatters::Syslog::DEFAULT_MAX_SIZE = T.let(T.unsafe(nil), Integer)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:22
+SemanticLogger::Formatters::Syslog::LOG_AUTH = T.let(T.unsafe(nil), Integer)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:28
+SemanticLogger::Formatters::Syslog::LOG_AUTHPRIV = T.let(T.unsafe(nil), Integer)
+
+# Syslog severities and facilities, with the same values as the matching `::Syslog` constants.
+# The `syslog` gem is only needed to log to a local syslog daemon, and since Ruby 3.4 it is a
+# bundled gem, so remote syslog must not depend on it for these values.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:10
+SemanticLogger::Formatters::Syslog::LOG_CRIT = T.let(T.unsafe(nil), Integer)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:27
+SemanticLogger::Formatters::Syslog::LOG_CRON = T.let(T.unsafe(nil), Integer)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:21
+SemanticLogger::Formatters::Syslog::LOG_DAEMON = T.let(T.unsafe(nil), Integer)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:15
+SemanticLogger::Formatters::Syslog::LOG_DEBUG = T.let(T.unsafe(nil), Integer)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:11
+SemanticLogger::Formatters::Syslog::LOG_ERR = T.let(T.unsafe(nil), Integer)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:29
+SemanticLogger::Formatters::Syslog::LOG_FTP = T.let(T.unsafe(nil), Integer)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:14
+SemanticLogger::Formatters::Syslog::LOG_INFO = T.let(T.unsafe(nil), Integer)
+
+# Syslog facilities, as syslog(3) defines them: the facility number shifted left by 3 bits.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:18
+SemanticLogger::Formatters::Syslog::LOG_KERN = T.let(T.unsafe(nil), Integer)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:30
+SemanticLogger::Formatters::Syslog::LOG_LOCAL0 = T.let(T.unsafe(nil), Integer)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:31
+SemanticLogger::Formatters::Syslog::LOG_LOCAL1 = T.let(T.unsafe(nil), Integer)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:32
+SemanticLogger::Formatters::Syslog::LOG_LOCAL2 = T.let(T.unsafe(nil), Integer)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:33
+SemanticLogger::Formatters::Syslog::LOG_LOCAL3 = T.let(T.unsafe(nil), Integer)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:34
+SemanticLogger::Formatters::Syslog::LOG_LOCAL4 = T.let(T.unsafe(nil), Integer)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:35
+SemanticLogger::Formatters::Syslog::LOG_LOCAL5 = T.let(T.unsafe(nil), Integer)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:36
+SemanticLogger::Formatters::Syslog::LOG_LOCAL6 = T.let(T.unsafe(nil), Integer)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:37
+SemanticLogger::Formatters::Syslog::LOG_LOCAL7 = T.let(T.unsafe(nil), Integer)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:24
+SemanticLogger::Formatters::Syslog::LOG_LPR = T.let(T.unsafe(nil), Integer)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:20
+SemanticLogger::Formatters::Syslog::LOG_MAIL = T.let(T.unsafe(nil), Integer)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:25
+SemanticLogger::Formatters::Syslog::LOG_NEWS = T.let(T.unsafe(nil), Integer)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:13
+SemanticLogger::Formatters::Syslog::LOG_NOTICE = T.let(T.unsafe(nil), Integer)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:23
+SemanticLogger::Formatters::Syslog::LOG_SYSLOG = T.let(T.unsafe(nil), Integer)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:19
+SemanticLogger::Formatters::Syslog::LOG_USER = T.let(T.unsafe(nil), Integer)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:26
+SemanticLogger::Formatters::Syslog::LOG_UUCP = T.let(T.unsafe(nil), Integer)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:12
+SemanticLogger::Formatters::Syslog::LOG_WARNING = T.let(T.unsafe(nil), Integer)
+
+# Default level map for every log level
+#
+# :fatal => ::Syslog::LOG_CRIT - "A critical condition has occurred"
+# :error => ::Syslog::LOG_ERR - "An error occurred"
+# :warning =>::Syslog::LOG_WARNING - "Warning of a possible problem"
+# :info => ::Syslog::LOG_NOTICE - "A normal but significant condition occurred"
+# :debug => ::Syslog::LOG_INFO - "Informational message"
+# :trace => ::Syslog::LOG_DEBUG - "Debugging information"
+#
+# The following levels are not used by default.
+# ::Syslog::LOG_EMERG - "System is unusable"
+# ::Syslog::LOG_ALERT - "Action needs to be taken immediately"
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:73
+class SemanticLogger::Formatters::Syslog::LevelMap
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:82
+ def initialize(trace: T.unsafe(nil), debug: T.unsafe(nil), info: T.unsafe(nil), warn: T.unsafe(nil), error: T.unsafe(nil), fatal: T.unsafe(nil)); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:92
+ def [](level); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:74
+ def debug; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:74
+ def debug=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:74
+ def error; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:74
+ def error=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:74
+ def fatal; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:74
+ def fatal=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:74
+ def info; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:74
+ def info=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:74
+ def trace; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:74
+ def trace=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:74
+ def warn; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:74
+ def warn=(_arg0); end
+
+ class << self
+ # Returns [LevelMap] the supplied level map, or a new one with a Hash of overrides applied,
+ # for example `{warn: LOG_NOTICE}`.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:78
+ def build(level_map); end
+ end
+end
+
+# The highest facility the syslog protocol can encode.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog.rb:43
+SemanticLogger::Formatters::Syslog::MAX_FACILITY = T.let(T.unsafe(nil), Integer)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog_cee.rb:3
+class SemanticLogger::Formatters::SyslogCee < ::SemanticLogger::Formatters::Raw
+ # CEE JSON Syslog format
+ # Untested prototype code. Based on documentation only.
+ # If this works for you, please let us know by opening an issue.
+ #
+ # Parameters:
+ # facility: [Integer]
+ # One of the ::Syslog::LOG_* facility constants, for example ::Syslog::LOG_LOCAL0.
+ # Default: SemanticLogger::Formatters::Syslog::LOG_USER
+ #
+ # level_map: [Hash | SemanticLogger::Formatters::Syslog::LevelMap]
+ # Supply a custom map of SemanticLogger levels to syslog levels.
+ #
+ # max_size: [Integer]
+ # Maximum size of each syslog packet, in bytes.
+ # Default: SemanticLogger::Formatters::Syslog::DEFAULT_MAX_SIZE (1024)
+ #
+ # Example:
+ # # Log via udp to a remote syslog server on host: `server1` and port `8514`, using the CEE format.
+ # SemanticLogger.add_appender(appender: :syslog, formatter: :syslog_cee, url: 'udp://server1:8514')
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog_cee.rb:26
+ def initialize(facility: T.unsafe(nil), level_map: T.unsafe(nil), max_size: T.unsafe(nil)); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog_cee.rb:53
+ def call(log, logger); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog_cee.rb:5
+ def facility; end
+
+ # Set the facility to one of the ::Syslog::LOG_* facility constants.
+ # Raises ArgumentError for any other value, so that a mistake surfaces here rather than on
+ # every log entry.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog_cee.rb:39
+ def facility=(facility); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog_cee.rb:5
+ def level_map; end
+
+ # Set the map of log levels to syslog severities, as a LevelMap or a Hash of overrides.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog_cee.rb:45
+ def level_map=(level_map); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog_cee.rb:4
+ def max_size; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog_cee.rb:4
+ def max_size=(_arg0); end
+
+ # Time is part of the syslog packet and is not included in the formatted message.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog_cee.rb:50
+ def time; end
+
+ private
+
+ # Create Syslog Packet
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/formatters/syslog_cee.rb:61
+ def create_syslog_packet(message); end
+end
+
+# Logging levels in order of most detailed to most severe
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:5
+SemanticLogger::LEVELS = T.let(T.unsafe(nil), Array)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/levels.rb:4
+module SemanticLogger::Levels
+ class << self
+ # Internal method to return the log level as an internal index
+ # Also supports mapping the ::Logger levels to SemanticLogger levels
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/levels.rb:17
+ def index(level); end
+
+ # Returns the symbolic level for the supplied level index
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/levels.rb:41
+ def level(level_index); end
+
+ # Returns [true|false] whether the supplied value is a level that #index accepts.
+ # Never raises, so it can be used to check values that come from untrusted data.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/levels.rb:34
+ def valid?(level); end
+ end
+end
+
+# Logging levels in order of most detailed to most severe
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/levels.rb:6
+SemanticLogger::Levels::LEVELS = T.let(T.unsafe(nil), Array)
+
+# Map the built-in `Logger` levels to SemanticLogger levels.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/levels.rb:9
+SemanticLogger::Levels::MAPPED_LEVELS = T.let(T.unsafe(nil), Array)
+
+# Log
+#
+# Class to hold all log entry information
+#
+# level
+# Log level of the supplied log call
+# :trace, :debug, :info, :warn, :error, :fatal
+#
+# thread_name
+# Name of the thread in which the logging call was called,
+# or its object id when the thread has no name
+#
+# name
+# Class name supplied to the logging instance
+#
+# message
+# Text message to be logged
+#
+# payload
+# Optional Hash or Ruby Exception object to be logged
+#
+# time
+# The time at which the log entry was created
+#
+# duration
+# The time taken to complete a measure call
+#
+# tags
+# Any tags active on the thread when the log call was made
+#
+# level_index
+# Internal index of the log level
+#
+# exception
+# Ruby Exception object to log
+#
+# metric [Object]
+# Object supplied when measure_x was called
+#
+# backtrace [Array]
+# The backtrace captured at source when the log level >= SemanticLogger.backtrace_level
+#
+# metric_amount [Numeric]
+# Used for numeric or counter metrics.
+# For example, the number of inquiries or, the amount purchased etc.
+#
+# context [Hash]
+# Named contexts that were captured when the log entry was created.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/log.rb:50
+class SemanticLogger::Log
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:96
+ def initialize(name, level, index = T.unsafe(nil)); end
+
+ # Assign named arguments to this log entry, supplying defaults where applicable
+ #
+ # Returns [true|false] whether this log entry should be logged
+ #
+ # Example:
+ # logger.info(name: 'value')
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:112
+ def assign(message: T.unsafe(nil), payload: T.unsafe(nil), min_duration: T.unsafe(nil), exception: T.unsafe(nil), metric: T.unsafe(nil), metric_amount: T.unsafe(nil), duration: T.unsafe(nil), backtrace: T.unsafe(nil), log_exception: T.unsafe(nil), on_exception_level: T.unsafe(nil), dimensions: T.unsafe(nil)); end
+
+ # Assign the Hash returned by a logging block, after #assign has applied the log call.
+ #
+ # A block can return untrusted data, such as a parsed request body, so its keys are classified
+ # by #extract_arguments, as for a Hash passed after the message. A log argument is only assigned
+ # when this entry does not have it yet (an exception must also be an Exception), and otherwise
+ # goes to the payload like any other key. Whatever the key order, the log call's values win,
+ # then the block's top-level keys, then those of its :payload. No supplied Hash is modified.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:180
+ def assign_hash(hash); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:91
+ def backtrace; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:91
+ def backtrace=(_arg0); end
+
+ # Returns [String] the exception backtrace including all of the child / caused by exceptions
+ #
+ # When a block is supplied, each cause's message and each backtrace line is passed
+ # to it, and the value it returns is written in its place. This lets a caller, for
+ # example a formatter, transform that text while this method keeps the layout.
+ #
+ # Example:
+ # log.backtrace_to_s { |text| text.gsub("\n", "\\n") }
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:300
+ def backtrace_to_s(&block); end
+
+ # Strip the standard Rails colorizing from the logged message.
+ #
+ # Note: This unconditionally *strips* ANSI colorization, and is used to keep
+ # terminal escape codes out of structured (JSON/Loki) output. It is distinct
+ # from Formatters::Base#escape_control_characters, which instead *escapes*
+ # (preserves) control characters and is opt-in for the text formatters.
+ #
+ # A message tagged UTF-8 can hold invalid bytes, for example a request parameter that Rack
+ # decoded from "%FF", or be in another encoding, such as a binary request body. Stripping or
+ # matching such a String raises, so it is converted to valid UTF-8 first, dropping the
+ # invalid bytes, as the JSON formatters do.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:391
+ def cleansed_message; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:91
+ def context; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:91
+ def context=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:91
+ def dimensions; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:91
+ def dimensions=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:91
+ def duration; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:91
+ def duration=(_arg0); end
+
+ # Returns [String] the duration in human readable form
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:331
+ def duration_human; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:323
+ def duration_to_s; end
+
+ # Call the block for exception and any nested exception
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:243
+ def each_exception; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:91
+ def exception; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:91
+ def exception=(_arg0); end
+
+ # Returns [String] the detail that Ruby's Exception#detailed_message adds to the message of the
+ # supplied exception, without the class name that Ruby also adds. Since Ruby 3.2 this is where
+ # did_you_mean suggestions ("Did you mean? upcase") and the detail an exception class supplies
+ # by overriding #detailed_message appear, rather than in #message.
+ # Returns nil when there is no detail.
+ #
+ # Parameters
+ # exception: [Exception]
+ # This entry's exception, or one of its causes (see #each_exception).
+ # source: [true|false]
+ # Whether to include error_highlight's snippet of the failing source line, for example
+ # "user_name.upcas" with "^^^^^^" under the unknown method. It re-parses that source
+ # file on every call, so it is about 100 times slower, and it copies source code into
+ # the log.
+ # Default: false
+ #
+ # The result is cached on this entry, since every appender's formatter may ask for it.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:281
+ def exception_details(exception, source: T.unsafe(nil)); end
+
+ # Extract the arguments from a Hash Payload
+ #
+ # The hash can hold untrusted data, so this never fails because of its content: keys that are
+ # not log attributes, or that hold a value that is not valid for it (see .argument?), are kept
+ # in the payload. A log attribute key with a nil value counts as not supplied, so #assign uses
+ # its default. When the hash supplies an explicit :payload, any other keys are merged into it,
+ # and win over its values of the same name, since the explicit payload is where untrusted data
+ # goes (see docs/security.md).
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:212
+ def extract_arguments(payload, message = T.unsafe(nil)); end
+
+ # Extract the filename and line number from the last entry in the supplied backtrace
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:364
+ def extract_file_and_line(stack, short_name = T.unsafe(nil)); end
+
+ # Returns [String, String] the file_name and line_number from the backtrace supplied
+ # in either the backtrace or exception
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:375
+ def file_name_and_line(short_name = T.unsafe(nil)); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:91
+ def level; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:91
+ def level=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:91
+ def level_index; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:91
+ def level_index=(_arg0); end
+
+ # Returns [String] single character upper case log level
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:349
+ def level_to_s; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:91
+ def message; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:91
+ def message=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:91
+ def metric; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:91
+ def metric=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:91
+ def metric_amount; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:91
+ def metric_amount=(_arg0); end
+
+ # A metric only event has a metric but no message or exception.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:425
+ def metric_only?; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:91
+ def name; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:91
+ def name=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:91
+ def named_tags; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:91
+ def named_tags=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:91
+ def payload; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:91
+ def payload=(_arg0); end
+
+ # Returns [true|false] whether the log entry has a payload
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:409
+ def payload?; end
+
+ # Return the payload in text form
+ # Returns nil if payload is missing or empty
+ #
+ # Rendered with #inspect, or with the block when given (for example Amazing Print). A payload
+ # nested too deeply for either is first cut off at Utils::MAX_JSON_SAFE_DEPTH, rather than
+ # raising SystemStackError (see Utils.safe_inspect).
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:404
+ def payload_to_s(&); end
+
+ # DEPRECATED
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:354
+ def process_info(thread_name_length = T.unsafe(nil)); end
+
+ # Lazy initializes the context hash and assigns a key value pair.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:420
+ def set_context(key, value); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:91
+ def tags; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:91
+ def tags=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:91
+ def thread_name; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:91
+ def thread_name=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:91
+ def time; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:91
+ def time=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:413
+ def to_h(host = T.unsafe(nil), application = T.unsafe(nil), environment = T.unsafe(nil)); end
+
+ private
+
+ # Whether a log argument from the Hash returned by a logging block, already checked by
+ # .argument?, is assigned to its attribute: only when this entry does not have it yet. As in
+ # #extract_arguments, an empty message counts as none.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:457
+ def block_attribute?(key, value); end
+
+ # Returns the kept payload with the keys of the added one that it does not have, so that a kept
+ # value is never replaced. A String and a Symbol key of the same name, such as "account_id" from
+ # JSON.parse and :account_id, count as the same key, since the formatters write both under that
+ # name. A payload that is not a Hash is kept as its :payload key, but the kept payload is
+ # returned unchanged when there is nothing to add. Neither payload is modified.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:436
+ def merge_payload(kept, added); end
+
+ class << self
+ # Returns [true|false] whether the value can be used as the log argument named by the key.
+ #
+ # Never raises, so it can check values from untrusted data before they are passed to #assign.
+ # A nil value is never an argument, since it means the argument was not supplied. Arguments
+ # without a validator in ARGUMENT_VALIDATORS (such as :message, :metric, or :exception, which
+ # #assign logs as an ArgumentError when it is not an Exception) accept any other value.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:197
+ def argument?(key, value); end
+
+ # Whether the value is accepted for the :log_exception argument of #assign.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:83
+ def log_exception_option?(value); end
+
+ # Returns [String] the name that identifies the thread in a log entry: the thread's own name,
+ # or its object id when it has none, which Ruby never reuses within a process.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/log.rb:89
+ def thread_name_for(thread); end
+ end
+end
+
+# Checks that a value is valid for its argument, for the arguments that do not accept any value.
+# Any other value would make #assign, or the formatters, raise.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/log.rb:67
+SemanticLogger::Log::ARGUMENT_VALIDATORS = T.let(T.unsafe(nil), Hash)
+
+# Log attributes that a Hash returned by a logging block can set (see #assign_hash). Its other
+# keys go to the payload, so that it cannot set fields such as :level, :name, or :time.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/log.rb:171
+SemanticLogger::Log::ASSIGNABLE_KEYS = T.let(T.unsafe(nil), Array)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/log.rb:361
+SemanticLogger::Log::CALLER_REGEXP = T.let(T.unsafe(nil), Regexp)
+
+# Hash#key?, which unlike HashWithIndifferentAccess#key? only matches the exact Symbol key.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/log.rb:79
+SemanticLogger::Log::HASH_KEY = T.let(T.unsafe(nil), UnboundMethod)
+
+# Values accepted for the :log_exception argument.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/log.rb:58
+SemanticLogger::Log::LOG_EXCEPTION_OPTIONS = T.let(T.unsafe(nil), Array)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/log.rb:241
+SemanticLogger::Log::MAX_EXCEPTIONS_TO_UNWRAP = T.let(T.unsafe(nil), Integer)
+
+# Keys passed in without a payload that will be extracted and the remainder passed into the payload.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/log.rb:52
+SemanticLogger::Log::NON_PAYLOAD_KEYS = T.let(T.unsafe(nil), Array)
+
+# A finite real number, which #assign can compare with another one.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/log.rb:62
+SemanticLogger::Log::REAL_NUMBER = T.let(T.unsafe(nil), Proc)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/loggable.rb:32
+module SemanticLogger::Loggable
+ mixes_in_class_methods ::SemanticLogger::Loggable::ClassMethods
+
+ class << self
+ # pkg:gem/semantic_logger#lib/semantic_logger/loggable.rb:33
+ def included(base); end
+ end
+end
+
+# pkg:gem/semantic_logger#lib/semantic_logger/loggable.rb:65
+module SemanticLogger::Loggable::ClassMethods
+ # Measure and log the performance of an instance method.
+ #
+ # Parameters:
+ # method_name: [Symbol]
+ # The name of the method that should be measured.
+ #
+ # options: [Hash]
+ # Any valid options that can be passed to measure.
+ #
+ # Approximate overhead when logging a method call with a metric:
+ # 0.044 ms per method call.
+ # 0.009 ms per method call. If `min_duration` is not met
+ # 0.0005 ms per method call. If `level` is not met
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/loggable.rb:79
+ def logger_measure_method(method_name, min_duration: T.unsafe(nil), metric: T.unsafe(nil), log_exception: T.unsafe(nil), on_exception_level: T.unsafe(nil), message: T.unsafe(nil), level: T.unsafe(nil)); end
+
+ private
+
+ # Dynamic Module to intercept method calls for measuring purposes.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/loggable.rb:143
+ def logger_measure_module; end
+end
+
+# Logger stores the class name to be used for all log messages so that every
+# log message written by this instance will include the class name
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:4
+class SemanticLogger::Logger < ::SemanticLogger::Base
+ include ::SemanticLogger::Concerns::Compatibility
+
+ # Returns a Logger instance
+ #
+ # Return the logger for a specific class, supports class specific log levels
+ # logger = SemanticLogger::Logger.new(self)
+ # OR
+ # logger = SemanticLogger::Logger.new('MyClass')
+ #
+ # Parameters:
+ # klass
+ # A class, module or a string with the application/class name
+ # to be used in the logger
+ #
+ # level
+ # The initial log level to start with for this logger instance
+ # Default: SemanticLogger.default_level
+ #
+ # filter [Regexp|Proc]
+ # RegExp: Only include log messages where the class name matches the supplied
+ # regular expression. All other messages will be ignored
+ # Proc: Only include log messages where the supplied Proc returns true
+ # The Proc must return true or false
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:59
+ def initialize(klass, level = T.unsafe(nil), filter = T.unsafe(nil)); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:5
+ def <<(message = T.unsafe(nil), payload = T.unsafe(nil), exception = T.unsafe(nil), &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:5
+ def datetime_format; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:5
+ def datetime_format=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:5
+ def formatter; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:5
+ def formatter=(_arg0); end
+
+ # Place log request on the queue for the Appender thread to write to each
+ # appender in the order that they were registered
+ #
+ # Subscribers are called inline before handing off to the queue so that
+ # they can capture additional context information as needed.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:68
+ def log(log, message = T.unsafe(nil), progname = T.unsafe(nil), &); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:5
+ def progname; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:5
+ def progname=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:5
+ def sev_threshold; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:5
+ def sev_threshold=(level); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:5
+ def silence_logger(new_level = T.unsafe(nil), &); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:5
+ def unknown(message = T.unsafe(nil), payload = T.unsafe(nil), exception = T.unsafe(nil), &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:5
+ def unknown?; end
+
+ class << self
+ # pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:80
+ def call_subscribers(log); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:22
+ def processor; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:7
+ def subscribe(object = T.unsafe(nil), &block); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:19
+ def subscribers; end
+
+ # Switch to the synchronous processor
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:27
+ def sync!; end
+
+ # Running without the background logging thread?
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/logger.rb:34
+ def sync?; end
+ end
+end
+
+# @formatter:off
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:625
+module SemanticLogger::Metric; end
+
+# pkg:gem/semantic_logger#lib/semantic_logger/metric/signalfx.rb:10
+class SemanticLogger::Metric::Signalfx < ::SemanticLogger::Appender::Http
+ # Create SignalFx metrics appender.
+ #
+ # Parameters:
+ # token: [String]
+ # Access Token to use for sending metrics.
+ # Obtain the Signalfx token via the Signalfx Web UI under `Organization` -> `Access Tokens`.
+ #
+ # dimensions: [Array]
+ # Dimensions to forward to signalfx when they are present in the named tags of any log message.
+ # By default `application` and `host` are always included as dimensions in all forwarded metrics.
+ # Example: [:user_id, :state]
+ #
+ # filter: [Regexp|Proc]
+ # RegExp: Only include log messages where the class name matches the supplied
+ # regular expression. All other messages will be ignored.
+ # Proc: Only include log messages where the supplied Proc returns true.
+ # The Proc must return true or false.
+ #
+ # host: [String]
+ # Name of this host to send as a dimension.
+ # Default: SemanticLogger.host
+ #
+ # application: [String]
+ # Name of this application to send as a dimension.
+ # Default: SemanticLogger.application
+ #
+ # url: [String]
+ # Override the SignalFx service url.
+ # For historical data use: https://backfill.signalfx.com/v1/backfill
+ # Default: https://ingest.signalfx.com
+ #
+ # Notes:
+ #
+ # When sending a metric to Signalfx, it is necessary to send both a `gauge` and a `counter` when a
+ # duration is included in the metric, otherwise it is not possible to chart counts of the metric.
+ # Unfortunately this doubles the number of metrics, but it is the way Signalfx works.
+ # Using a `count` of a `gauge` in a chart will significantly under-count the number of occurrences.
+ #
+ # If dimensions are added to the metric, then the metric will be sent as-is and
+ # the above logic will _not_ be applied.
+ #
+ # Example, Gauge metric, supplying the duration in `metric_amount`:
+ # logger.info(metric: 'Filters.average', metric_amount: 1.2, dimensions: {user: 'jbloggs'})
+ #
+ # Example, Counter metric:
+ # logger.info(metric: 'Filters.count', dimensions: {user: 'jbloggs'})
+ #
+ # Example, Counter metric with a count other than 1:
+ # logger.info(metric: 'Filters.count', metric_amount: 23, dimensions: {user: 'jbloggs'})
+ #
+ # When a duration is supplied and no dimensions are supplied:
+ # logger.info(metric: 'Common/User/authorize', duration: 1.4)
+ #
+ # Then it is translated into the following 2 log entries under the covers:
+ # logger.info(metric: 'Application.average', metric_amount: 1.4,
+ # dimensions: {class: 'Common::User', action: 'authorize'})
+ # logger.info(metric: 'Application.counter', metric_amount: 1,
+ # dimensions: {class: 'Common::User', action: 'authorize'})
+ #
+ # Similarly with a measure block which automatically supplies the duration:
+ # logger.measure_info(metric: 'Common/User/authorize') do
+ # sleep 1
+ # end
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/metric/signalfx.rb:78
+ def initialize(token:, dimensions: T.unsafe(nil), url: T.unsafe(nil), formatter: T.unsafe(nil), **args, &); end
+
+ # Logs in batches
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/metric/signalfx.rb:101
+ def batch(logs); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/metric/signalfx.rb:11
+ def full_path; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/metric/signalfx.rb:94
+ def log(log); end
+
+ # Only forward log entries that contain metrics.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/metric/signalfx.rb:108
+ def should_log?(log); end
+end
+
+# pkg:gem/semantic_logger#lib/semantic_logger/metric/signalfx.rb:13
+SemanticLogger::Metric::Signalfx::END_POINT = T.let(T.unsafe(nil), String)
+
+# Thread that submits and processes log requests
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/processor.rb:3
+class SemanticLogger::Processor < ::SemanticLogger::Appender::Async
+ # pkg:gem/semantic_logger#lib/semantic_logger/processor.rb:26
+ def initialize(max_queue_size: T.unsafe(nil)); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/processor.rb:24
+ def appenders; end
+
+ # Start the appender thread
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/processor.rb:32
+ def start; end
+
+ # Returns [Hash] operational statistics for the logging pipeline.
+ #
+ # queue_size: [Integer] Number of log messages waiting on the main pipeline queue.
+ # capped: [Boolean] Whether the main queue has a maximum size.
+ # max_queue_size: [Integer] Maximum queue size, or nil when uncapped.
+ # thread_active: [Boolean] Whether the main pipeline thread is running.
+ # processed: [Integer] Cumulative number of log messages processed since startup.
+ # dropped: [Integer] Cumulative number of log messages dropped at the main queue.
+ # appenders: [Array] Per-appender statistics, see Appenders#stats.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/processor.rb:48
+ def stats; end
+
+ class << self
+ # Internal logger for SemanticLogger
+ # For example when an appender is not working etc..
+ # By default logs to $stderr
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/processor.rb:15
+ def logger; end
+
+ # Internal logger for SemanticLogger
+ # For example when an appender is not working etc..
+ # By default logs to $stderr
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/processor.rb:9
+ def logger=(_arg0); end
+ end
+end
+
+# Internal class that processes log messages from a queue on a separate thread.
+#
+# Internal use only: it owns the worker thread and the in-memory queue that back the
+# asynchronous appender proxy (SemanticLogger::Appender::Async). It is never returned to
+# application code.
+#
+# Supports two processing modes, selected by the `batch:` option:
+# * Streaming (batch: false): each log message is written to the appender as it is dequeued.
+# * Batching (batch: true): log messages are grouped and written via the appender's #batch
+# method, either once batch_size messages have accumulated, or
+# batch_seconds have elapsed since the previous batch.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/queue_processor/request.rb:2
+class SemanticLogger::QueueProcessor
+ # Parameters:
+ # appender: [SemanticLogger::Subscriber]
+ # The appender to forward log messages to from the worker thread.
+ #
+ # max_queue_size: [Integer]
+ # The maximum number of log messages to hold on the queue before blocking attempts to add to the queue.
+ # -1: The queue size is uncapped and will never block no matter how long the queue is.
+ # Default: 10,000
+ #
+ # lag_threshold_s: [Float]
+ # Log a warning when a log message has been on the queue for longer than this period in seconds.
+ # Default: 30
+ #
+ # lag_check_interval: [Integer]
+ # Number of messages to process before checking for slow logging.
+ # Default: 1,000
+ # Note: Not applicable when batch: true.
+ #
+ # batch: [true|false]
+ # Process log messages in batches via the appender's #batch method.
+ # Default: false
+ # Note: The appender must implement #batch.
+ #
+ # batch_size: [Integer]
+ # Maximum number of messages to batch up before sending.
+ # Default: 300
+ # Note: Only applicable when batch: true.
+ #
+ # batch_seconds: [Integer]
+ # Maximum number of seconds between sending batches.
+ # Default: 5
+ # Note: Only applicable when batch: true.
+ #
+ # non_blocking: [true|false]
+ # Whether to drop log messages instead of blocking the calling thread when the queue is full.
+ # Only applies to a capped queue.
+ # Default: false
+ #
+ # dropped_message_report_seconds: [Integer]
+ # When non_blocking is enabled, log the count of dropped messages to the internal logger
+ # at most once every this number of seconds. Also limits how often messages discarded
+ # because their content could not be written are reported, after the first.
+ # Default: 30
+ #
+ # async_max_retries: [Integer]
+ # Maximum number of consecutive times to restart the worker thread after it raises an
+ # exception while processing messages. Each restart first sleeps for `retry_count` seconds
+ # (1s, then 2s, ...) as a back-off. Once this many consecutive retries are exhausted the
+ # thread stops instead of restarting. The counter resets to zero whenever a message is
+ # processed successfully.
+ # -1: Retry indefinitely and never stop the thread (the pre-v5 behaviour). The back-off
+ # still applies, and still resets after any successful message.
+ # Default: 100
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:82
+ def initialize(appender:, max_queue_size: T.unsafe(nil), lag_check_interval: T.unsafe(nil), lag_threshold_s: T.unsafe(nil), batch: T.unsafe(nil), batch_size: T.unsafe(nil), batch_seconds: T.unsafe(nil), non_blocking: T.unsafe(nil), dropped_message_report_seconds: T.unsafe(nil), async_max_retries: T.unsafe(nil)); end
+
+ # Returns [true|false] whether the worker thread is running.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:129
+ def active?; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:19
+ def appender; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:19
+ def async_max_retries; end
+
+ # Returns [true|false] whether messages are processed in batches.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:146
+ def batch?; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:17
+ def batch_seconds; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:17
+ def batch_seconds=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:17
+ def batch_size; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:17
+ def batch_size=(_arg0); end
+
+ # Returns [true|false] whether the queue has a capped size.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:132
+ def capped?; end
+
+ # Flush any outstanding messages and close the appender.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:187
+ def close; end
+
+ # Returns [Integer] the number of log messages dropped because the queue was full.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:139
+ def dropped_count; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:17
+ def dropped_message_report_seconds; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:17
+ def dropped_message_report_seconds=(_arg0); end
+
+ # Returns [Integer] the number of log messages discarded because their content could not be
+ # written (see Subscriber#message_error?).
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:143
+ def failed_count; end
+
+ # Flush all queued log entries to the appender.
+ # All queued log messages are written and then the appender is flushed.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:182
+ def flush; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:17
+ def lag_check_interval; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:17
+ def lag_check_interval=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:17
+ def lag_threshold_s; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:17
+ def lag_threshold_s=(_arg0); end
+
+ # Add a log message to the queue for processing.
+ #
+ # When non-blocking and the queue is full, the message is dropped instead of blocking the
+ # calling thread, and the count of dropped messages is reported periodically.
+ #
+ # Once the worker thread has stopped for good (see async_max_retries), nothing will empty the
+ # queue, so messages are also dropped instead of blocking the calling thread forever.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:159
+ def log(log); end
+
+ # Internal logger used to report problems encountered while processing log messages.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:117
+ def logger; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:19
+ def max_queue_size; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:17
+ def non_blocking; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:17
+ def non_blocking=(_arg0); end
+
+ # Returns [true|false] whether messages are dropped instead of blocking when the queue is full.
+ # Only a capped queue can drop messages.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:136
+ def non_blocking?; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:19
+ def processed_count; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:19
+ def queue; end
+
+ # Re-open the queue and worker thread after a fork.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:192
+ def reopen; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:19
+ def retry_count; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:19
+ def signal; end
+
+ # Returns [true|false] whether the worker thread gave up after an error, so that queued
+ # messages are no longer being processed.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:150
+ def stopped?; end
+
+ # Returns [Thread] the worker thread.
+ #
+ # Starts the worker thread if it is not currently running.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:122
+ def thread; end
+
+ private
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:437
+ def check_lag(log); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:224
+ def create_queue; end
+
+ # Record a dropped message, reporting the running count to the internal logger at most
+ # once every dropped_message_report_seconds.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:427
+ def message_dropped; end
+
+ # Whether the appender says the exception was caused by the content of a log message, rather
+ # than by the destination. An appender that cannot tell (it does not implement
+ # #message_error?) has every error retried with a back-off.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:412
+ def message_error?(exception); end
+
+ # Record log messages discarded because their content could not be written. The first is
+ # reported to the internal logger straight away, with the error. After that the count is
+ # reported, with the latest error, at most once every dropped_message_report_seconds.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:417
+ def messages_failed(logs, exception); end
+
+ # Name the worker thread after its appender, such as "SL File", short enough for tools that
+ # list threads, such as `top -H`, to tell the workers apart: Linux keeps only the first 15 bytes.
+ # The name is only a label, so when Ruby rejects it, for example for a class given a temporary
+ # name with a NUL byte, the thread carries on without one.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:218
+ def name_worker; end
+
+ # Separate thread for processing log messages.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:235
+ def process; end
+
+ # Run a command after a batch could not be written. Returns false once a command (:close)
+ # stops processing, even when the command itself fails.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:351
+ def process_message_after_failure(command); end
+
+ # Streaming: write each log message to the appender as it is dequeued.
+ #
+ # Returns true when processing must carry on in a new thread (see #stack_overflowed).
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:274
+ def process_messages; end
+
+ # Batching: group up log messages before writing them via the appender's #batch method.
+ #
+ # Returns true when processing must carry on in a new thread (see #stack_overflowed).
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:299
+ def process_messages_in_batches; end
+
+ # Log to the internal logger, ignoring any error.
+ # These calls may run after Ruby has released file handles during shutdown.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:265
+ def safe_log(level, message, exception = T.unsafe(nil)); end
+
+ # Start the worker thread.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:205
+ def spawn_worker; end
+
+ # Discard log messages whose writing overflowed the stack, for example a value nested too
+ # deeply for a custom formatter. Retrying cannot write them, as for #message_error?.
+ #
+ # This thread must not overflow its stack again: on macOS a second stack overflow on the same
+ # thread crashes Ruby. So nothing else is written on it, including the rest of a batch, which
+ # is discarded rather than split up further to find the message at fault. Once any commands
+ # taken off the queue with the messages have run, a new thread carries on (see #process).
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:404
+ def stack_overflowed(logs, exception); end
+
+ # Submit a command to the worker thread and wait for the reply.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:447
+ def submit_request(command); end
+
+ # Write the log messages to the appender as a batch.
+ #
+ # When the content of a message cannot be written (see #message_error?), and the appender's
+ # #batch is all or nothing, the batch is split in half and each half written separately, so
+ # that only the offending message is discarded rather than every message in the batch.
+ # Otherwise the batch is discarded, since writing it again could duplicate the messages that
+ # the appender had already written. A stack overflow discards the batch, and the rest of the
+ # batch being split, without splitting it further (see #stack_overflowed).
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:383
+ def write_batch(logs); end
+
+ # Write the log messages taken off the queue as a batch, then run the commands taken off the
+ # queue with them. Returns false once a command (:close) stops processing.
+ #
+ # When the batch cannot be written, for example because the destination is unavailable, the
+ # commands still run before the error propagates to #process to back off. Otherwise they
+ # would be lost, and a caller waiting on #flush or #close, such as the flush at exit, would
+ # wait forever.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:336
+ def write_batch_then_run(logs, commands); end
+
+ # Write one log message to the appender.
+ #
+ # A message whose content cannot be written (see #message_error?) is discarded and reported,
+ # without restarting the thread. Any other error, such as the destination being unavailable,
+ # propagates to #process, which backs off before retrying. A stack overflow discards the
+ # message too (see #stack_overflowed).
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:364
+ def write_message(log); end
+
+ class << self
+ # Create a new processor and start its worker thread.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor.rb:23
+ def start(**args); end
+ end
+end
+
+# Internal: a command, such as :flush or :close, submitted on the queue for the worker thread
+# to run, while the submitting thread waits for the reply.
+#
+# It knows its command and how its reply gets back to the submitting thread, and makes sure
+# that the submitting thread is never left waiting on a reply that cannot come.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/queue_processor/request.rb:8
+class SemanticLogger::QueueProcessor::Request
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor/request.rb:11
+ def initialize(command); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor/request.rb:9
+ def command; end
+
+ # Called by the worker thread: run the block for this request, then reply with true, or
+ # with false when the block raised. Replies either way.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor/request.rb:18
+ def reply; end
+
+ # Called by the worker thread: run this command on the appender, then reply. Returns false
+ # once message processing must stop (:close).
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor/request.rb:28
+ def run(appender); end
+
+ # Called by the submitting thread: wait for the reply from the worker thread.
+ #
+ # The block returns whether a worker thread that can still reply is running. Returns the
+ # reply, or false once none is, for example once the worker gave up after
+ # async_max_retries, or was replaced after a fork.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor/request.rb:46
+ def wait; end
+end
+
+# Internal: counts occurrences of a problem, such as a dropped log message, and has it
+# reported at most once per interval instead of once per occurrence.
+#
+# It knows the total number of occurrences, how many there have been since the previous
+# report, and when that report was made. What to report, and where, is up to the caller.
+#
+# Thread-safe: occurrences may be recorded from any thread.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/queue_processor/throttled_counter.rb:10
+class SemanticLogger::QueueProcessor::ThrottledCounter
+ # Parameters:
+ # reported_at: [Time|nil]
+ # When counting starts, so that the first report is due one interval later.
+ # nil: Report the first occurrence straight away.
+ # Default: Time.now
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor/throttled_counter.rb:19
+ def initialize(reported_at: T.unsafe(nil)); end
+
+ # Record one or more occurrences.
+ #
+ # When the previous report was at least `interval` seconds ago, yields the number of
+ # occurrences since then (including these) and the seconds elapsed since that report (nil
+ # when there has been no report yet), then starts counting afresh for the next report.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor/throttled_counter.rb:31
+ def record(count = T.unsafe(nil), interval:); end
+
+ # Returns [Integer] the total number of occurrences recorded.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/queue_processor/throttled_counter.rb:12
+ def total; end
+end
+
+# pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:631
+module SemanticLogger::Reporters; end
+
+# When using Minitest to run tests, log start and end messages for every test to the log file.
+# On completion the time it took to run the test is also logged.
+#
+# For example, add the following lines to `test_helper.rb`:
+# require 'minitest/reporters'
+#
+# reporters = [
+# Minitest::Reporters::ProgressReporter.new,
+# SemanticLogger::Reporters::Minitest.new
+# ]
+# Minitest::Reporters.use!(reporters)
+#
+# And add `gem minitest-reporters` to the Gemfile.
+#
+# Log entries similar to the following should show up in the log file:
+#
+# 2019-02-06 18:58:17.522467 I [84730:70256] Minitest -- START MyJob test_0001_archives file
+# 2019-02-06 18:58:17.527492 I [84730:70256] (4.980ms) Minitest -- PASS MyJob test_0001_archives file
+# 2019-02-06 18:58:17.527835 I [84730:70256] Minitest -- START MyJob test_0002_returns job class
+# 2019-02-06 18:58:17.529761 I [84730:70256] (1.882ms) Minitest -- PASS MyJob test_0002_returns job class
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/reporters/minitest.rb:23
+class SemanticLogger::Reporters::Minitest < ::Minitest::AbstractReporter
+ include ::SemanticLogger::Loggable
+ extend ::SemanticLogger::Loggable::ClassMethods
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/reporters/minitest.rb:34
+ def after_test(test); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/reporters/minitest.rb:30
+ def before_test(test); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/reporters/minitest.rb:28
+ def io; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/reporters/minitest.rb:28
+ def io=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/reporters/minitest.rb:24
+ def logger; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/reporters/minitest.rb:24
+ def logger=(logger); end
+
+ class << self
+ # pkg:gem/semantic_logger#lib/semantic_logger/reporters/minitest.rb:24
+ def logger; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/reporters/minitest.rb:24
+ def logger=(logger); end
+ end
+end
+
+# pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:5
+class SemanticLogger::Subscriber < ::SemanticLogger::Base
+ # Initializer for Abstract Class SemanticLogger::Subscriber
+ #
+ # Parameters
+ # level: [:trace | :debug | :info | :warn | :error | :fatal]
+ # Override the log level for this subscriber.
+ #
+ # formatter: [Object|Proc]
+ # An instance of a class that implements #call, or a Proc to be used to format
+ # the output from this subscriber
+ # Default: Use the built-in formatter (See: #call)
+ #
+ # filter: [Regexp|Proc]
+ # RegExp: Only include log messages where the class name matches the supplied.
+ # regular expression. All other messages will be ignored.
+ # Proc: Only include log messages where the supplied Proc returns true
+ # The Proc must return true or false.
+ #
+ # application: [String]
+ # Name of this application to appear in log messages.
+ # Default: SemanticLogger.application
+ #
+ # host: [String]
+ # Name of this host to appear in log messages.
+ # Default: SemanticLogger.host
+ #
+ # metrics: [Boolean]
+ # Whether to log metric only entries with this subscriber.
+ # Default: false
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:208
+ def initialize(level: T.unsafe(nil), formatter: T.unsafe(nil), filter: T.unsafe(nil), application: T.unsafe(nil), environment: T.unsafe(nil), host: T.unsafe(nil), metrics: T.unsafe(nil), &block); end
+
+ # Allow application name to be set globally or on a per subscriber basis.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:31
+ def application; end
+
+ # Allow application name to be set globally or on a per subscriber basis.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:8
+ def application=(_arg0); end
+
+ # Whether #batch writes none of the log messages when it raises a message error (see
+ # #message_error?), for example because it formats every message before sending any.
+ #
+ # When true, a batch that fails with a message error is split up and each part retried,
+ # so that only the offending message is discarded. When false, retrying could write some
+ # messages twice, so the whole batch is discarded instead.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:138
+ def batch_all_or_nothing?; end
+
+ # Whether an appender that implements #batch should be wrapped in a batch
+ # proxy automatically. Appenders that support batching but should only batch
+ # when explicitly requested (via `batch: true`) override this to return false.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:105
+ def batch_by_default?; end
+
+ # A subscriber should implement close if it can.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:16
+ def close; end
+
+ # Whether this appender is logging to stdout or stderr.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:78
+ def console_output?; end
+
+ # The console stream this appender writes to, if any.
+ # Returns one of :stdout, :stderr, or nil when not writing to a console stream.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:73
+ def console_stream; end
+
+ # Returns [SemanticLogger::Formatters::Default] default formatter for this subscriber.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:26
+ def default_formatter; end
+
+ # Allow environment name to be set globally or on a per subscriber basis.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:36
+ def environment; end
+
+ # Allow environment name to be set globally or on a per subscriber basis.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:8
+ def environment=(_arg0); end
+
+ # A subscriber should implement flush if it can.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:11
+ def flush; end
+
+ # Every appender has its own formatter
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:7
+ def formatter; end
+
+ # Set the formatter from Symbol|Hash|Block
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:57
+ def formatter=(formatter); end
+
+ # Allow host name to be set globally or on a per subscriber basis.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:41
+ def host; end
+
+ # Allow host name to be set globally or on a per subscriber basis.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:8
+ def host=(_arg0); end
+
+ # Returns [String] the class and object address of this appender, like Kernel#inspect, followed
+ # by #inspect_details, but none of its instance variables.
+ #
+ # Appenders hold credentials in their instance variables: passwords and urls holding them, api
+ # keys and tokens, request headers, private keys, and the options passed to a client gem.
+ # Printing SemanticLogger.appenders, for example in a console or an error report, must not
+ # show them.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:89
+ def inspect; end
+
+ # Returns [String] what #inspect shows about this appender, such as its url without its
+ # credentials, or nil for nothing. Only an appender knows which of its settings are safe to
+ # show, so each one overrides this.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:98
+ def inspect_details; end
+
+ # Method called to log an event
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:21
+ def log(log); end
+
+ # Give each appender its own logger for logging.
+ # For example trace messages sent to services or errors when something fails.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:47
+ def logger; end
+
+ # Give each appender its own logger for logging.
+ # For example trace messages sent to services or errors when something fails.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:8
+ def logger=(_arg0); end
+
+ # Whether the supplied exception, raised by #log or #batch, was caused by the content of a
+ # log message, rather than by the destination, for example being unavailable.
+ #
+ # Retrying cannot write such a message, so an asynchronous appender discards it and carries
+ # on, instead of backing off and retrying. Any other exception is retried with a back-off.
+ #
+ # Every error raised by the formatter is one (see #format_log). An appender whose client
+ # raises its own errors for bad content can override this to recognize them.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:128
+ def message_error?(exception); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:8
+ def metrics=(_arg0); end
+
+ # Whether this log entry meets the criteria to be logged by this appender.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:67
+ def should_log?(log); end
+
+ private
+
+ # Without a level of its own, a subscriber logs everything it receives.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:222
+ def fallback_level; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:226
+ def fallback_level_index; end
+
+ # Returns the log messages formatted by the formatter's #batch, as for #format_log.
+ #
+ # A formatter that cannot format a batch is a configuration error rather than bad content, so
+ # it raises ArgumentError instead, which is retried with a back-off and reported like any
+ # other. That includes an appender that is its own formatter (it implements #call), whose
+ # #batch is the appender's own.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:168
+ def format_batch(logs); end
+
+ # Returns the log message formatted by this appender's formatter.
+ #
+ # Any StandardError the formatter raises is raised as a FormatError, with the formatter's
+ # error as its cause, so that #message_error? recognizes it: an asynchronous appender then
+ # discards the message instead of backing off. Appenders call this rather than formatter.call.
+ #
+ # A SystemStackError is raised as it is, so that rescuing StandardError does not swallow it:
+ # the thread that overflowed must not keep writing (see Appenders#log).
+ #
+ # The block, when given, turns the formatter's output into what the appender sends, such as
+ # its JSON. An error doing so is also caused by the content of the message.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:155
+ def format_log(log); end
+
+ # Whether to log metric only entries with this subscriber
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:231
+ def metrics?; end
+end
+
+# Raised by #format_log and #format_batch when the formatter fails, with the formatter's
+# error as its cause. A formatter has no destination, so it can only fail because of the
+# content of the log message, whatever it raises.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:112
+class SemanticLogger::Subscriber::FormatError < ::StandardError; end
+
+# Errors raised by writing a log message whose content cannot be written, such as a
+# value that cannot be serialized. Excludes JSON::ParserError, which comes from parsing a
+# response rather than from the message, except its subclass JSON::NestingError, which
+# JSON.generate raises for a value nested too deeply.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/subscriber.rb:118
+SemanticLogger::Subscriber::MESSAGE_ERRORS = T.let(T.unsafe(nil), Array)
+
+# The SyncProcessor performs logging in the current thread.
+#
+# Appenders are designed to only be used by one thread at a time, so all calls
+# are monitor protected in case SyncProcessor is being used in a multi-threaded environment.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/sync_processor.rb:6
+class SemanticLogger::SyncProcessor
+ # pkg:gem/semantic_logger#lib/semantic_logger/sync_processor.rb:81
+ def initialize(appenders = T.unsafe(nil)); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/sync_processor.rb:7
+ def add(*, **, &); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/sync_processor.rb:73
+ def appenders; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/sync_processor.rb:45
+ def close; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/sync_processor.rb:41
+ def flush; end
+
+ # Logs on the calling thread, which belongs to the application, so a stack overflow while
+ # writing (see Appenders#log) is reported rather than raised from the log call.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/sync_processor.rb:13
+ def log(*, **, &); end
+
+ # Returns the internal logger of the appenders, for reporting a problem while logging, such as
+ # an exception raised by an on_log subscriber. The same logger as the asynchronous Processor's.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/sync_processor.rb:77
+ def logger; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/sync_processor.rb:49
+ def reopen(*args); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/sync_processor.rb:87
+ def start; end
+
+ # Returns [Hash] operational statistics for the logging pipeline.
+ #
+ # In synchronous mode there is no queue: messages are written inline on the calling
+ # thread, so queue_size is always 0 and no messages can be dropped.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/sync_processor.rb:27
+ def stats; end
+
+ class << self
+ # Internal logger for SemanticLogger
+ # For example when an appender is not working etc..
+ # By default logs to $stderr
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/sync_processor.rb:64
+ def logger; end
+
+ # Internal logger for SemanticLogger
+ # For example when an appender is not working etc..
+ # By default logs to $stderr
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/sync_processor.rb:58
+ def logger=(_arg0); end
+ end
+end
+
+# pkg:gem/semantic_logger#lib/semantic_logger/semantic_logger.rb:635
+module SemanticLogger::Test; end
+
+# Logging class to captures all logging events in memory.
+#
+# Example:
+#
+# class UserTest < ActiveSupport::TestCase
+# describe User do
+# let(:logger) { SemanticLogger::Test::CaptureLogEvents.new }
+# let(:user) { User.new }
+#
+# it "logs message" do
+# user.stub(:logger, logger) do
+# user.enable!
+# end
+# assert log = logger.events.first
+# assert_equal "Hello World", log.message
+# assert_equal :info, log.level
+# end
+# end
+# end
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/test/capture_log_events.rb:22
+class SemanticLogger::Test::CaptureLogEvents < ::SemanticLogger::Subscriber
+ # By default collect all log levels, and collect metric only log events.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/test/capture_log_events.rb:26
+ def initialize(level: T.unsafe(nil), metrics: T.unsafe(nil)); end
+
+ # Supports batching of log events
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/test/capture_log_events.rb:37
+ def batch(logs); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/test/capture_log_events.rb:41
+ def clear; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/test/capture_log_events.rb:23
+ def events; end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/test/capture_log_events.rb:23
+ def events=(_arg0); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/test/capture_log_events.rb:31
+ def log(log); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/test/capture_log_events.rb:45
+ def to_h; end
+
+ private
+
+ # Without a level of its own, follow the global default level the way a logger does,
+ # so that `SemanticLogger.silence` applies.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/test/capture_log_events.rb:53
+ def fallback_level_index; end
+end
+
+# pkg:gem/semantic_logger#lib/semantic_logger/test/minitest.rb:3
+module SemanticLogger::Test::Minitest
+ # Verify a single log event has all the required attributes.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/test/minitest.rb:24
+ def assert_semantic_logger_event(event, level: T.unsafe(nil), name: T.unsafe(nil), message: T.unsafe(nil), message_includes: T.unsafe(nil), payload: T.unsafe(nil), payload_includes: T.unsafe(nil), exception: T.unsafe(nil), exception_includes: T.unsafe(nil), backtrace: T.unsafe(nil), thread_name: T.unsafe(nil), tags: T.unsafe(nil), named_tags: T.unsafe(nil), context: T.unsafe(nil), level_index: T.unsafe(nil), duration: T.unsafe(nil), time: T.unsafe(nil), metric: T.unsafe(nil), metric_amount: T.unsafe(nil), dimensions: T.unsafe(nil)); end
+
+ # Returns [Array] the log events from Semantic Logger
+ # captured whilst executing the supplied block.
+ #
+ # Notes:
+ # - All log messages are returned regardless of the global default log level.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/test/minitest.rb:9
+ def semantic_logger_events(deprecated_klass = T.unsafe(nil), klass: T.unsafe(nil), silence: T.unsafe(nil), &block); end
+
+ private
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/test/minitest.rb:76
+ def assert_semantic_logger_entry(event, name, expected, actual = T.unsafe(nil)); end
+end
+
+# Internal-use only utility functions for Semantic Logger.
+# Not intended for public use.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:7
+module SemanticLogger::Utils
+ class << self
+ # Borrow from Rails, when not running Rails
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:62
+ def camelize(term); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:8
+ def constantize_symbol(symbol, namespace = T.unsafe(nil)); end
+
+ # Returns a copy of the supplied value with every String converted to valid UTF-8.
+ #
+ # Recurses through Hash and Array structures, cleansing both keys and values.
+ # Strings that are already valid UTF-8 are returned unchanged (the common case),
+ # so the fast path allocates nothing. Any other value (Symbol, Numeric, Time, nil,
+ # ...) is returned as-is.
+ #
+ # Used by .to_json on the rare failing path, and directly by formatters that
+ # serialize per value or emit to a non-JSON sink (where a single `.to_json`
+ # rescue boundary cannot catch an intermediate failure).
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:350
+ def encode_utf8(value); end
+
+ # Returns the string converted to valid UTF-8, dropping any invalid bytes.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:371
+ def encode_utf8_string(string); end
+
+ # Extract the backtrace stripping off the leading semantic logger entries.
+ # Leaves all other system and gem path entries in place.
+ # Returns a new Array, leaving the supplied stack unchanged since it can belong to the caller.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:85
+ def extract_backtrace(stack = T.unsafe(nil)); end
+
+ # Whether this path should be excluded from any cleansed backtrace
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:94
+ def extract_path?(path); end
+
+ # pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:89
+ def extract_paths; end
+
+ # Returns the value when JSON writes it as it is, otherwise a .json_safe copy, for a writer
+ # that serializes the value itself, such as GELF. The check costs one #to_json; only the
+ # rare value that needs repairing is copied.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:159
+ def json_ready(value); end
+
+ # Returns a copy of the supplied value that JSON can represent:
+ # * Every String is converted to valid UTF-8, as by .encode_utf8.
+ # * Infinity and NaN floats become the Strings "Infinity", "-Infinity", and "NaN".
+ # * A Struct, Data, or OpenStruct instance becomes a Hash of its members (from #to_h),
+ # and a Set an Array, as ActiveSupport's #as_json does, so that its members follow
+ # these same rules.
+ # * A Hash key that is itself a structure becomes the JSON of its copy, since JSON writes a
+ # key with #to_s, which for a structure is its #inspect.
+ # * Any other object whose JSON raises because of invalid UTF-8, such as an exception
+ # message or a Pathname built from an uploaded file name, becomes its #to_s converted to
+ # valid UTF-8.
+ # * A Hash, Array, Set, Struct, or Data nested deeper than MAX_JSON_SAFE_DEPTH is replaced
+ # with a placeholder String naming its class, such as "#".
+ # So is one that holds itself, at the point where it would repeat.
+ # Any other value is returned as-is.
+ #
+ # The recursion never goes deeper than MAX_JSON_SAFE_DEPTH, and the placeholder does
+ # not look inside the structure it replaces. Rendering it instead (for example with
+ # #inspect) would recurse without limit through an arbitrarily deep structure,
+ # raising SystemStackError (or crashing Ruby) on the appender's thread, and would
+ # expose the instance variables of any object inside it. Ending a self-referencing
+ # structure where it repeats, rather than at that depth, keeps one that holds itself
+ # more than once from being copied an exponential number of times.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:277
+ def json_safe(value, depth = T.unsafe(nil), ancestors = T.unsafe(nil)); end
+
+ # Returns the visibility for an instance method
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:71
+ def method_visibility(mod, method_name); end
+
+ # Returns [true|false] whether the value holds a Hash, Array, Struct, or Data nested deeper
+ # than MAX_JSON_SAFE_DEPTH, which .json_safe would replace with a placeholder. Never recurses
+ # deeper than that itself, and follows the same rules as .json_safe.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:207
+ def nested_too_deeply?(value, depth = T.unsafe(nil)); end
+
+ # Returns [URI] the parsed url, supplied as the named option.
+ #
+ # Raises URI::InvalidURIError for an invalid url, including nil, as .without_url_in_errors does.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:32
+ def parse_url(url, option: T.unsafe(nil), hint: T.unsafe(nil)); end
+
+ # Returns [String] the scheme, host, and any non-default port of the url, which is safe to log.
+ #
+ # Everything else is left out, since log services carry credentials in each part of a url: the
+ # user and password, the query string (for example a Datadog api key), and the path (for example
+ # the token at the end of a Sumo Logic HTTP source url). An invalid url is not shown at all.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:53
+ def redacted_url(url); end
+
+ # Returns [String] value#inspect, or what the block renders the value as (for example with
+ # Amazing Print), without overflowing the stack for a value nested too deeply.
+ #
+ # #inspect has no depth limit: a Hash a few hundred levels deep overflows the stack of a
+ # thread. Rescuing the SystemStackError is not enough, since on macOS a second such overflow
+ # on the same thread crashes Ruby instead. A value that holds a structure nested deeper than
+ # MAX_JSON_SAFE_DEPTH is therefore rendered from a .json_safe copy, as the JSON formatters
+ # write it, cut off at that depth with their placeholder. Only that case pays for the copy.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:199
+ def safe_inspect(value); end
+
+ # Try to strip everything off of the supplied backtrace, until the first application stack entry is at the top.
+ # For example all leading gem paths and built-in ruby code paths are removed from the top.
+ # Once the first application entry is found, the remaining stack is returned.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:101
+ def strip_backtrace(stack = T.unsafe(nil)); end
+
+ # Whether this path should be excluded from any cleansed backtrace
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:120
+ def strip_path?(path); end
+
+ # Paths to exclude in the stripped backtrace
+ # Includes Gems and built-in Ruby code paths
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:110
+ def strip_paths; end
+
+ # Returns [true|false] whether .json_safe writes the value as a JSON object or array: a Hash,
+ # Array, Set, Struct, Data, or OpenStruct. Every one of them would otherwise be written by its
+ # #to_s, which is its #inspect.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:237
+ def structure?(value); end
+
+ # Serializes the value to JSON, repairing the data only when necessary.
+ #
+ # Data that JSON cannot represent appears in well under 1% of log events, so it
+ # is wasteful to walk and reallocate the entire structure (see .json_safe) on
+ # every call. Instead this attempts `.to_json` directly and only falls back to a
+ # repaired copy when serialization fails because of the data:
+ # * Invalid UTF-8. Depending on the json gem version this raises
+ # Encoding::UndefinedConversionError (an EncodingError) or JSON::GeneratorError.
+ # * Infinity and NaN, which raise JSON::GeneratorError.
+ # * Structures nested deeper than the json gem allows, which raise
+ # JSON::NestingError (a JSON::ParserError, not a GeneratorError).
+ # * A Struct, Data, Set, or OpenStruct instance. The json gem writes one as the String
+ # returned by its #to_s, which for each is #inspect: every member is written with
+ # #inspect, exposing the instance variables of any object it holds, and without a
+ # depth limit, so a deep enough structure raises SystemStackError. The output is
+ # checked for that rendering (a JSON String starting with "#<", or "Set[" for a Set on
+ # Ruby 4.0), and SystemStackError is rescued, so .json_safe can write the members as a JSON object
+ # or array instead. The json gem offers no hook for these short of strict mode,
+ # which also rejects common values such as Time, and finding one up front would mean
+ # walking every payload on the hot path. ActiveSupport already writes them through
+ # #as_json, and escapes "<", so its output never matches the check.
+ #
+ # Log data can come from untrusted input, for example a float parsed from a request
+ # parameter or a deeply nested request body. Without the repair, such a value would
+ # make the whole log event impossible to serialize, and so silently dropped.
+ #
+ # The retry is attempted only once: if it still fails (for example an object whose
+ # own #to_json raises), the error propagates unchanged rather than being swallowed.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:152
+ def to_json(value); end
+
+ # Returns the result of the block, which uses the url supplied as the named option, for example
+ # to build a client gem's connection.
+ #
+ # Raises any of the errors from the block again, of the same class, without the url in its
+ # message, or as its cause, since a url can hold a user and password, or a token in its path or
+ # query string, and URI and client gems put the url in the error for an invalid one.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:42
+ def without_url_in_errors(option: T.unsafe(nil), hint: T.unsafe(nil), errors: T.unsafe(nil)); end
+
+ private
+
+ # Returns [String] the value's JSON, or nil when .to_json has to repair the data.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:164
+ def clean_json(value); end
+
+ # Returns a copy of the elements of a Hash, Array, Set, Struct, or Data, each made safe
+ # by .json_safe at the supplied depth.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:321
+ def json_safe_members(value, depth, ancestors); end
+
+ # Returns any other object as it is, when JSON can write it, otherwise its #to_s converted
+ # to valid UTF-8.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:311
+ def json_safe_object(value); end
+
+ # Returns a copy of a Hash, Array, Set, Struct, Data, or OpenStruct, or the placeholder for
+ # one nested too deeply or that holds itself.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:294
+ def json_safe_structure(value, depth, ancestors); end
+
+ # Whether the members of a Struct, Data, or OpenStruct are nested too deeply. As in
+ # .json_safe_members, a #to_h that does not return a Hash is one level deeper.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:226
+ def members_nested_too_deeply?(value, depth); end
+
+ # Whether the value is an OpenStruct. The ostruct gem is only loaded by the application, and
+ # is a bundled gem since Ruby 4.0, so Semantic Logger never requires it.
+ #
+ # pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:248
+ def open_struct?(value); end
+ end
+end
+
+# Options used when transcoding a string to UTF-8.
+# Invalid byte sequences and characters that cannot be represented in UTF-8 are
+# dropped rather than substituted, matching the preference in issue #180.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:368
+SemanticLogger::Utils::ENCODE_UTF8_OPTIONS = T.let(T.unsafe(nil), Hash)
+
+# How the json gem writes an object through its #to_s: a JSON String starting with "#<", as
+# for a Struct, Data, Set, or OpenStruct, whose #to_s is its #inspect.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:180
+SemanticLogger::Utils::INSPECTED_OBJECT = T.let(T.unsafe(nil), String)
+
+# How the json gem writes a Set where Set#inspect is "Set[...]" (Ruby 4.0), which holds no
+# "#<" unless the Set holds an object. Nil where Set#inspect starts with "#<" too.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:184
+SemanticLogger::Utils::INSPECTED_SET = T.let(T.unsafe(nil), T.untyped)
+
+# Nesting depth after which .json_safe replaces a Hash, Array, Struct, or Data with a
+# placeholder. Well below the json gem's default max_nesting of 100, leaving room for
+# the levels that a formatter wraps the payload in.
+#
+# pkg:gem/semantic_logger#lib/semantic_logger/utils.rb:189
+SemanticLogger::Utils::MAX_JSON_SAFE_DEPTH = T.let(T.unsafe(nil), Integer)
+
+# pkg:gem/semantic_logger#lib/semantic_logger/version.rb:2
+SemanticLogger::VERSION = T.let(T.unsafe(nil), String)
diff --git a/test/log_struct/semantic_logger_test.rb b/test/log_struct/semantic_logger_test.rb
index b57eba6..78dbd86 100644
--- a/test/log_struct/semantic_logger_test.rb
+++ b/test/log_struct/semantic_logger_test.rb
@@ -215,6 +215,18 @@ class SemanticLoggerTest < ActiveSupport::TestCase
reader&.close
end
+ test "reopens after a fork only when SemanticLogger doesn't" do
+ LogStruct::SemanticLogger::ReopenAfterFork.install!
+ ancestors = Process.singleton_class.ancestors
+ hook = LogStruct::SemanticLogger::ReopenAfterFork::ForkHook
+
+ if ::SemanticLogger.respond_to?(:reopen_on_fork?)
+ refute_includes ancestors, hook
+ else
+ assert_includes ancestors, hook
+ end
+ end
+
test "logs plain messages through SemanticLogger" do
@logger.info("Test message")
::SemanticLogger.flush
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 77b9d1b..daee11e 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -24,6 +24,7 @@
end
require "minitest/autorun"
+require "minitest/mock"
require "minitest/reporters"
require "climate_control"