Documentation
TebexDiscordYouTubeGitHub
  • Introduction
  • FIVEM FREE RESOURCES
    • BDSC
      • Guides
        • Core Setup
          • Installing BDSC
          • Configuring BDSC
        • Plugin Development
          • What is a Plugin?
          • Plugin Structure
          • Extending Player Objects
      • API
        • Functions
          • Player
          • Server
          • Client
          • Shared
        • Modules
          • Player Manager
          • Buckets
          • Plugins
        • UI Components
    • boii_utils
      • Installation
      • Configuration
      • Modules
      • API
        • Callbacks
        • Characters
        • Commands
        • Cooldowns
        • Debugging
        • Entities
        • Environment
        • Framework Bridge
        • Geometry
        • Items
        • Keys
        • Licences
        • Maths
        • Methods
        • Player
        • Requests
        • Strings
        • Tables
        • Timestamps
        • UI Bridges
        • Vehicles
        • Version
        • XP
        • UI Elements
  • FIVEM PAID RESOURCES
    • Page 2
Powered by GitBook
On this page
  • Accessing the Module
  • Shared
  • get_current_time()
  • print(level, message, data?)
  1. FIVEM FREE RESOURCES
  2. boii_utils
  3. API

Debugging

The Debugging module provides lightweight logging tools with color-coded output and timestamping, useful for both client and server contexts.


Accessing the Module

local DEBUG <const> = exports.boii_utils:get("modules.debugging")

Shared

get_current_time()

Returns the current formatted time string.

Returns

Type
Description

string

Current time in "YYYY-MM-DD HH:MM:SS" format

Example

local time = DEBUG.get_current_time()
DEBUG.print("info", "Current time:", time)

print(level, message, data?)

Logs a formatted message to the console with a colored prefix and optional table data. Automatically detects and prints the name of the invoking resource.

Parameters

Name
Type
Description

level

string

The log level: debug, info, success, warn, error

message

string

The message string to print

data?

table?

Optional table to JSON encode and append to the message

Example

DEBUG.print("info", "Loading complete")
DEBUG.print("error", "Something went wrong", { code = 500, reason = "Bad request" })
PreviousCooldownsNextEntities

Last updated 2 months ago