Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logger #303

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions amxmodx/AMBuilder
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ binary.sources = [
'CGameConfigs.cpp',
'gameconfigs.cpp',
'CoreConfig.cpp',
'logger.cpp',
]

if builder.target_platform == 'windows':
Expand Down
1 change: 1 addition & 0 deletions amxmodx/CPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ CPluginMngr::CPlugin::CPlugin(int i, const char* p, const char* n, char* e, int
paused_fun = 0;
next = 0;
id = i;
m_Logger = INVALID_LOGGER;

if (status == ps_running)
{
Expand Down
5 changes: 5 additions & 0 deletions amxmodx/CPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "sh_list.h"
#include "amx.h"
#include "amxxfile.h"
#include "logger.h"
#include <amtl/am-string.h>
#include <amtl/am-vector.h>

Expand Down Expand Up @@ -72,6 +73,8 @@ class CPluginMngr
cell* m_pNullStringOfs;
cell* m_pNullVectorOfs;
ke::Vector<ke::AutoPtr<AutoConfig>> m_configs;

cell m_Logger;
public:
inline const char* getName() { return name.chars();}
inline const char* getVersion() { return version.chars();}
Expand All @@ -80,12 +83,14 @@ class CPluginMngr
inline const char* getError() { return errorMsg.chars();}
inline int getStatusCode() { return status; }
inline int getId() const { return id; }
inline cell getLogger() { return m_Logger; }
inline AMX* getAMX() { return &amx; }
inline const AMX* getAMX() const { return &amx; }
inline void setTitle(const char* n) { title = n; }
inline void setAuthor(const char* n) { author =n; }
inline void setVersion(const char* n) { version = n; }
inline void setError(const char* n) { errorMsg = n; }
inline void setLogger(cell logger) { m_Logger = logger; }
inline bool isValid() const { return (status >= ps_paused); }
inline bool isPaused() const { return ((status == ps_paused) || (status == ps_stopped)); }
inline bool isStopped() const { return (status == ps_stopped); }
Expand Down
Loading