Page 3 of 6
Re: New EQ2Emu Logging
Posted: Thu Sep 02, 2010 8:32 am
by John Adams
That's cool, right on Scat. Thanks for the re-deux
I thought you were going with a bitwise for Console, File, or Both? (plus any future output concepts we dream up)?
I'll try to check it out tonight. Problem is, I just got told family is coming Fri (tomorrow...) so that means a severe house cleaning is in order

I'll see if I have time.
Re: New EQ2Emu Logging
Posted: Thu Sep 02, 2010 9:09 am
by Zcoretri
Scat, I tried compiling last night and VS2008 was barking about the logtypes.h file.
Re: New EQ2Emu Logging
Posted: Thu Sep 02, 2010 10:51 am
by John Adams
Yeah I dont' think he committed LogTypes.h yet. I don't see it anywhere either.
Re: New EQ2Emu Logging
Posted: Thu Sep 02, 2010 6:41 pm
by Scatman
Ugh. Sorry. Just testing you guys!
Re: New EQ2Emu Logging
Posted: Thu Sep 02, 2010 6:47 pm
by John Adams
Ugh, compile error on Linux. makefile?
Code: Select all
g++ -c -Wall -Wuninitialized -Wwrite-strings -Wcast-qual -Wcomment -Wcast-align -Wno-deprecated -g -march=i686 -O -pthread -pipe -DFX -D_GNU_SOURCE -DINVERSEXY -DEQ2 -DWORLD -I/usr/include/mysql -I/usr/mysql/include -I./LUA/include ../common/Log.cpp -o ../common/Log.o
../common/Log.cpp: In function âLogTypeStatus* GetLogTypeStatus(const char*, const char*)â:
../common/Log.cpp:136: error: âstricmpâ was not declared in this scope
../common/Log.cpp: In function âvoid ProcessLogConfig(XMLNode)â:
../common/Log.cpp:165: error: âstricmpâ was not declared in this scope
../common/Log.cpp:177: error: âstricmpâ was not declared in this scope
../common/Log.cpp:185: error: âstricmpâ was not declared in this scope
../common/Log.cpp:193: error: âstricmpâ was not declared in this scope
make: *** [../common/Log.o] Error 1
Re: New EQ2Emu Logging
Posted: Thu Sep 02, 2010 6:49 pm
by Scatman
That's why I hate developing on windows. They allow it because they'll define it for you... sec

Re: New EQ2Emu Logging
Posted: Thu Sep 02, 2010 7:00 pm
by John Adams
That's because developing on Windows is for mindless tools that need everything to be decided for them. Eh?
LINUX4EVAH!
Thanks Scat.
Re: New EQ2Emu Logging
Posted: Fri Sep 03, 2010 6:56 am
by Scatman
Sorry I couldn't get to this earlier. I kinda fell asleep last night. The code is now compiling on linux. It was alllll fooked up. I have no idea how windows compiled it. Code is comitted to svn. However I will not be able to compile windows until I get home from work. So if anyone has some free time and can grab the latest from svn to do a windows compile, let me know.
Re: New EQ2Emu Logging
Posted: Fri Sep 03, 2010 8:40 am
by John Adams
Looks like Win32 Debug and Release compiled just fine on Windows. x64 should work too (doing it now) and Linux x86 also appears to be ok.
Thanks Scatman-doo!
The next thing we need from your Scatliness is to discombobulate the hex crap, which I will work with you on after this holiday weekend. Got family in town, so I'm outie til Tue at the very least.
Re: New EQ2Emu Logging
Posted: Fri Sep 03, 2010 9:31 am
by John Adams
And Scat...
bitwise
let's talk.
Re: New EQ2Emu Logging
Posted: Fri Sep 03, 2010 9:34 am
by John Adams
Scatman wrote:Well, Mr. Emperor, what do you think of this instead?
Code: Select all
<LogConfig Category="SERVERINIT">
<LogConfigType Type="STATUS" Color="0" Enabled="True" LogFile="False" Console="True" />
<LogConfigType Type="WARNING" Color="2" Enabled="True" LogFile="False" Console="True" />
<LogConfigType Type="ERROR" Color="3" Enabled="True" LogFile="False" Console="True" />
</LogConfig>
More "XMLie" ?
Yes. I like.
Scatman wrote:
Edit:
I've also changed the value fields of each key to not care about case. Also, the color field can accept a number OR a color's name - (0 or White), (1 or green), (2 or YELLoW), etc
Can we also allow CSS color styles? #FFFFFF = White, #FF0000 = Red, etc? not sure if C++ interprets that easily. I know it loves RGB though (255,255,255) which I'd like to avoid
I would replace 0, 1, 2 with CSS coloring, since no one knows what 0, 1, or 2 is unless we tell them. that seems rather "hard coded".
just sayin
Re: New EQ2Emu Logging
Posted: Fri Sep 03, 2010 10:18 am
by Scatman
Unfortunately we can't do css style. We are limited by the colors windows and linux gives us. There's on.y about 12 colors we can use. Edit edit and properties on a command prompt and those are the colors we are allowed to use. I changed the color attribute to accept s number or the name of the color.
Re: New EQ2Emu Logging
Posted: Fri Sep 03, 2010 10:32 am
by Scatman
I was thinking about the bitwise. Are you sure we want to do that? This is a config file so it should be pretty high level. If a server admin wants to change some settings then they may have to look thru the code yo determine which numbers are for which log. Or we could put comments in the xml file that tells them. Either way then they have to add them up. Or if they want to determine which logs sre on off they are going to have to do some math again. Some people don't understand bitwise. The way it is now is just bam right out there. Usorry for the typos. On my phone
Re: New EQ2Emu Logging
Posted: Fri Sep 03, 2010 11:47 am
by John Adams
Scatman wrote:Unfortunately we can't do css style. We are limited by the colors windows and linux gives us. There's on.y about 12 colors we can use. Edit edit and properties on a command prompt and those are the colors we are allowed to use. I changed the color attribute to accept s number or the name of the color.
Then maybe we drop the #'s and just use english. White, Blue, Magenta, whatevs. I don't see any reason for one or the other.
As for the bitwise values, I think it would make the config far less confusing if it was:
0 = Off (no logging)
1 = Console
2 = File
3 = Console/File
It's not that confusing. Anyone running a server should have some semblance of intellect or, not be messing with non-default logging anyway

Re: New EQ2Emu Logging
Posted: Fri Sep 03, 2010 2:25 pm
by Scatman
Yeah but what if you want 2 types enabled and the other disabled?
Edit:
Oh

I responded too fast. Sure I can do that.
Double Edit:
BUT! We need to think of the other types of logging we may possibly add (client chat) so we dont keep appending values on. Like:
0=off
1=file
2=console
3=file/console
4=chat
5=console/chat
6=console/file
7=chat/file
8=console/chat/file
Get kinda annoying wouldn't it?