> For the complete documentation index, see [llms.txt](https://triton.pharos.ai/pharos-triton/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://triton.pharos.ai/pharos-triton/methods-reference/lwc.md).

# LWC

## File Index

#### [`triton.js`](https://github.com/Pharos-AI/triton-docs/blob/main/methods-reference/triton.md)

The main JavaScript class that provides core logging functionality for Lightning Web Components:

* Implements singleton pattern for logging instance management
* Manages log buffering and auto-flush mechanisms
* Handles transaction context across component lifecycle
* Provides methods for different logging levels (ERROR, WARNING, DEBUG, INFO)

#### [`tritonBuilder.js`](https://github.com/Pharos-AI/triton-docs/blob/main/methods-reference/tritonbuilder.md)

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

* Implements builder pattern for constructing log objects
* Handles setting of various log attributes (level, category, type, area)
* Manages component context and runtime information
* Supports error handling and stack trace processing

#### [`tritonUtils.js`](https://github.com/Pharos-AI/triton-docs/blob/main/methods-reference/tritonutils.md)

Provides utility functions for the logging framework:

* Stack trace analysis and component identification
* Transaction ID generation (UUID v4)
* Runtime information capture
* Component context extraction
* Error stack processing
