Skip to content

Commit

Permalink
Update 3_logging.md (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
PhantomGamers authored Jun 26, 2024
1 parent 2315adc commit 729986b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions articles/dev_guide/plugin_tutorial/3_logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ Example:

```cs
using BepInEx;
using BepInEx.Logging;
using BepInEx.Unity.Mono;

namespace MyFirstPlugin;
Expand All @@ -203,7 +204,7 @@ public class Plugin : BaseUnityPlugin

private void Awake()
{
Plugin.Log = base.Logger;
Log = base.Logger;
}
}

Expand All @@ -221,6 +222,7 @@ class SomeOtherAssembly

```cs
using BepInEx;
using BepInEx.Logging;
using BepInEx.Unity.IL2CPP;

namespace MyFirstPlugin;
Expand All @@ -232,7 +234,7 @@ public class Plugin : BasePlugin

public override void Load()
{
Plugin.Log = base.Log;
Log = base.Log;
}
}

Expand All @@ -250,6 +252,7 @@ class SomeOtherAssembly

```cs
using BepInEx;
using BepInEx.Logging;
using BepInEx.NET.Common;

namespace MyFirstPlugin;
Expand All @@ -261,7 +264,7 @@ public class Plugin : BasePlugin

public override void Load()
{
Plugin.Log = base.Log;
Log = base.Log;
}
}

Expand All @@ -279,6 +282,7 @@ class SomeOtherAssembly

```cs
using BepInEx;
using BepInEx.Logging;
using BepInEx.NET.Common;

namespace MyFirstPlugin;
Expand All @@ -290,7 +294,7 @@ public class Plugin : BasePlugin

public override void Load()
{
Plugin.Log = base.Log;
Log = base.Log;
}
}

Expand Down

0 comments on commit 729986b

Please sign in to comment.