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
  • pharos.LogBuilder
  • getInstance()
  • type(String value)
  • summary(String value)
  • details(String value)
  • category(String value)
  • stackTrace(String value)
  • area(String value)
  • postProcessing(String settingsJSON)
  • transactionId(String value)
  • createIssue()
  • attribute(String field, Object value)
  • build()
  1. Methods Reference
  2. Apex

LogBuilder

Triton utilizes the builder design pattern to enable a quick and easy-to-read log creation routine.

PreviousPostProcessingControlsBuilderNextLWC

Last updated 4 months ago

pharos.LogBuilder

This is a global managed class provided with the Pharos managed package. These methods aren't accessible for editing locally. For an overview of the builder class please refer to .

This class is used by that provides an abstraction layer over this managed class. The documentation here is provided mostly just for reference. For all practical purposes you can skip this class go straight to .

getInstance()

global static LogBuilder getInstance()

This is a static method to create a new instance of the builder. Note that this is the only option to instantiate the builder class as the constructor is private.

type(String value)

global LogBuilder type(String value)

This method sets the type value on the log record (see ).

summary(String value)

global LogBuilder summary(String value)

This method sets the summary value on the log record. Summary will be truncated automatically to 255 characters as necessary.

details(String value)

global LogBuilder details(String value)

This method sets the details value on the log record.

category(String value)

global LogBuilder category(String value)

stackTrace(String value)

global LogBuilder stackTrace(String value)

This method sets the stack trace on the log record. Pharos will use this value to render a graphical stack trace for Apex code. For everything else, a text representation of the stack trace will be provided.

area(String value)

global LogBuilder area(String value)

postProcessing(String settingsJSON)

global LogBuilder postProcessing(String settingsJSON)

transactionId(String value)

global LogBuilder transactionId(String value)

This method sets the transaction Id on a log record.

createIssue()

global LogBuilder createIssue()

Calling this method will signal to Pharos to create an Issue from this log record. By default, no Issue records are created for custom logs.

attribute(String field, Object value)

global LogBuilder attribute(String field, Object value)

build()

global pharos__Log__c build()

This method sets the category value on the log record (see ).

This method sets the area (functional area) value on the log record (see ).

This method sets the post processing controls that signal to Pharos the types of post processing to perform on a log record. Use the to build the settings and serialize them to JSON.

This methods set any field on a log record to the specified value. Please refer to for more details.

This methods will return the final log record. Call this method once you've set all the attributes. The output of this method can be provided to the .

📖
📔
logging methods
PostProcessingControlsBuilder
TritonBuilder
TritonBuilder
this section
Type enum
Category enum
Area enum
this section