# LogParser

Source: /tuil/docs/reference/packages/logging/api/log-parser
Locale: en

interface exported by @mwillbanks/tuil-logging.



{/* Generated by tooling/docs/generate-reference.ts. */}

## interface [#interface]

Public interface exported by `@mwillbanks/tuil-logging`.

```ts
export interface LogParser {
  readonly id: string;
  detect(input: string): number;
  parse(input: string): readonly LogRecord[];
}
```

## Members [#members]

| Member   | Type                                      | Required | Description                                                                     | Related types                                                  |
| -------- | ----------------------------------------- | -------- | ------------------------------------------------------------------------------- | -------------------------------------------------------------- |
| `id`     | `string`                                  | Yes      | The `id` member uses the `string` contract.                                     | —                                                              |
| `detect` | `(input: string) => number`               | Yes      | The `detect` member uses the `(input: string) => number` contract.              | —                                                              |
| `parse`  | `(input: string) => readonly LogRecord[]` | Yes      | The `parse` member uses the `(input: string) => readonly LogRecord[]` contract. | [`LogRecord`](/tuil/docs/reference/packages/logging/api/log-record) |

## Parameters [#parameters]

This declaration has no public members.

## Returns [#returns]

This declaration does not return a value.

## Throws [#throws]

No thrown errors are documented for this declaration.

## Related types [#related-types]

* [`LogRecord`](/tuil/docs/reference/packages/logging/api/log-record)

## Source [#source]

[View the secondary source reference](https://github.com/mwillbanks/tuil/blob/main/packages/logging/src/index.ts)

## Package [#package]

[@mwillbanks/tuil-logging](/tuil/docs/reference/packages/logging)
