-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
180 additions
and
180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,99 +1,99 @@ | ||
#if defined _logging_for_sourcepawn_included | ||
#endinput | ||
#endif | ||
#define _logging_for_sourcepawn_included | ||
|
||
#pragma newdecls required | ||
#pragma semicolon 1 | ||
|
||
|
||
|
||
/** | ||
* Define the LOG4SP_NO_EXT macro before including this header file to make the | ||
* plugin not depend on the log4sp extension. | ||
* | ||
* This will replace most of the log4sp natives to empty statements or do nothing, | ||
* except for the following: | ||
* | ||
* - Logger.GetLevel() | ||
* Always returns LogLevel_Info. | ||
* | ||
* - Logger.ShouldLog() | ||
* Returns true when param lvl is equal to or greater than LogLevel_Info. | ||
* | ||
* - Logger.Log(), Logger.LogAmxTpl(), | ||
* Logger.LogSrc(), Logger.LogSrcAmxTpl(), | ||
* Logger.LogLoc(), Logger.LogLocAmxTpl() | ||
* If param lvl is equal to INFO or WARN, simply use LogMessage() instead; | ||
* If param lvl is equal to ERROR or FATAL, simply use LogError() instead; | ||
* else do nothing. | ||
* | ||
* - Logger.LogStackTrace(), Logger.LogStackTraceAmxTpl() | ||
* Simply use LogStackTrace() instead. | ||
* | ||
* - Logger.ThrowError(), Logger.ThrowErrorAmxTpl() | ||
* Simply use ThrowError() instead. | ||
* | ||
* - Logger.Info(), Logger.InfoAmxTpl(), | ||
* - Logger.Warn(), Logger.WarnAmxTpl() | ||
* Simply use LogMessage() instead. | ||
* | ||
* - Logger.Error(), Logger.ErrorAmxTpl(), | ||
* - Logger.Fatal(), Logger.FatalAmxTpl() | ||
* Simply use LogError() instead. | ||
*/ | ||
// #define LOG4SP_NO_EXT | ||
|
||
|
||
|
||
#if !defined LOG4SP_NO_EXT | ||
|
||
#include <log4sp/common> | ||
#include <log4sp/logger> | ||
#include <log4sp/sinks/sink> | ||
#include <log4sp/sinks/server_console_sink> | ||
#include <log4sp/sinks/base_file_sink> | ||
#include <log4sp/sinks/rotating_file_sink> | ||
#include <log4sp/sinks/daily_file_sink> | ||
#include <log4sp/sinks/client_console_sink> | ||
|
||
#else | ||
|
||
#include <log4sp_empty/common> | ||
#include <log4sp_empty/logger> | ||
#include <log4sp_empty/sinks/sink> | ||
#include <log4sp_empty/sinks/server_console_sink> | ||
#include <log4sp_empty/sinks/base_file_sink> | ||
#include <log4sp_empty/sinks/rotating_file_sink> | ||
#include <log4sp_empty/sinks/daily_file_sink> | ||
#include <log4sp_empty/sinks/client_console_sink> | ||
|
||
#endif | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
/** | ||
* Do not edit below this line! | ||
*/ | ||
#define LOG4SP_EXT_VERSION "1.4.0" | ||
|
||
public Extension __ext_log4sp = | ||
{ | ||
name = "Logging for SourcePawn", | ||
file = "log4sp.ext", | ||
#if defined AUTOLOAD_EXTENSIONS && !defined LOG4SP_NO_EXT | ||
autoload = 1, | ||
#else | ||
autoload = 0, | ||
#endif | ||
#if defined REQUIRE_EXTENSIONS && !defined LOG4SP_NO_EXT | ||
required = 1, | ||
#else | ||
required = 0, | ||
#endif | ||
}; | ||
#if defined _logging_for_sourcepawn_included | ||
#endinput | ||
#endif | ||
#define _logging_for_sourcepawn_included | ||
|
||
#pragma newdecls required | ||
#pragma semicolon 1 | ||
|
||
|
||
|
||
/** | ||
* Define the LOG4SP_NO_EXT macro before including this header file to make the | ||
* plugin not depend on the log4sp extension. | ||
* | ||
* This will replace most of the log4sp natives to empty statements or do nothing, | ||
* except for the following: | ||
* | ||
* - Logger.GetLevel() | ||
* Always returns LogLevel_Info. | ||
* | ||
* - Logger.ShouldLog() | ||
* Returns true when param lvl is equal to or greater than LogLevel_Info. | ||
* | ||
* - Logger.Log(), Logger.LogAmxTpl(), | ||
* Logger.LogSrc(), Logger.LogSrcAmxTpl(), | ||
* Logger.LogLoc(), Logger.LogLocAmxTpl() | ||
* If param lvl is equal to INFO or WARN, simply use LogMessage() instead; | ||
* If param lvl is equal to ERROR or FATAL, simply use LogError() instead; | ||
* else do nothing. | ||
* | ||
* - Logger.LogStackTrace(), Logger.LogStackTraceAmxTpl() | ||
* Simply use LogStackTrace() instead. | ||
* | ||
* - Logger.ThrowError(), Logger.ThrowErrorAmxTpl() | ||
* Simply use ThrowError() instead. | ||
* | ||
* - Logger.Info(), Logger.InfoAmxTpl(), | ||
* - Logger.Warn(), Logger.WarnAmxTpl() | ||
* Simply use LogMessage() instead. | ||
* | ||
* - Logger.Error(), Logger.ErrorAmxTpl(), | ||
* - Logger.Fatal(), Logger.FatalAmxTpl() | ||
* Simply use LogError() instead. | ||
*/ | ||
// #define LOG4SP_NO_EXT | ||
|
||
|
||
|
||
#if !defined LOG4SP_NO_EXT | ||
|
||
#include <log4sp/common> | ||
#include <log4sp/logger> | ||
#include <log4sp/sinks/sink> | ||
#include <log4sp/sinks/server_console_sink> | ||
#include <log4sp/sinks/base_file_sink> | ||
#include <log4sp/sinks/rotating_file_sink> | ||
#include <log4sp/sinks/daily_file_sink> | ||
#include <log4sp/sinks/client_console_sink> | ||
|
||
#else | ||
|
||
#include <log4sp_empty/common> | ||
#include <log4sp_empty/logger> | ||
#include <log4sp_empty/sinks/sink> | ||
#include <log4sp_empty/sinks/server_console_sink> | ||
#include <log4sp_empty/sinks/base_file_sink> | ||
#include <log4sp_empty/sinks/rotating_file_sink> | ||
#include <log4sp_empty/sinks/daily_file_sink> | ||
#include <log4sp_empty/sinks/client_console_sink> | ||
|
||
#endif | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
/** | ||
* Do not edit below this line! | ||
*/ | ||
#define LOG4SP_EXT_VERSION "1.4.1" | ||
|
||
public Extension __ext_log4sp = | ||
{ | ||
name = "Logging for SourcePawn", | ||
file = "log4sp.ext", | ||
#if defined AUTOLOAD_EXTENSIONS && !defined LOG4SP_NO_EXT | ||
autoload = 1, | ||
#else | ||
autoload = 0, | ||
#endif | ||
#if defined REQUIRE_EXTENSIONS && !defined LOG4SP_NO_EXT | ||
required = 1, | ||
#else | ||
required = 0, | ||
#endif | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,81 +1,81 @@ | ||
/** | ||
* vim: set ts=4 : | ||
* ============================================================================= | ||
* SourceMod Logging for SourcePawn Extension | ||
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. | ||
* ============================================================================= | ||
* | ||
* This program is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU General Public License, version 3.0, as published by the | ||
* Free Software Foundation. | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more | ||
* details. | ||
* | ||
* You should have received a copy of the GNU General Public License along with | ||
* this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* As a special exception, AlliedModders LLC gives you permission to link the | ||
* code of this program (as well as its derivative works) to "Half-Life 2," the | ||
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software | ||
* by the Valve Corporation. You must obey the GNU General Public License in | ||
* all respects for all other code used. Additionally, AlliedModders LLC grants | ||
* this exception to all derivative works. AlliedModders LLC defines further | ||
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), | ||
* or <http://www.sourcemod.net/license.php>. | ||
* | ||
* Version: $Id$ | ||
*/ | ||
|
||
#ifndef _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_ | ||
#define _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_ | ||
|
||
/** | ||
* @file smsdk_config.h | ||
* @brief Contains macros for configuring basic extension information. | ||
*/ | ||
|
||
/* Basic information exposed publicly */ | ||
#define SMEXT_CONF_NAME "Logging for SourcePawn" | ||
#define SMEXT_CONF_DESCRIPTION "SourcePawn logging utils extension to help developers" | ||
#define SMEXT_CONF_VERSION "1.4.0" | ||
#define SMEXT_CONF_AUTHOR "F1F88" | ||
#define SMEXT_CONF_URL "https://github.com/F1F88/sm-ext-log4sp" | ||
#define SMEXT_CONF_LOGTAG "LOG4SP" | ||
#define SMEXT_CONF_LICENSE "GPL" | ||
#define SMEXT_CONF_DATESTRING __DATE__ | ||
|
||
/** | ||
* @brief Exposes plugin's main interface. | ||
*/ | ||
#define SMEXT_LINK(name) SDKExtension *g_pExtensionIface = name; | ||
|
||
/** | ||
* @brief Sets whether or not this plugin required Metamod. | ||
* NOTE: Uncomment to enable, comment to disable. | ||
*/ | ||
//#define SMEXT_CONF_METAMOD | ||
|
||
/** Enable interfaces you want to use here by uncommenting lines */ | ||
#define SMEXT_ENABLE_FORWARDSYS | ||
#define SMEXT_ENABLE_HANDLESYS | ||
#define SMEXT_ENABLE_PLAYERHELPERS | ||
//#define SMEXT_ENABLE_DBMANAGER | ||
//#define SMEXT_ENABLE_GAMECONF | ||
//#define SMEXT_ENABLE_MEMUTILS | ||
//#define SMEXT_ENABLE_GAMEHELPERS | ||
//#define SMEXT_ENABLE_TIMERSYS | ||
//#define SMEXT_ENABLE_THREADER | ||
//#define SMEXT_ENABLE_LIBSYS | ||
//#define SMEXT_ENABLE_MENUS | ||
//#define SMEXT_ENABLE_ADTFACTORY | ||
#define SMEXT_ENABLE_PLUGINSYS | ||
//#define SMEXT_ENABLE_ADMINSYS | ||
//#define SMEXT_ENABLE_TEXTPARSERS | ||
//#define SMEXT_ENABLE_USERMSGS | ||
#define SMEXT_ENABLE_TRANSLATOR | ||
#define SMEXT_ENABLE_ROOTCONSOLEMENU | ||
|
||
#endif // _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_ | ||
/** | ||
* vim: set ts=4 : | ||
* ============================================================================= | ||
* SourceMod Logging for SourcePawn Extension | ||
* Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved. | ||
* ============================================================================= | ||
* | ||
* This program is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU General Public License, version 3.0, as published by the | ||
* Free Software Foundation. | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more | ||
* details. | ||
* | ||
* You should have received a copy of the GNU General Public License along with | ||
* this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
* As a special exception, AlliedModders LLC gives you permission to link the | ||
* code of this program (as well as its derivative works) to "Half-Life 2," the | ||
* "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software | ||
* by the Valve Corporation. You must obey the GNU General Public License in | ||
* all respects for all other code used. Additionally, AlliedModders LLC grants | ||
* this exception to all derivative works. AlliedModders LLC defines further | ||
* exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007), | ||
* or <http://www.sourcemod.net/license.php>. | ||
* | ||
* Version: $Id$ | ||
*/ | ||
|
||
#ifndef _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_ | ||
#define _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_ | ||
|
||
/** | ||
* @file smsdk_config.h | ||
* @brief Contains macros for configuring basic extension information. | ||
*/ | ||
|
||
/* Basic information exposed publicly */ | ||
#define SMEXT_CONF_NAME "Logging for SourcePawn" | ||
#define SMEXT_CONF_DESCRIPTION "SourcePawn logging utils extension to help developers" | ||
#define SMEXT_CONF_VERSION "1.4.1" | ||
#define SMEXT_CONF_AUTHOR "F1F88" | ||
#define SMEXT_CONF_URL "https://github.com/F1F88/sm-ext-log4sp" | ||
#define SMEXT_CONF_LOGTAG "LOG4SP" | ||
#define SMEXT_CONF_LICENSE "GPL" | ||
#define SMEXT_CONF_DATESTRING __DATE__ | ||
|
||
/** | ||
* @brief Exposes plugin's main interface. | ||
*/ | ||
#define SMEXT_LINK(name) SDKExtension *g_pExtensionIface = name; | ||
|
||
/** | ||
* @brief Sets whether or not this plugin required Metamod. | ||
* NOTE: Uncomment to enable, comment to disable. | ||
*/ | ||
//#define SMEXT_CONF_METAMOD | ||
|
||
/** Enable interfaces you want to use here by uncommenting lines */ | ||
#define SMEXT_ENABLE_FORWARDSYS | ||
#define SMEXT_ENABLE_HANDLESYS | ||
#define SMEXT_ENABLE_PLAYERHELPERS | ||
//#define SMEXT_ENABLE_DBMANAGER | ||
//#define SMEXT_ENABLE_GAMECONF | ||
//#define SMEXT_ENABLE_MEMUTILS | ||
//#define SMEXT_ENABLE_GAMEHELPERS | ||
//#define SMEXT_ENABLE_TIMERSYS | ||
//#define SMEXT_ENABLE_THREADER | ||
//#define SMEXT_ENABLE_LIBSYS | ||
//#define SMEXT_ENABLE_MENUS | ||
//#define SMEXT_ENABLE_ADTFACTORY | ||
#define SMEXT_ENABLE_PLUGINSYS | ||
//#define SMEXT_ENABLE_ADMINSYS | ||
//#define SMEXT_ENABLE_TEXTPARSERS | ||
//#define SMEXT_ENABLE_USERMSGS | ||
#define SMEXT_ENABLE_TRANSLATOR | ||
#define SMEXT_ENABLE_ROOTCONSOLEMENU | ||
|
||
#endif // _INCLUDE_SOURCEMOD_EXTENSION_CONFIG_H_ |