elog_port.c 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. /*
  2. * This file is part of the EasyLogger Library.
  3. *
  4. * Copyright (c) 2015, Armink, <armink.ztl@gmail.com>
  5. *
  6. * Permission is hereby granted, free of charge, to any person obtaining
  7. * a copy of this software and associated documentation files (the
  8. * 'Software'), to deal in the Software without restriction, including
  9. * without limitation the rights to use, copy, modify, merge, publish,
  10. * distribute, sublicense, and/or sell copies of the Software, and to
  11. * permit persons to whom the Software is furnished to do so, subject to
  12. * the following conditions:
  13. *
  14. * The above copyright notice and this permission notice shall be
  15. * included in all copies or substantial portions of the Software.
  16. *
  17. * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
  18. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  19. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  20. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
  21. * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  22. * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  23. * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  24. *
  25. * Function: Portable interface for each platform.
  26. * Created on: 2015-04-28
  27. */
  28. #include <elog.h>
  29. /**
  30. * EasyLogger port initialize
  31. *
  32. * @return result
  33. */
  34. ElogErrCode elog_port_init(void) {
  35. ElogErrCode result = ELOG_NO_ERR;
  36. /* add your code here */
  37. return result;
  38. }
  39. /**
  40. * EasyLogger port deinitialize
  41. *
  42. */
  43. void elog_port_deinit(void) {
  44. /* add your code here */
  45. }
  46. /**
  47. * output log port interface
  48. *
  49. * @param log output of log
  50. * @param size log size
  51. */
  52. void elog_port_output(const char *log, size_t size) {
  53. /* add your code here */
  54. }
  55. /**
  56. * output lock
  57. */
  58. void elog_port_output_lock(void) {
  59. /* add your code here */
  60. }
  61. /**
  62. * output unlock
  63. */
  64. void elog_port_output_unlock(void) {
  65. /* add your code here */
  66. }
  67. /**
  68. * get current time interface
  69. *
  70. * @return current time
  71. */
  72. const char *elog_port_get_time(void) {
  73. /* add your code here */
  74. }
  75. /**
  76. * get current process name interface
  77. *
  78. * @return current process name
  79. */
  80. const char *elog_port_get_p_info(void) {
  81. /* add your code here */
  82. }
  83. /**
  84. * get current thread name interface
  85. *
  86. * @return current thread name
  87. */
  88. const char *elog_port_get_t_info(void) {
  89. /* add your code here */
  90. }