log_api.h 939 B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef LIBLOG_API_H
  2. #define LIBLOG_API_H
  3. #include "log_define.h"
  4. #include "log_builder.h"
  5. LOG_CPP_START
  6. #ifdef WIN32
  7. #undef interface
  8. #endif // WIN32
  9. struct _log_post_option
  10. {
  11. int connect_timeout; // connection timeout seconds, 0 as default
  12. int operation_timeout; // operation timeout seconds, 0 as default
  13. int compress_type; // 0 no compress, 1 lz4
  14. int ntp_time_offset; //time offset between local time and server time
  15. int using_https; // 0 http, 1 https
  16. };
  17. typedef struct _log_post_option log_post_option;
  18. log_status_t sls_log_init(int32_t log_global_flag);
  19. void sls_log_destroy();
  20. post_log_result * post_logs(const char *endpoint, const char * accesskeyId, const char *accessKey, const char *stsToken, lz4_log_buf* buffer, log_post_option * option,
  21. const char *channelId, const char* token, const char* terminalno, const char* reserve1);
  22. void post_log_result_destroy(post_log_result * result);
  23. LOG_CPP_END
  24. #endif