MantisBT - Zandronum |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0002157 | Zandronum | [All Projects] Suggestion | public | 2015-04-01 22:50 | 2018-09-30 21:38 |
|
Reporter | Edward-san | |
Assigned To | Edward-san | |
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | Linux | OS | Ubuntu | OS Version | 14.04 x86-64 |
Product Version | | |
Target Version | 2.1 | Fixed in Version | 2.1 | |
|
Summary | 0002157: Unique crash report file name for the linux server hosts |
Description | Jenova 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. |
Steps To Reproduce | |
Additional Information | |
Tags | No tags attached. |
Relationships | |
Attached Files | |
|
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 | bug_revision_view_page.php?bugnote_id=11986#r6888 |
2015-04-02 21:15 | Dusk | Note Added: 0011987 | |
2015-04-02 21:16 | Dusk | Note Edited: 0011987 | bug_revision_view_page.php?bugnote_id=11987#r6890 |
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 | bug_revision_view_page.php?rev_id=7003#r7003 |
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 | bug_revision_view_page.php?rev_id=7004#r7004 |
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 |
Notes |
|
|
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. |
|
|
(0011985)
|
Konar6
|
2015-04-02 19:26
|
|
FYI you can place each server to its own directory to have unique crashlogs etc. |
|
|
(0011986)
|
Jenova
|
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?
|
|
|
(0011987)
|
Dusk
|
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( ×tamp );
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( ×tamp ) );
logfile = newLogfile;
printf ("%s\n", logfile);
}
|
|
|
|
Implemented the changes and added Dusk to the authors here. |
|
|
(0012168)
|
cobalt
|
2015-04-25 10:03
|
|
|