<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@contract-case/case-boundary](./case-boundary.md) &gt; [ILogPrinter](./case-boundary.ilogprinter.md) &gt; [log](./case-boundary.ilogprinter.log.md)

## ILogPrinter.log() method

Called by ContractCase to ask the DSL to print a log line. You do not need to filter calls to this interface, it will only be called when it is appropriate to print.

**Signature:**

```typescript
log(level: string, timestamp: string, version: string, typeString: string, location: string, message: string, additional: string): Promise<BoundaryResult>;
```

## Parameters

| Parameter  | Type   | Description                                                                                                                                                                                                                                                                                                                                     |
| ---------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| level      | string | A <code>LogLevel</code> string, either <code>error</code>, <code>warn</code>, <code>debug</code>, <code>maintainerDebug</code> or <code>deepMaintainerDebug</code> Use this to programmatically decide any colour formatting.. (although <code>none</code> is a possible log level, this function will never be called with <code>none</code>). |
| timestamp  | string | The timestamp generated by ContractCase, ready for printing. No extra formatting is necessary                                                                                                                                                                                                                                                   |
| version    | string | The version string for the current ContractCase stack (at low log levels, this is just the core version)                                                                                                                                                                                                                                        |
| typeString | string | A rendered version of the LogLevel. Do not rely on this value programmatically, use the <code>level</code> parameter instead.                                                                                                                                                                                                                   |
| location   | string | A string that represents the location that this log came from                                                                                                                                                                                                                                                                                   |
| message    | string | The main message of this log line                                                                                                                                                                                                                                                                                                               |
| additional | string | Any additional output to print on extra lines (you may want to indent this when printing)                                                                                                                                                                                                                                                       |

**Returns:**

Promise&lt;[BoundaryResult](./case-boundary.boundaryresult.md)<!-- -->&gt;

A `BoundaryResult` type indicating whether there were errors during printing. Either a BoundarySuccess for no errors, or BoundaryFailure (with error details) in the event of a failure.
