Skip to content
Viames Marino edited this page Feb 23, 2026 · 1 revision

Pair framework: LogBar

Pair\Helpers\LogBar is Pair’s request debug timeline for events, SQL queries, warnings, and errors.

Main methods

  • getInstance(): LogBar
  • event(string $description, string $type = 'notice', ?string $subtext = null): void
  • render(): string
  • canBeShown(): bool
  • disable(): void

Useful counters:

  • getErrorCount(): int
  • getWarningCount(): int
  • getQueryCount(): int

Implementation examples

Track custom event:

\Pair\Helpers\LogBar::event('Import started', 'notice');

Track slow operation:

\Pair\Helpers\LogBar::event('External API call', 'api', 'provider-x');

Render in template/layout:

echo \Pair\Helpers\LogBar::getInstance()->render();

Notes

  • DB layer automatically writes query events to LogBar.
  • Visibility depends on user permissions and options.

See also: Database, Logger, Application.

Clone this wiki locally