Repository navigation
LogTrait
Viames Marino edited this page Feb 23, 2026
·
1 revision
Pair\Traits\LogTrait adds convenient logging methods to classes.
log(string $description, string $type = 'notice', string $subtext = ''): voidlogError(string $description, string $subtext = ''): voidlogWarning(string $description, string $subtext = ''): voiddisableLogBar(): void
final class OrderService {
use \Pair\Traits\LogTrait;
public function run(): void {
$this->log('Order sync started');
try {
// business logic
} catch (\Throwable $e) {
$this->logError('Order sync failed', $e->getMessage());
}
}
}- Helpful in services/controllers that need structured logs with minimal boilerplate.
Maintained by Viames Marino — VM Ingegneria · Professional enquiries
Home · Setup · Configuration
Build with Pair 4
- Generator
- Controllers and responses
- Read models
- ActiveRecord and queries
- Forms and validation
- PairUI.js and HTML fragments
APIs and authentication
- API guide and CRUD
- Middleware and rate limits
- Users, sessions, and ACL
- Passkeys and social login
- Native mobile setup
Integrate and operate
- Integrations
- Runtime extensions and adapter keys
- Cache and cache stores
- Logs and observability
- PWA and push
- Packages and distribution
- Upgrade to v4