The standard console logger for every see_lib resource — four colorized levels, replaces native print().
Loading content...
The standard console logger for every see_lib resource — four colorized levels, replaces native print().
lib.print is the standard console logger for every see_lib resource — it replaces the native
print(). Four levels, each colorized, all accepting any number of arguments. Tables are auto-serialized
to pretty JSON, everything else goes through tostring().
lib.print.info('Player connected', source, playerData.name)
lib.print.warn('Unknown item', { item = 'phone_v3', count = 2 })
lib.print.error('DB query failed', err)
lib.print.debug('State update', oldValue, newValue)| Function | Prefix | When to use |
|---|---|---|
lib.print.error(...) | red [ERROR] | Failures you need to see. |
lib.print.warn(...) | yellow [WARN] | Recoverable or unexpected cases. |
lib.print.info(...) | blue [INFO] | Normal lifecycle events. |
lib.print.debug(...) | magenta [DEBUG] | Verbose diagnostics. |
lib.print.error(...)[ERROR]lib.print.warn(...)[WARN]lib.print.info(...)[INFO]lib.print.debug(...)[DEBUG]Pass values as separate arguments rather than concatenating — lib.print.info('source', source)
formats better than 'source=' .. source. There's no runtime log-level filtering yet: all four levels
always print. Circular tables and native FiveM objects (entities, peds) break the JSON serializer, so
pass handles instead. And don't log inside per-frame loops — it tanks performance.