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

This branch is 17 commits ahead of, 204 commits behind serilog/serilog:dev.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

7393a3d · Dec 30, 2023
Dec 30, 2023
Dec 30, 2023
Dec 30, 2023
Dec 30, 2023
Aug 9, 2022
Apr 8, 2013
May 29, 2019
Dec 30, 2023
Aug 31, 2022
Dec 30, 2023
Oct 11, 2013
Dec 30, 2023
Dec 30, 2023
Jul 26, 2022
Dec 30, 2023

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

Languages

  • C# 100.0%