rc.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /* $Id$
  2. *
  3. * rc.h
  4. *
  5. * Copyright 2001-2003, Meiosys (www.meiosys.com). All rights reserved.
  6. *
  7. * See the COPYING file for the terms of usage and distribution.
  8. */
  9. #ifndef __log4c_rc_h
  10. #define __log4c_rc_h
  11. /**
  12. * @file rc.h
  13. *
  14. * @brief log4c resource configuration
  15. *
  16. **/
  17. #include <log4c/defs.h>
  18. __LOG4C_BEGIN_DECLS
  19. /**
  20. * @brief resource configuration object
  21. *
  22. * Attributes description:
  23. *
  24. * @li @c nocleanup don't perform memory cleanup in log4c library
  25. * destructor or in log4c_fini()
  26. * @li @c bufsize maximum logging buffer size. 0 for no limits
  27. * @li @c debug activate log4c debugging
  28. **/
  29. typedef struct
  30. {
  31. struct
  32. {
  33. int nocleanup;
  34. int bufsize;
  35. int debug;
  36. int reread;
  37. } config;
  38. } log4c_rc_t;
  39. /**
  40. * default log4c resource configuration object
  41. **/
  42. LOG4C_API log4c_rc_t * const log4c_rc;
  43. /**
  44. * load log4c resource configuration file
  45. *
  46. * @param a_filename name of file to load
  47. **/
  48. LOG4C_API int log4c_load(const char* a_filename);
  49. /**
  50. * @internal
  51. **/
  52. LOG4C_API int log4c_rc_load(log4c_rc_t* a_rc, const char* a_filename);
  53. /*
  54. * Rereads any log4crc files that have changed
  55. */
  56. LOG4C_API void log4c_reread(void);
  57. __LOG4C_END_DECLS
  58. #endif