# 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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://triton.pharos.ai/pharos-triton/methods-reference/lwc.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
