mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 16:51:29 +00:00
Rip out load_log_settings in all projects
This commit is contained in:
parent
9eb05ff999
commit
f81a8b716b
@ -45,9 +45,6 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
|
||||
const EQEmuConfig *config = EQEmuConfig::get();
|
||||
if(!load_log_settings(config->LogSettingsFile.c_str())) {
|
||||
Log.Out(Logs::General, Logs::Error, "Warning: unable to read %s.", config->LogSettingsFile.c_str());
|
||||
}
|
||||
|
||||
SharedDatabase database;
|
||||
Log.Out(Logs::General, Logs::Status, "Connecting to database...");
|
||||
|
||||
@ -43,9 +43,6 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
|
||||
const EQEmuConfig *config = EQEmuConfig::get();
|
||||
if(!load_log_settings(config->LogSettingsFile.c_str())) {
|
||||
Log.Out(Logs::General, Logs::Error, "Warning: unable to read %s.", config->LogSettingsFile.c_str());
|
||||
}
|
||||
|
||||
SharedDatabase database;
|
||||
Log.Out(Logs::General, Logs::Status, "Connecting to database...");
|
||||
|
||||
@ -16,6 +16,8 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
#include "debug.h"
|
||||
#include "eq_packet.h"
|
||||
#include "logsys.h"
|
||||
@ -37,8 +39,9 @@ const char *log_category_names[NUMBER_OF_LOG_CATEGORIES] = {
|
||||
static LogTypeStatus real_log_type_info[NUMBER_OF_LOG_TYPES+1] =
|
||||
{
|
||||
#include "logtypes.h"
|
||||
{ false, NUMBER_OF_LOG_CATEGORIES, "BAD TYPE" } /* dummy trailing record */
|
||||
{ false, NUMBER_OF_LOG_CATEGORIES, "BAD TYPE" } /* dummy trailing record
|
||||
};
|
||||
|
||||
const LogTypeStatus *log_type_info = real_log_type_info;
|
||||
|
||||
|
||||
@ -50,7 +53,7 @@ void log_hex(LogType type, const void *data, unsigned long length, unsigned char
|
||||
uint32 offset;
|
||||
for(offset=0;offset<length;offset+=16) {
|
||||
build_hex_line((const char *)data,length,offset,buffer,padding);
|
||||
log_message(type, "%s", buffer); //%s is to prevent % escapes in the ascii
|
||||
// log_message(type, "%s", buffer); //%s is to prevent % escapes in the ascii
|
||||
}
|
||||
}
|
||||
|
||||
@ -59,7 +62,7 @@ void log_packet(LogType type, const BasePacket *p) {
|
||||
return;
|
||||
char buffer[80];
|
||||
p->build_header_dump(buffer);
|
||||
log_message(type,"%s", buffer);
|
||||
//log_message(type,"%s", buffer);
|
||||
log_hex(type,(const char *)p->pBuffer,p->size);
|
||||
}
|
||||
|
||||
@ -68,7 +71,7 @@ void log_raw_packet(LogType type, uint16 seq, const BasePacket *p) {
|
||||
return;
|
||||
char buffer[196];
|
||||
p->build_raw_header_dump(buffer, seq);
|
||||
log_message(type,buffer);
|
||||
//log_message(type,buffer);
|
||||
log_hex(type,(const char *)p->pBuffer,p->size);
|
||||
}
|
||||
|
||||
@ -156,3 +159,5 @@ bool load_log_settings(const char *filename) {
|
||||
return(true);
|
||||
}
|
||||
|
||||
|
||||
*/
|
||||
@ -65,8 +65,6 @@ extern const LogTypeStatus *log_type_info;
|
||||
// For log_packet, et all.
|
||||
class BasePacket;
|
||||
|
||||
extern void log_message(LogType type, const char *fmt, ...);
|
||||
extern void log_messageVA(LogType type, const char *fmt, va_list args);
|
||||
extern void log_hex(LogType type, const void *data, unsigned long length, unsigned char padding=4);
|
||||
extern void log_packet(LogType type, const BasePacket *p);
|
||||
extern void log_raw_packet(LogType type, uint16 seq, const BasePacket *p);
|
||||
@ -116,7 +114,7 @@ extern void log_toggle(LogType t);
|
||||
#define is_log_enabled( type ) \
|
||||
log_type_info[ type ].enabled
|
||||
|
||||
extern bool load_log_settings(const char *filename);
|
||||
// extern bool load_log_settings(const char *filename);
|
||||
|
||||
#endif /*LOGSYS_H_*/
|
||||
|
||||
|
||||
@ -87,12 +87,6 @@ int main() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Initialize Logging */
|
||||
if (!load_log_settings(Config->LogSettingsFile.c_str()))
|
||||
Log.Out(Logs::Detail, Logs::QS_Server, "Warning: Unable to read %s", Config->LogSettingsFile.c_str());
|
||||
else
|
||||
Log.Out(Logs::Detail, Logs::QS_Server, "Log settings loaded from %s", Config->LogSettingsFile.c_str());
|
||||
|
||||
if (signal(SIGINT, CatchSignal) == SIG_ERR) {
|
||||
Log.Out(Logs::Detail, Logs::QS_Server, "Could not set signal handler");
|
||||
return 1;
|
||||
|
||||
@ -47,9 +47,6 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
|
||||
const EQEmuConfig *config = EQEmuConfig::get();
|
||||
if(!load_log_settings(config->LogSettingsFile.c_str())) {
|
||||
Log.Out(Logs::General, Logs::Error, "Warning: unable to read %s.", config->LogSettingsFile.c_str());
|
||||
}
|
||||
|
||||
SharedDatabase database;
|
||||
Log.Out(Logs::General, Logs::Status, "Connecting to database...");
|
||||
|
||||
@ -89,11 +89,6 @@ int main() {
|
||||
|
||||
Config = ucsconfig::get();
|
||||
|
||||
if(!load_log_settings(Config->LogSettingsFile.c_str()))
|
||||
Log.Out(Logs::Detail, Logs::UCS_Server, "Warning: Unable to read %s", Config->LogSettingsFile.c_str());
|
||||
else
|
||||
Log.Out(Logs::Detail, Logs::UCS_Server, "Log settings loaded from %s", Config->LogSettingsFile.c_str());
|
||||
|
||||
WorldShortName = Config->ShortName;
|
||||
|
||||
Log.Out(Logs::Detail, Logs::UCS_Server, "Connecting to MySQL...");
|
||||
|
||||
@ -133,12 +133,6 @@ int main(int argc, char** argv) {
|
||||
}
|
||||
const WorldConfig *Config=WorldConfig::get();
|
||||
|
||||
if(!load_log_settings(Config->LogSettingsFile.c_str()))
|
||||
Log.Out(Logs::Detail, Logs::World_Server, "Warning: Unable to read %s", Config->LogSettingsFile.c_str());
|
||||
else
|
||||
Log.Out(Logs::Detail, Logs::World_Server, "Log settings loaded from %s", Config->LogSettingsFile.c_str());
|
||||
|
||||
|
||||
Log.Out(Logs::Detail, Logs::World_Server, "CURRENT_VERSION: %s", CURRENT_VERSION);
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
@ -155,11 +155,6 @@ int main(int argc, char** argv) {
|
||||
}
|
||||
const ZoneConfig *Config=ZoneConfig::get();
|
||||
|
||||
if(!load_log_settings(Config->LogSettingsFile.c_str()))
|
||||
Log.Out(Logs::Detail, Logs::Zone_Server, "Warning: Unable to read %s", Config->LogSettingsFile.c_str());
|
||||
else
|
||||
Log.Out(Logs::Detail, Logs::Zone_Server, "Log settings loaded from %s", Config->LogSettingsFile.c_str());
|
||||
|
||||
worldserver.SetPassword(Config->SharedKey.c_str());
|
||||
|
||||
Log.Out(Logs::Detail, Logs::Zone_Server, "Connecting to MySQL...");
|
||||
@ -207,10 +202,6 @@ int main(int argc, char** argv) {
|
||||
#endif
|
||||
|
||||
const char *log_ini_file = "./log.ini";
|
||||
if(!load_log_settings(log_ini_file))
|
||||
Log.Out(Logs::Detail, Logs::Zone_Server, "Warning: Unable to read %s", log_ini_file);
|
||||
else
|
||||
Log.Out(Logs::Detail, Logs::Zone_Server, "Log settings loaded from %s", log_ini_file);
|
||||
|
||||
Log.Out(Logs::Detail, Logs::Zone_Server, "Mapping Incoming Opcodes");
|
||||
MapOpcodes();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user