Skip to content

Commit

Permalink
Update mobile-logs.mdx for Unity
Browse files Browse the repository at this point in the history
  • Loading branch information
ndesai-newrelic authored Nov 18, 2024
1 parent e214d04 commit efc6566
Showing 1 changed file with 48 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ Keep in mind that when you use the logging APIs, you should only use the debug l
</TabsBarItem>
<TabsBarItem id="xamarin">
Xamarin
</TabsBarItem>
<TabsBarItem id="Unity">
Unity
</TabsBarItem>
<TabsBarItem id="unreal">
Unreal
Expand Down Expand Up @@ -600,6 +603,51 @@ CrossNewRelicClient.Current.LogAttributes(new Dictionary<string, object>()
{ "message", "This is a message with attributes" }
}
);
```
</TabsPageItem>
<TabsPageItem id="Unity">
### Syntax [#syntax]

```csharp
NewRelicAgent.LogInfo(String message) : void

NewRelicAgent.LogError(String message) : void

NewRelicAgent.LogVerbose(String message) : void

NewRelicAgent.LogWarning(String message) : void

NewRelicAgent.LogDebug(String message) : void

NewRelicAgent.Log(LogLevel level, String message) : void

NewRelicAgent.LogAttributes(Dictionary<string, object> attributes) : void
```


### Example [#example]

```csharp
NewRelicAgent.LogInfo("This is an informational message");

NewRelicAgent.LogError("This is an error message");

NewRelicAgent.LogVerbose("This is a verbose message");

NewRelicAgent.LogWarning("This is a warning message");

NewRelicAgent.LogDebug("This is a debug message");

NewRelicAgent.Log(LogLevel.Info, "This is an informational message");

NewRelicAgent.LogAttributes(new Dictionary<string, object>()
{
{"BreadNumValue", 12.3 },
{"BreadStrValue", "UnityBread" },
{"BreadBoolValue", true },
{"message", "This is a message with attributes" }
}
);
```

</TabsPageItem>
Expand Down

0 comments on commit efc6566

Please sign in to comment.