If linked log file in /dev/shm wasn't writable a new log file with increased seq.no. was created but the old link was also deleted. This was ok before log rotation and file creation with increasing seq.no was implemented but useless and confusing today.

Enabled printing this also in Release version:

raatikka@linux-yxkl:~/bin/develop/bin> ./maxscale -d -c ../
Info : MaxScale will be run in the terminal process.
Using Home directory command-line argument as MAXSCALE_HOME = /home/raatikka/bin/develop
Error log       : /home/raatikka/bin/develop/log/skygw_err1.log
Message log     : /home/raatikka/bin/develop/log/skygw_msg1.log
Trace log       : /home/raatikka/bin/develop/log/skygw_trace1.log->/dev/shm/7886/skygw_trace1.log
Debug log       : /home/raatikka/bin/develop/log/skygw_debug1.log->/dev/shm/7886/skygw_debug1.log
Home directory     : /home/raatikka/bin/develop
Configuration file : /home/raatikka/bin/develop/etc/MaxScale.cnf
Log directory      : /home/raatikka/bin/develop/log
Data directory     : /home/raatikka/bin/develop/data/data7886

That is, all log files' names and locations are printed on the screen.
This commit is contained in:
VilhoRaatikka 2014-12-02 23:15:24 +02:00
parent bdfdc3b522
commit aab30f2eea

View File

@ -2086,7 +2086,6 @@ static bool logfile_create(
/** Found similarly named link which isn't writable */
if (!writable)
{
unlink(lf->lf_full_link_name);
nameconflicts = true;
}
}
@ -2623,7 +2622,7 @@ static bool logfile_init(
logfile_free_memory(logfile);
goto return_with_succp;
}
#if defined(SS_DEBUG)
if (store_shmem)
{
fprintf(stderr, "%s\t: %s->%s\n",
@ -2637,7 +2636,6 @@ static bool logfile_init(
STRLOGNAME(logfile_id),
logfile->lf_full_file_name);
}
#endif
succp = true;
logfile->lf_state = RUN;
CHK_LOGFILE(logfile);