Page 1 of 1

Getting logs from local server

Posted: 20 Jan 2015, 23:54
by toplomj3r
Hi guys,

I've already asked this question on dev IRC but I haven't got an correct answer.
So the thing is I'm trying to make some experiments with server and I need logging more than anything. I've installed tmwa on my webserver following instructions from How to develop wiki, but the problem is that there are missing some log files for the map.

I've managed to get char.log and login.log simply by creating log file in parent's directory and logs are being generated into that dir.

Also I've enabled map logging (map_log: log/map.log) at
/root/tmwAthena/tmwa-server-data/world/map/conf

and restarted gaming server but map logging still doesn't work.

Does anyone know how can I enable map logging on my server so it looks like here https://server.themanaworld.org/logs/ ? Or at least, can anyone give me some options what could I do to solve this problem ?

Re: Getting logs from local server

Posted: 21 Jan 2015, 04:58
by wushin
Change the setting in world/map/conf/map_local.conf from map_log to log_file. It would appear that the world/map/conf/map_local.conf.example was outdated.

Re: Getting logs from local server

Posted: 21 Jan 2015, 10:49
by toplomj3r
wushin wrote:Change the setting in world/map/conf/map_local.conf from map_log to log_file.
Great ! Tnx ! That worked, it rally was outdated.

Still I can't get gm logs from map_athena.conf which are in same dir as map_local.conf .
Current config looks like :

gm_log: gm.log

Do you know if there is something outdated too ?

SOLVED:

Yeah it's outdated too !

it sholuld look like log_file: log/gm/gm.log

I guess, correct me if I'm wrong.

Re: Getting logs from local server

Posted: 21 Jan 2015, 13:16
by Meicchi
toplomj3r wrote: Still I can't get gm logs from map_athena.conf which are in same dir as map_local.conf .
Current config looks like :

gm_log: gm.log

Do you know if there is something outdated too ?

SOLVED:

Yeah it's outdated too !

it sholuld look like log_file: log/gm/gm.log

I guess, correct me if I'm wrong.
Actually gm_log is correct as defined on map_config_read in server, it will generate something like <logdir>/gm.log.yyyy-mm .

Re: Getting logs from local server

Posted: 21 Jan 2015, 15:20
by wushin
the gm.log is in ./world/map/conf/map_athena.conf

and it should be:

Code: Select all

gm_log: gm.log

Re: Getting logs from local server

Posted: 21 Jan 2015, 15:53
by toplomj3r
wushin wrote:the gm.log is in ./world/map/conf/map_athena.conf

and it should be:

Code: Select all

gm_log: gm.log
Ok, that doesn't work for me but i have bigger problems than that for now. I will fix that later :)

Does anyone know where are kept chat(party,whisper) informations, they must be kept somewhere because I can see my chat with my friend after i logged out and logged back in ? Or I'm missing something on that issue ? Are chat logs kept on the client side or what ?

Also I was wondering, what does it take to format logs like they are formatted on main game server map.scrubbed.date format ?

Re: Getting logs from local server

Posted: 21 Jan 2015, 15:56
by wushin
Chat logs are client side.

Settings -> Chat -> Limits controls the length

Logs themselves I'd imagine are kept in the local user folder.

Code: Select all

ls ~/.tmw/

Re: Getting logs from local server

Posted: 21 Jan 2015, 17:09
by gumi
Is he trying to build a NSA-compliant server?

Re: Getting logs from local server

Posted: 21 Jan 2015, 17:17
by wushin
Nah, most likely just a private server with complete logging cause A) it's using the dogecoins B) part of ModelMMORPG C) Aliens!

Re: Getting logs from local server

Posted: 21 Jan 2015, 17:45
by toplomj3r
Tnx a lot Wushin.

I found my local chat logs and I'll look trough my options considering chat logging.

I'm trying to modify server because this is part of scientific reasearch project, we will try to observe users behaveour so we could make model how users interact in solving complex quests.

We will make few custom quests so we could track them and it will be hosted on our server.

After we make models we will implement inteligent agents (Artificial intelligence stuff) which will be able to solve quests in human way (at least we hope so). This project will last for few years so I think it's serous academic stuff. I'm just student trying to get the logging system work :?

If you're interested you can read more about it here http://ai.foi.hr/modelmmorpg.php

Re: Getting logs from local server

Posted: 21 Jan 2015, 20:14
by o11c
Seriously don't run tmwa as root.

One caveat about logs is that if for some reason tmwa can't open the log, it will not output anything. Usually this is a problem if the log dir doesn't exist.

Re: Getting logs from local server

Posted: 22 Jan 2015, 10:08
by toplomj3r
o11c wrote: Seriously don't run tmwa as root.
Can you explain ?

Re: Getting logs from local server

Posted: 22 Jan 2015, 19:38
by AnonDuck
I'll be gentle as you're obviously not too experienced with unix/linux systems.. The root user has full access to everything on the system.

Therefore you don't want to run anything as root unless you *have* to, as any bugs or vulnerabilities in the service will grant an attacker full control of the machine. They can then use this full control to completely hide themselves, then sniff your network and keystrokes to gain access to other systems on your network, launch DDoS attacks, or scan large government networks for vulnerabilities. You don't want to deal with this and it happens more than you'd think!

You should create a user on the system to run tmwa under. User accounts are limited by default and do not have full control of the machine so can't do nearly as many nasty things if the service is exploited. Generally it's just 'adduser username', and 'passwd username' to set a password for it. Login or su to this user and install tmwa there. Do everything under this account.

This advice goes for just about any service you want to run on a linux system. If the service comes as a package supplied by the operating system vendor(eg: ubuntu) it probably handles dropping root privileges in the background without you having to bother changing anything. For instance apache/php runs as the user 'www-data'. If it's something extra you're installing by hand like tmwa, an IRC server, or whatever.. Make a user account for it!

Oh and if it's a desktop machine with a graphical interface etc.. Don't login directly as root, ever. Make a user account and use it instead.

Learning a bit about file and user permissions is probably a good idea if you're going to be working with linux for any length of time.. http://www.grymoire.com/Unix/Permissions.html seems like a good quick rundown.