Getting logs from local server

Content and general development discussion, including quest scripts and server code. TMW Classic is a project comprising the Legacy tmwAthena server & the designated improved engine server based on evolHercules.


Forum rules

This forum houses many years of development, tracing back to some of the earliest posts that exist on the board.

Its current use is for the continued development of the server and game it has always served: TMW Classic.

Post Reply
toplomj3r
Newly Registered User
Posts: 12
Joined: 17 Dec 2014, 01:32

Getting logs from local server

Post 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 ?
User avatar
wushin
TMW Adviser
TMW Adviser
Posts: 1759
Joined: 18 Dec 2012, 05:56
Location: RiverBest, Brew City, Merica
Contact:

Re: Getting logs from local server

Post 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.
The secret to getting all the important stuff done is doing nothing.
toplomj3r
Newly Registered User
Posts: 12
Joined: 17 Dec 2014, 01:32

Re: Getting logs from local server

Post 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.
User avatar
Meicchi
Novice
Novice
Posts: 63
Joined: 21 Dec 2014, 18:44

Re: Getting logs from local server

Post 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 .
Find me in-game:
  • * Puncake (main) - light path mage, lv 79, she is actually a pumpkin
    * Meicchi (retired?) - slow speed archer, eternal lv 70 and Ginny's bastard twin
    * Fluttersly - rage warrior, lv 58, knows no jokes and has a mane
Brazilian Portuguese translation coordinator - Make part! / Faça parte!
https://www.transifex.com/organization/akaras/dashboard
https://wiki.themanaworld.org/index.php/Pt:Main_Page
Spoiler:
Yes, imma noob.
Cassy's official fan-clubber
User avatar
wushin
TMW Adviser
TMW Adviser
Posts: 1759
Joined: 18 Dec 2012, 05:56
Location: RiverBest, Brew City, Merica
Contact:

Re: Getting logs from local server

Post by wushin »

the gm.log is in ./world/map/conf/map_athena.conf

and it should be:

Code: Select all

gm_log: gm.log
The secret to getting all the important stuff done is doing nothing.
toplomj3r
Newly Registered User
Posts: 12
Joined: 17 Dec 2014, 01:32

Re: Getting logs from local server

Post 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 ?
User avatar
wushin
TMW Adviser
TMW Adviser
Posts: 1759
Joined: 18 Dec 2012, 05:56
Location: RiverBest, Brew City, Merica
Contact:

Re: Getting logs from local server

Post 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/
The secret to getting all the important stuff done is doing nothing.
User avatar
gumi
TMW Adviser
TMW Adviser
Posts: 797
Joined: 19 May 2014, 18:18

Re: Getting logs from local server

Post by gumi »

Is he trying to build a NSA-compliant server?
User avatar
wushin
TMW Adviser
TMW Adviser
Posts: 1759
Joined: 18 Dec 2012, 05:56
Location: RiverBest, Brew City, Merica
Contact:

Re: Getting logs from local server

Post 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!
The secret to getting all the important stuff done is doing nothing.
toplomj3r
Newly Registered User
Posts: 12
Joined: 17 Dec 2014, 01:32

Re: Getting logs from local server

Post 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
User avatar
o11c
Grand Knight
Grand Knight
Posts: 2262
Joined: 20 Feb 2011, 21:09
Location: ^ ^

Re: Getting logs from local server

Post 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.
Former programmer for the TMWA server.
toplomj3r
Newly Registered User
Posts: 12
Joined: 17 Dec 2014, 01:32

Re: Getting logs from local server

Post by toplomj3r »

o11c wrote: Seriously don't run tmwa as root.
Can you explain ?
User avatar
AnonDuck
TMW Adviser
TMW Adviser
Posts: 645
Joined: 02 Jan 2009, 04:19
Location: Catland

Re: Getting logs from local server

Post 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.
Head of the TMW Illuminati
Post Reply