Skip to content

A fork of the popular dotnet logging Library Serilog, to provide compatibility with FiveM

License

Notifications You must be signed in to change notification settings

Twinki14/CitizenFX.Extensions.Client.Serilog

 
 

Repository files navigation

CitizenFX.Extensions.Client.Serilog

Downloads GitHub release Nuget GitHub Workflow Status

A fork of the logging library known as Serilog, based off v2.12.0 for compatability with .NET client-side FiveM

Example

public class Script : BaseScript
{
    public Script()
    {
        Log.Logger = new LoggerConfiguration()
            .MinimumLevel.Debug()
            .WriteTo.FiveM()
            .CreateLogger();
    }
    
    [Command("client")]
    public void Command()
    {
        try
        {
            Log.Logger.Debug("Hello from the FiveM Client!");
            
            Log.Logger.Information("Player is located at {Position}", Game.Player.Character.Position.ToString());
        }
        catch (Exception e)
        {
            Log.Logger.Error(e, "Exception hit!");
        }
    }
}

Changes from v2.12.0 of Serilog

v2.12.0-cfx

  • #1 - Trim files, remove assembly signing, only target net452
  • #2 - Add CI/CD proceeded by fix in #4
  • #3 - Remove extra performance tests & results, this just bloated things for the purpose of this fork
  • #5 - Un-yield yield return and yield break uses
  • #6 - Add get set to PropertyToken._position
  • #7 - Add FiveM Client Console Sink

Notes

  • This fork is in NO WAY affiliated with the Serilog Organization or the Serilog project, it's purely a fork to provide compatability with FiveM's client-resource shipped mono
  • This fork ONLY PROVIDES support for incompatibilities with .NET client-side FiveM, if there's an incompatibility report it here

About

A fork of the popular dotnet logging Library Serilog, to provide compatibility with FiveM

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • C# 100.0%