g3log

G3log is an asynchronous, "crash safe", logger that is easy to use with default logging sinks or you can add your own. G3log is made with plain C++14 (C++11 support up to release 1.3.2) with no external libraries (except gtest used for unit tests). G3log is made to be cross-platform, currently running on OSX, Windows and several Linux distros. See Readme below for details of usage.

Latest version: 2.6

Add to xmake.lua

add_requires("g3log 2.6")

Learn how to add and link packages with Xmake →

Information

License
Unlicense
Recipe updated
2025-06-20T03:41:07.000Z

Platforms

  • linux: i386, x86_64, armv7, armv7s, arm64, mips, mips64, mipsel, mips64el, loong64, riscv64, s390x, ppc, ppc64, ppc64el, sparc64
  • iphoneos: arm64, x86_64
  • macosx: x86_64, arm64
  • windows: x86, x64, arm, arm64, arm64ec

Options

debug_to_dbug
Use DBUG logging level instead of DEBUG. By default DEBUG is the debugging level · Type: boolean · Default: false
dynamic_memory
Use dynamic memory for message buffer during log capturing · Type: boolean · Default: false
fatal_signal_handling
Vectored exception / crash handling with improved stack trace · Type: boolean · Default: true
full_filename
Log full filename · Type: boolean · Default: false
funcsig
Windows __FUNCSIG__ to expand `Function` location of the LOG call instead of the default __FUNCTION__ · Type: boolean · Default: false
ios
iOS version of library. · Type: boolean · Default: false
log_level
Turn ON/OFF log levels. An disabled level will not push logs of that level to the sink. By default dynamic logging is disabled · Type: boolean · Default: false
pretty_function
Windows __PRETTY_FUNCTION__ to expand `Function` location of the LOG call instead of the default __FUNCTION__ · Type: boolean · Default: false

Versions

  • 2.3
  • 2.4
  • 2.6

Dependencies

Install with xrepo

Install the package independently of a project and inspect its available configuration.

install

xrepo install "g3log 2.6"

show info

xrepo info "g3log"

Link a library to your target

Declare the requirement, then attach the library to the target that uses it.

xmake.lua

add_requires("g3log 2.6")

target("demo")
    set_kind("binary")
    add_files("src/*.cpp")
    add_packages("g3log")

Open a package environment

Open a shell with the environment exported by this package. Use the executable names documented by the package.

enter shell

xrepo env -b "g3log 2.6" shell