---
editLink: false
lastUpdated: false
---

[@salesforce/b2c-tooling-sdk](../../../modules.md) / [operations/logs](../index.md) / parseLogEntry

# Function: parseLogEntry()

> **parseLogEntry**(`firstLine`, `file`, `fullMessage`, `pathNormalizer?`): [`LogEntry`](../interfaces/LogEntry.md)

Defined in: [packages/b2c-tooling-sdk/src/operations/logs/tail.ts:56](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/e7c16f1ae423da0aa47b3e10be88f9770b53619b/packages/b2c-tooling-sdk/src/operations/logs/tail.ts#L56)

Parses the first line of a log entry to extract timestamp, level, and message.

Expected format: [timestamp GMT] LEVEL context - message
Example: [2025-01-25 10:30:45.123 GMT] ERROR PipelineCallServlet|... - Error message

The message field will contain:
- The content portion from the first line (after LEVEL)
- Plus any continuation lines (stack traces, etc.)

## Parameters

### firstLine

`string`

First line of the log entry

### file

`string`

File name the entry came from

### fullMessage

`string`

Complete raw message including all lines

### pathNormalizer?

(`msg`) => `string`

Optional function to normalize paths in the message

## Returns

[`LogEntry`](../interfaces/LogEntry.md)

Parsed log entry
