print a small log message with the config file name
This commit is contained in:
parent
bd26b9cb2a
commit
b8e6af28fe
10
ChangeLog
10
ChangeLog
|
@ -1,9 +1,15 @@
|
||||||
ChangeLog
|
ChangeLog
|
||||||
---------
|
---------
|
||||||
|
|
||||||
2008-12-14 20:17 Juan José Gutiérrez de Quevedo <juanjo@gutierrezdequevedo.com>
|
2011-01-06 23:53 Juan José Gutiérrez de Quevedo <juanjo@gutierrezdequevedo.com>
|
||||||
|
|
||||||
* 1.7 release
|
* development restarted
|
||||||
|
|
||||||
|
* print a small message about which config file we are actually using. Some
|
||||||
|
people seem to have gotten confused about this...
|
||||||
|
|
||||||
|
|
||||||
|
2008-12-14 20:17 Juan José Gutiérrez de Quevedo <juanjo@gutierrezdequevedo.com>
|
||||||
|
|
||||||
* Implemented log rotation for filelogger. Sponsored by Damir Simunic of
|
* Implemented log rotation for filelogger. Sponsored by Damir Simunic of
|
||||||
http://edgeof.net
|
http://edgeof.net
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
*/
|
*/
|
||||||
#include "Configfile.h"
|
#include "Configfile.h"
|
||||||
|
|
||||||
|
extern LOGGER_CLASS hermes_log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* default config
|
* default config
|
||||||
*
|
*
|
||||||
|
@ -34,6 +36,7 @@ void Configfile::parse(string file)
|
||||||
char line[255];
|
char line[255];
|
||||||
int equalpos;
|
int equalpos;
|
||||||
|
|
||||||
|
hermes_log.addMessage(LOG_INFO,"parsing "+Utils::get_canonical_filename(file)+" configuration file");
|
||||||
f.open(file.c_str(),ios::in);
|
f.open(file.c_str(),ios::in);
|
||||||
while(!f.eof())
|
while(!f.eof())
|
||||||
{
|
{
|
||||||
|
|
|
@ -346,6 +346,17 @@ bool Utils::file_exists(string file)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string Utils::get_canonical_filename(string file)
|
||||||
|
{
|
||||||
|
char *buffer=NULL;
|
||||||
|
string result;
|
||||||
|
|
||||||
|
buffer=realpath(file.c_str(),NULL);
|
||||||
|
result=buffer;
|
||||||
|
free(buffer);
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* whether a directory is accesible by current process/user
|
* whether a directory is accesible by current process/user
|
||||||
*
|
*
|
||||||
|
|
|
@ -74,6 +74,7 @@ class Utils
|
||||||
#endif //WIN32
|
#endif //WIN32
|
||||||
|
|
||||||
//misc
|
//misc
|
||||||
|
static string get_canonical_filename(string);
|
||||||
static bool file_exists(string);
|
static bool file_exists(string);
|
||||||
static bool dir_exists(string);
|
static bool dir_exists(string);
|
||||||
static string errnotostrerror(int);
|
static string errnotostrerror(int);
|
||||||
|
|
Loading…
Reference in a new issue