cityrp.logs
CityRP Logging Library
Functions
cityrp.logs.add(player1, steamid1, player2, steamid2, logtype, value1, value2, value3, value4)
This function is deprecated and may be removed in a future version.
Add a legacy log.
Parameters
-
player1
string
optional
Name of the first player to log.
-
steamid1
string
optional
SteamID of the first player to log.
-
player2
string
optional
Name of the second player to log.
-
steamid2
string
optional
SteamID of the second player to log.
-
logtype
string
Arbitary string representing the type of log being added.
-
value1
string
optional
Arbitary value
-
value2
string
optional
Arbitary value
-
value3
string
optional
Arbitary value
-
value4
string
optional
Arbitary value
See Also
cityrp.logs.dump()
This is an internal function! You are able to use it, but you risk unintended side effects if used incorrectly.
Dump logs to file / database.
cityrp.logs.log(ply1, ply2, logtype, value, data)
View source »Add a new log for storage.
Parameters
-
ply1
Player, PlayerLogger or string
optional
Player to log for.
-
ply2
Player, PlayerLogger or string
optional
Player to log for.
-
logtype
string
Arbitary string, representing the type of log being stored.
-
value
string
optional
Arbiatary data value.
-
data
tab
optional
Table to JSON serializable data.
cityrp.logs.normalizePlayer(p)
View source »Normalise a playerable object into a pair of string for entry into the database.
Parameters
-
p
Player, PlayerLogger or string
optional
Player to normalize.
Returns
Tables
PlayerLogger
View source »Documentation for this section is incomplete and needs expanding.
Fields
-
1
string
SteamID64 of the given player.
-
2
string
Name of the player.
Fields
cityrp.logs.logs
View source »Temporary in-memory store for logs.