level_list.h 870 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * This file is part of the zlog Library.
  3. *
  4. * Copyright (C) 2011 by Hardy Simpson <HardySimpson1984@gmail.com>
  5. *
  6. * Licensed under the LGPL v2.1, see the file COPYING in base directory.
  7. */
  8. #ifndef __zlog_level_list_h
  9. #define __zlog_level_list_h
  10. #include "zc_defs.h"
  11. #include "level.h"
  12. zc_arraylist_t *zlog_level_list_new(void);
  13. void zlog_level_list_del(zc_arraylist_t *levels);
  14. void zlog_level_list_profile(zc_arraylist_t *levels, int flag);
  15. /* conf init use, slow */
  16. /* if l is wrong or str=="", return -1 */
  17. int zlog_level_list_set(zc_arraylist_t *levels, char *line);
  18. /* spec ouput use, fast */
  19. /* rule output use, fast */
  20. /* if not found, return levels[254] */
  21. zlog_level_t *zlog_level_list_get(zc_arraylist_t *levels, int l);
  22. /* rule init use, slow */
  23. /* if not found, return -1 */
  24. int zlog_level_list_atoi(zc_arraylist_t *levels, char *str);
  25. #endif