FrameworkZ 10.8.3
Provides a framework for Project Zomboid with various systems.
Loading...
Searching...
No Matches
FrameworkZ::Logs Class Reference

Logs module for FrameworkZ. Logs player actions, system events, errors, warnings, and informational messages. More...

Public Member Functions

void AddLog (logType, message, player)
 Add a log entry.
 
table GetLogs (logType, player)
 Retrieve log entries.
 
void LoadLogsFromFile (player)
 Load log entries from a file.
 
void LogError (message)
 
void LogInfo (message)
 
void LogPlayerAction (player, action)
 
void LogSystemEvent (message)
 
void LogWarning (message)
 
void OnWeaponHitCharacter (characterGivingDamage, characterTakingDamage, handWeapon, damage)
 Log damage dealt to players from players and zombies.
 
void OpenLogMenu ()
 Display logs in a menu for admins.
 
void SaveLogToFile (logEntry)
 Save a log entry to a file.
 
table SearchLogs (keyword)
 Search log entries by keyword.
 

Data Fields

FrameworkZ Logs __index
 
 ERROR
 
 INFO
 
FrameworkZ Logs LogDirectory
 
FrameworkZ Logs LogEntries
 
FrameworkZ Logs LogTypes
 
FrameworkZ Logs MaxEntries
 
 PLAYER_ACCEPT_TRADE
 
 PLAYER_CANCEL_TRADE
 
 PLAYER_CREATE_CHARACTER
 
 PLAYER_DEATH
 
 PLAYER_DECLINE_TRADE
 
 PLAYER_ENTER_CAR
 
 PLAYER_EXIT_CAR
 
 PLAYER_FINALIZE_TRADE
 
 PLAYER_GIVE_DAMAGE
 
 PLAYER_GRAB_ITEM
 
 PLAYER_KILL
 
 PLAYER_LOAD_CHARACTER
 
 PLAYER_PLACE_ITEM
 
 PLAYER_RECEIVE_ITEM
 
 PLAYER_TAKE_DAMAGE
 
 SYSTEM_EVENT
 
 WARNING
 
 ZOMBIE_GIVE_DAMAGE
 
 ZOMBIE_TAKE_DAMAGE
 

Detailed Description

Logs module for FrameworkZ. Logs player actions, system events, errors, warnings, and informational messages.

Definition at line 5 of file Logs.lua.

Member Function Documentation

◆ AddLog()

void AddLog ( logType ,
message ,
player  )

Add a log entry.

Parameters
logTypestring The type of log (e.g., "PlayerAction", "SystemEvent").
messagestring The log message.
playertable Optional player table associated with the log.

◆ GetLogs()

table GetLogs ( logType ,
player  )

Retrieve log entries.

Parameters
logTypestring Optional log type to filter by.
playerstring Optional player username to filter by.
Returns
table A table of log entries.

◆ LoadLogsFromFile()

void LoadLogsFromFile ( player )

Load log entries from a file.

Parameters
playerstring The player username to load logs for.

◆ LogError()

void LogError ( message )

◆ LogInfo()

void LogInfo ( message )

◆ LogPlayerAction()

void LogPlayerAction ( player ,
action  )

◆ LogSystemEvent()

void LogSystemEvent ( message )

◆ LogWarning()

void LogWarning ( message )

◆ OnWeaponHitCharacter()

void OnWeaponHitCharacter ( characterGivingDamage ,
characterTakingDamage ,
handWeapon ,
damage  )

Log damage dealt to players from players and zombies.

Parameters
characterGivingDamagetable The character dealing the damage.
characterTakingDamagetable The character taking the damage.
handWeapontable The weapon used to deal the damage.
damageinteger The amount of damage dealt.

◆ OpenLogMenu()

void OpenLogMenu ( )

Display logs in a menu for admins.

◆ SaveLogToFile()

void SaveLogToFile ( logEntry )

Save a log entry to a file.

Parameters
logEntrytable The log entry to save.

◆ SearchLogs()

table SearchLogs ( keyword )

Search log entries by keyword.

Parameters
keywordstring The keyword to search for.
Returns
table A table of log entries that contain the keyword.

Field Documentation

◆ __index

FrameworkZ Logs __index

Definition at line 7 of file Logs.lua.

◆ ERROR

FrameworkZ::Logs::ERROR

Definition at line 53 of file Logs.lua.

◆ INFO

FrameworkZ::Logs::INFO

Definition at line 57 of file Logs.lua.

◆ LogDirectory

FrameworkZ Logs LogDirectory

Definition at line 13 of file Logs.lua.

◆ LogEntries

FrameworkZ Logs LogEntries

Definition at line 9 of file Logs.lua.

◆ LogTypes

FrameworkZ Logs LogTypes

Definition at line 15 of file Logs.lua.

◆ MaxEntries

FrameworkZ Logs MaxEntries

Definition at line 11 of file Logs.lua.

◆ PLAYER_ACCEPT_TRADE

FrameworkZ::Logs::PLAYER_ACCEPT_TRADE

Definition at line 17 of file Logs.lua.

◆ PLAYER_CANCEL_TRADE

FrameworkZ::Logs::PLAYER_CANCEL_TRADE

Definition at line 19 of file Logs.lua.

◆ PLAYER_CREATE_CHARACTER

FrameworkZ::Logs::PLAYER_CREATE_CHARACTER

Definition at line 21 of file Logs.lua.

◆ PLAYER_DEATH

FrameworkZ::Logs::PLAYER_DEATH

Definition at line 23 of file Logs.lua.

◆ PLAYER_DECLINE_TRADE

FrameworkZ::Logs::PLAYER_DECLINE_TRADE

Definition at line 25 of file Logs.lua.

◆ PLAYER_ENTER_CAR

FrameworkZ::Logs::PLAYER_ENTER_CAR

Definition at line 27 of file Logs.lua.

◆ PLAYER_EXIT_CAR

FrameworkZ::Logs::PLAYER_EXIT_CAR

Definition at line 29 of file Logs.lua.

◆ PLAYER_FINALIZE_TRADE

FrameworkZ::Logs::PLAYER_FINALIZE_TRADE

Definition at line 31 of file Logs.lua.

◆ PLAYER_GIVE_DAMAGE

FrameworkZ::Logs::PLAYER_GIVE_DAMAGE

Definition at line 33 of file Logs.lua.

◆ PLAYER_GRAB_ITEM

FrameworkZ::Logs::PLAYER_GRAB_ITEM

Definition at line 35 of file Logs.lua.

◆ PLAYER_KILL

FrameworkZ::Logs::PLAYER_KILL

Definition at line 37 of file Logs.lua.

◆ PLAYER_LOAD_CHARACTER

FrameworkZ::Logs::PLAYER_LOAD_CHARACTER

Definition at line 39 of file Logs.lua.

◆ PLAYER_PLACE_ITEM

FrameworkZ::Logs::PLAYER_PLACE_ITEM

Definition at line 41 of file Logs.lua.

◆ PLAYER_RECEIVE_ITEM

FrameworkZ::Logs::PLAYER_RECEIVE_ITEM

Definition at line 43 of file Logs.lua.

◆ PLAYER_TAKE_DAMAGE

FrameworkZ::Logs::PLAYER_TAKE_DAMAGE

Definition at line 45 of file Logs.lua.

◆ SYSTEM_EVENT

FrameworkZ::Logs::SYSTEM_EVENT

Definition at line 51 of file Logs.lua.

◆ WARNING

FrameworkZ::Logs::WARNING

Definition at line 55 of file Logs.lua.

◆ ZOMBIE_GIVE_DAMAGE

FrameworkZ::Logs::ZOMBIE_GIVE_DAMAGE

Definition at line 47 of file Logs.lua.

◆ ZOMBIE_TAKE_DAMAGE

FrameworkZ::Logs::ZOMBIE_TAKE_DAMAGE

Definition at line 49 of file Logs.lua.


The documentation for this class was generated from the following file: