Pharos Triton
  • 🔱About Pharos Triton
  • 🏁Installing Pharos Triton
  • Apex Logging Basics
  • Common Apex Usage Patters
    • Batch Logging
    • Integration Logs
    • Apex Rest Logging
    • Full Control with TritonBuilder
  • Beyond Apex
    • LWC
    • 🔄LWC Transaction Management
    • ⚡LWC and Apex
    • 💾Platform Cache for Transactions
    • Flows
    • 〰️LWC, Apex and Flows
  • 📖Methods Reference
    • 📔Apex
      • Triton
      • TritonBuilder
      • TritonTypes
      • TritonLwc
        • ComponentLog
        • Component
        • Error
        • RuntimeInfo
      • TritonFlow
        • FlowLog
      • TritonHelper
        • PostProcessingControlsBuilder
      • LogBuilder
    • LWC
      • Triton
      • TritonBuilder
      • TritonUtils
  • Help and Support
Powered by GitBook
On this page
  • File Index
  • Context-Specific Components
  • Utility Components
  • Runtime Information Components
  1. Methods Reference

Apex

This article covers the base Apex methods you'll need to create log records.

PreviousLWC, Apex and FlowsNextTriton

Last updated 2 months ago

File Index

The main class that provides the core logging functionality:

  • Implements singleton pattern for logging instance management

  • Handles buffered and immediate logging options

  • Manages transaction tracking across contexts

  • Provides methods for different logging levels (ERROR, WARNING, DEBUG, INFO)

  • Supports integration error logging with HTTP request/response details

  • Configurable log levels via Custom Metadata

A builder class that provides a fluent interface for creating log records:

  • Wraps the core pharos.LogBuilder to provide a user-friendly API

  • Handles setting of various log attributes (category, type, area, etc.)

  • Manages related objects and metadata

  • Supports integration payload formatting

  • Handles transaction IDs and user context

Defines the classification system and enums used throughout the framework:

  • Area: Functional areas from a business perspective (e.g., OpportunityManagement, RestAPI)

  • Category: High-level classification (e.g., Apex, Flow, Integration)

  • Level: Log severity levels (ERROR to FINEST)

  • Type: Technical classification (e.g., Backend, Frontend, DMLResult)

Context-Specific Components

Provides logging capabilities specifically for Lightning Web Components:

  • Exposes AuraEnabled methods for LWC logging

  • Handles component context capture

  • Manages error details and stack traces

  • Captures detailed runtime information (performance, memory, network)

  • Supports transaction management

Enables logging from Salesforce Flows and Process Builder:

  • Provides invocable methods for Flow Builder

  • Handles Flow context capture (Interview GUID, Flow API Name)

  • Supports custom field mapping through JSON

  • Manages automatic transaction tracking

  • Validates and defaults log levels and categories

Utility Components

Provides utility methods and builder classes:

  • Log level management and comparison

  • UUID generation for transaction tracking

  • HTTP request/response JSON serialization

  • Transaction caching functionality

  • Message formatting utilities

  • Runtime information formatting

  • Stack trace processing

Runtime Information Components

Captures detailed runtime information from Lightning Web Components:

  • Environment details (user agent, platform, language)

  • Performance metrics (page load time, DOM events, paint times)

  • Memory usage statistics

  • Network information (connection type, speed, RTT)

  • Device characteristics (form factor, screen dimensions)

  • Navigation context (pathname, hostname)

📖
📔
Triton.cls
TritonBuilder.cls
TritonTypes.cls
TritonLwc.cls
TritonFlow.cls
TritonHelper.cls
RuntimeInfo (in TritonLwc)