/*************************************************
  File name     : slab.c
  Module        : 
  Author        : amir 
  Version       : 0.1   
  Created on    : 2022-06-22
  Description   :

  Modify History:   
  1. Date:        Author:         Modification:
*************************************************/
#include "fusion.h"

#include "ngx_slab.h"
#include "kpacket.h"
#include "threadpool.h"
#include "mw_shutdownmgr.h"
#include "mw_soft_watchdog.h"
#include "xbuf.h"
#include "ringbuffer.h"
#include "mw_mmc.h"
#include "mw_config.h"
#include "ratelimit.h"
#include "hlog.h"
#include "app_main.h"



#define LOG_LEVEL LOG_LEVEL_DEBUG
void log_cb(int loglevel, const char* buf, int len) {
    if (loglevel >= LOG_LEVEL) 
    {
        stderr_logger(loglevel, buf, len);
    }

    if (loglevel >= LOG_LEVEL) {
        file_logger(loglevel, buf, len);
    }
}

int main(void){
    logger_t* log = hv_default_logger();
    hlog_set_handler(log_cb);
    hlog_set_level(LOG_LEVEL);
    hlog_set_file("loop.log");
    app_main_init();
    return 0;
}
