int main()
{
  log_DEBUG(PSTR("debug"));
  log_INFORMATIONAL(PSTR("informational"));
  log_NOTICE(PSTR("notice"));
  log_WARNING(PSTR("warning"));
  log_ERROR(PSTR("error"));
  log_CRITICAL(PSTR("critical"));
  log_ALERT(PSTR("alert"));
  log_EMERGENCY(PSTR("emergency"));

  return EXIT_SUCCESS;
}
Beispiel #2
0
	void Logs::NOTICE_LOG(const char* file, int line, const char* function, const char* format, ...)
	{
		if (!Settings::getInstance()->IsLogEnabled)
			return;

		char buffer[2048];
		memset(buffer, 0x00, sizeof(buffer));
		va_list args;
		va_start (args, format);
#if defined(__unix__)
		vsnprintf(buffer, sizeof(buffer) - 1, format, args);
#else
		_vsnprintf_s(buffer, sizeof(buffer) - 1, format, args);
#endif
		log_NOTICE(processLog(file, line, function, buffer));
		va_end(args); 
	}