@param id Identificador logico. Usado en el DefaultWriter para inicializar el sistema
del log (metodo syslog).
*/
- virtual void initialize(const char* id) throw() = 0;
+ virtual void initialize(const char* id) = 0;
/**
Transfiere el mensaje de trazas al log del sistema. El metodo implementado debe ser
@param level Nivel de las trazas que vamos a sacar.
@param text Especificacion de formato del mensaje. Similar al usado en el comando sprintf.
*/
- virtual void do_write(int level, const char* text, ...) throw() = 0;
+ virtual void do_write(int level, const char* text, ...) = 0;
protected:
/**
@return La instancia del bloque de datos con memoria reservada para poder interpretar los
parametros.
*/
- DataBlock& getDataBlock() throw() { return *a_dataBlock; }
+ DataBlock& getDataBlock() { return *a_dataBlock; }
private:
DataBlock* a_dataBlock;
@see DefaultWriter.
*/
- static void initialize(const char* ident) throw();
+ static void initialize(const char* ident) ;
/**
Inicializa el sistema de historico de nuestra aplicacion. Solo debe invocarse una unica vez
@see DefaultWriter.
*/
- static void initialize(const char* ident, Writer* writer) throw();
+ static void initialize(const char* ident, Writer* writer) ;
/**
@return El nivel de trazado de nuestra aplicacion.
*/
- static Level getLevel() throw() { return st_level; }
+ static Level getLevel() { return st_level; }
/**
Establece el nivel de trazado de nuestra aplicacion. El nivel de trazado por defecto
@param level Nivel de trazado que deseamos establecer.
*/
static void setLevel(const Level level)
- throw(RuntimeException) {
+ noexcept(false) {
Guard guard(st_mutex, "Logger::setLevel");
st_level = (level <= Error) ? Error : level;
}
@return @em true Si el nivel de trazado de nuestra aplicacion es mayor que el recibido como
parametro o @em false en otro caso.
*/
- static bool isActive(const Level level) throw() {
+ static bool isActive(const Level level) {
return (st_writer != NULL && level <= Error) ? true : (st_enabled && level <= st_level && st_writer != NULL);
}
/**
Desactiva el sistema de trazado.
*/
- static void disable() throw(RuntimeException);
+ static void disable() noexcept(false);
/**
Activa el sistema de trazado y establece el nivel de trazado existente antes
de la desactivacion (Ver #disable).
*/
- static void enable() throw(RuntimeException);
+ static void enable() noexcept(false);
/**
* Establece el valor del indicador que hace que se vuelque el PID del proceso en la linea de trazas.
*
* \param showPID Valor del indicador.
*/
- static void showPID(const bool show) throw();
+ static void showPID(const bool show) ;
/**
Traza el texto recibido en el historico con el nivel indicado.
@param fromFile Nombre del archivo donde se genera la traza.
@param fromLine Numero de linea del archivo donde se genera la traza.
*/
- static void write(const Level level, const char* text, const char* fromFile, const int fromLine) throw();
+ static void write(const Level level, const char* text, const char* fromFile, const int fromLine) ;
/**
Traza el texto recibido en el historico con el nivel indicado.
@param fromFile Nombre del archivo donde se genera la traza.
@param fromLine Numero de linea del archivo donde se genera la traza.
*/
- static void write(const Level level, const std::string& text, const char* fromFile, const int fromLine) throw() {
+ static void write(const Level level, const std::string& text, const char* fromFile, const int fromLine) {
write(level, text.c_str(), fromFile, fromLine);
}
@param fromFile Nombre del archivo donde se genera la traza.
@param fromLine Numero de linea del archivo donde se genera la traza.
*/
- static void write(const Level level, const char* text, const char* value, const char* fromFile, const int fromLine) throw();
+ static void write(const Level level, const char* text, const char* value, const char* fromFile, const int fromLine) ;
/**
Traza el texto recibido en el historico con el nivel indicado.
@param fromLine Numero de linea del archivo donde se genera la traza.
*/
static void write(const Level level, const char* text, const std::string& value, const char* fromFile, const int fromLine)
- throw() {
+ {
write(level, text, value.c_str(), fromFile, fromLine);
}
@param fromLine Numero de linea del archivo donde se genera la traza.
*/
static void write(const Level level, const std::string& text, const std::string& value, const char* fromFile, const int fromLine)
- throw() {
+ {
write(level, text.c_str(), value.c_str(), fromFile, fromLine);
}
@param fromLine Numero de linea del archivo donde se genera la traza.
*/
static void write(const Level level, const char* text, const int value, const char* fromFile, const int fromLine)
- throw();
+ ;
/**
Traza el texto recibido en el historico con el nivel indicado.
@param fromLine Numero de linea del archivo donde se genera la traza.
*/
static void write(const Level level, const char* text, const DataBlock& value, const char* fromFile, const int fromLine)
- throw();
+ ;
/**
Si el nivel \em Debug esta activado traza el texto recibido en el historico.
@param fromLine Numero de linea del archivo donde se genera la traza.
*/
static void debug(const std::string& text, const char* fromFile, const int fromLine)
- throw() {
+ {
write(Logger::Debug, text, fromFile, fromLine);
}
@param fromLine Numero de linea del archivo donde se genera la traza.
*/
static void information(const std::string& text, const char* fromFile, const int fromLine)
- throw() {
+ {
write(Logger::Information, text, fromFile, fromLine);
}
@param fromLine Numero de linea del archivo donde se genera la traza.
*/
static void notice(const std::string& text, const char* fromFile, const int fromLine)
- throw() {
+ {
write(Logger::Notice, text, fromFile, fromLine);
}
@param fromLine Numero de linea del archivo donde se genera la traza.
*/
static void warning(const std::string& text, const char* fromFile, const int fromLine)
- throw() {
+ {
write(Logger::Warning, text, fromFile, fromLine);
}
@param fromLine Numero de linea del archivo donde se genera la traza.
*/
static void error(const std::string& text, const char* fromFile, const int fromLine)
- throw() {
+ {
write(Logger::Error, text, fromFile, fromLine);
}
@param fromLine Numero de linea del archivo donde se genera la traza.
*/
static void critical(const std::string& text, const char* fromFile, const int fromLine)
- throw() {
+ {
write(Logger::Critical, text, fromFile, fromLine);
}
@param fromLine Numero de linea del archivo donde se genera la traza.
*/
static void alert(const std::string& text, const char* fromFile, const int fromLine)
- throw() {
+ {
write(Logger::Alert, text, fromFile, fromLine);
}
@param fromLine Numero de linea del archivo donde se genera la traza.
*/
static void emergency(const std::string& text, const char* fromFile, const int fromLine)
- throw() {
+ {
write(Logger::Emergency, text, fromFile, fromLine);
}
@return La cadena que identifica al nivel recibido como parametro.
*/
- static const char* asString(const Level level) throw();
+ static const char* asString(const Level level) ;
/**
Traduce la cadena recibida al nivel correspondiente.
\warning Debe de ser alguno de los siguiente literales: emerg, alert, crit, err, warning, notice, info, debug
*/
- static Level asLevel(const char* level) throw(RuntimeException);
+ static Level asLevel(const char* level) noexcept(false);
private:
static NRMutex st_mutex;