# LogFormat

> Logs a formatted message to the Unity Console.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.6/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

## LogFormat(string, Object\[])

Logs a formatted message to the Unity Console.

```csharp
public static void LogFormat(string format, params object[] args)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): A composite format string.**** (\[Object\[]]\(https\://learn.microsoft.com/dotnet/api/system.object)): Format arguments.

### Remarks

For formatting details, see the MSDN documentation on Composite Formatting. Rich text markup can be used to add emphasis. See the manual page about rich text for details of the different markup tags available.

Additional Resources: [Debug.unityLogger](/engine/6000.6/script-reference/unityengine/debug/unitylogger.md), [ILogger](/engine/6000.6/script-reference/unityengine/ilogger.md).

## LogFormat(Object, string, Object\[])

Logs a formatted message to the Unity Console.

```csharp
public static void LogFormat(Object context, string format, params object[] args)
```

### Parameters

**** (\[Object]\(/engine/6000.6/script-reference/unityengine/object)): Object to which the message applies.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): A composite format string.**** (\[Object\[]]\(https\://learn.microsoft.com/dotnet/api/system.object)): Format arguments.

### Remarks

For formatting details, see the MSDN documentation on Composite Formatting. Rich text markup can be used to add emphasis. See the manual page about rich text for details of the different markup tags available.

Additional Resources: [Debug.unityLogger](/engine/6000.6/script-reference/unityengine/debug/unitylogger.md), [ILogger](/engine/6000.6/script-reference/unityengine/ilogger.md).

## LogFormat(LogType, LogOption, Object, string, Object\[])

Logs a formatted message to the Unity Console.

```csharp
public static void LogFormat(LogType logType, LogOption logOptions, Object context, string format, params object[] args)
```

### Parameters

**** (\[LogType]\(/engine/6000.6/script-reference/unityengine/logtype)): Type of message e.g. warn or error etc.**** (\[LogOption]\(/engine/6000.6/script-reference/unityengine/logoption)): Option flags to treat the log message special.**** (\[Object]\(/engine/6000.6/script-reference/unityengine/object)): Object to which the message applies.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): A composite format string.**** (\[Object\[]]\(https\://learn.microsoft.com/dotnet/api/system.object)): Format arguments.

### Remarks

For formatting details, see the MSDN documentation on Composite Formatting. Rich text markup can be used to add emphasis. See the manual page about rich text for details of the different markup tags available.

Additional Resources: [Debug.unityLogger](/engine/6000.6/script-reference/unityengine/debug/unitylogger.md), [ILogger](/engine/6000.6/script-reference/unityengine/ilogger.md).
