Zandronum Chat on our Discord Server Get the latest version: 3.1
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002157Zandronum[All Projects] Suggestionpublic2015-04-01 22:502018-09-30 21:38
ReporterEdward-san 
Assigned ToEdward-san 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformLinuxOSUbuntuOS Version14.04 x86-64
Product Version 
Target Version2.1Fixed in Version2.1 
Summary0002157: Unique crash report file name for the linux server hosts
DescriptionJenova mentioned an issue with the actual linux crashlog system.

In host server systems like bestever, all the games which are hosted are run with the same zandronum-server executable. If a crash happens in a game, a 'zandronum-crash.log' is saved in the same place as the server executable. If another crash happens from another game, the first crash will be overwritten by the second, making the investigation impossible.




What was suggested as the unique name would be using the crash time, like 'zandronum-crash-04_02_2015-00_40_02.log', though suggestions are welcome.
Attached Files

- Relationships

-  Notes
User avatar (0011982)
Edward-san (developer)
2015-04-02 18:47

Done, though the format of the crashlog is a little bit different: zandronum-crash.log.04_02_2015-20_46_25.log , but should be enough for the scope.
User avatar (0011985)
Konar6 (reporter)
2015-04-02 19:26

FYI you can place each server to its own directory to have unique crashlogs etc.
User avatar (0011986)
Jenova (reporter)
2015-04-02 20:54
edited on: 2015-04-02 21:14

Do you mean a separate zandronum-server executable should be created and placed in its own folder for each server?

User avatar (0011987)
Dusk (developer)
2015-04-02 21:15
edited on: 2015-04-02 21:16

Here's my take on this that places the timestamp without an unnecessary ".log":

#include <stdio.h>
#include <time.h>
#include <string.h>

int main()
{
    const char* logfile = "zandronum-crash.log";
    time_t timestamp;
    char newLogfile[256];

    time( &timestamp );
    char* bufferEnd = newLogfile + sizeof newLogfile;
    strncpy( newLogfile, logfile, sizeof newLogfile );

    // Find the dot in the string and append the formatted time. If the dot is not found, append
    // the date at the end of the string.
    char* appendPoint = strrchr( newLogfile, '.' );

    if ( appendPoint == NULL )
        appendPoint = newLogfile + strlen (newLogfile);

    strftime( appendPoint, bufferEnd - appendPoint, "-%m_%d_%Y-%H_%M_%S.log", localtime( &timestamp ) );
    logfile = newLogfile;

    printf ("%s\n", logfile);
}


User avatar (0011989)
Edward-san (developer)
2015-04-02 21:53

Implemented the changes and added Dusk to the authors here.
User avatar (0012168)
cobalt (updater)
2015-04-25 10:03

Issue addressed by commit bc491eb5d83a: - Make the crash log unique for SDL platforms by appending the timestamp to the file name (addresses 2157).
Committed by edward_san [edward-san] on Sunday 19 April 2015 17:19:52

Changes in files:
 docs/zandronum-history.txt | 1 +
 src/sdl/crashcatcher.c | 21 +++++++++++++++++++++
 2 files changed, 22 insertions(+), 0 deletions(-)

Issue Community Support
This issue is already marked as resolved.
If you feel that is not the case, please reopen it and explain why.
Supporters: WaTaKiD Jenova DevilHunter
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2015-04-01 22:50 Edward-san New Issue
2015-04-01 22:50 Edward-san Status new => assigned
2015-04-01 22:50 Edward-san Assigned To => Edward-san
2015-04-02 18:47 Edward-san Note Added: 0011982
2015-04-02 18:47 Edward-san Status assigned => needs review
2015-04-02 19:26 Konar6 Note Added: 0011985
2015-04-02 20:54 Jenova Note Added: 0011986
2015-04-02 21:14 Jenova Note Edited: 0011986 View Revisions
2015-04-02 21:15 Dusk Note Added: 0011987
2015-04-02 21:16 Dusk Note Edited: 0011987 View Revisions
2015-04-02 21:53 Edward-san Note Added: 0011989
2015-04-25 10:03 cobalt Status needs review => needs testing
2015-04-25 10:03 cobalt Target Version => 1.4
2015-04-25 10:03 cobalt Description Updated View Revisions
2015-04-25 10:03 cobalt Note Added: 0012168
2015-04-25 13:50 Edward-san Target Version 1.4 => 2.1
2015-04-25 13:50 Edward-san Description Updated View Revisions
2015-04-25 13:50 Edward-san Product Version 2.0 =>
2015-06-24 22:46 Dusk Status needs testing => resolved
2015-06-24 22:46 Dusk Fixed in Version => 2.2
2015-06-24 22:46 Dusk Resolution open => fixed
2015-06-24 22:47 Dusk Fixed in Version 2.2 => 2.1
2018-09-30 21:38 Blzut3 Status resolved => closed






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2024 MantisBT Team
Powered by Mantis Bugtracker