Skip to content
This repository has been archived by the owner on Jan 28, 2024. It is now read-only.

roadman/fluent-logger-c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fluent Logger for C

Install

$ cd fluent-logger-c
$ make
$ sudo make install

Quickstart

#include <stdio.h>
#include "fluentlogger.h"

int main()
{
    fluent_context_t *c = fluent_connect("127.0.0.1", 24225);
    if(c == NULL)
    {
        printf("connect error\n");
        return(1);
    }

    if(fluent_post_json(c, "debug.test", "{\"Hello\":\"MessagePack\"}") != 0)
    {
        fluent_free(c);
        printf("post error\n");
        return(1);
    }

    fluent_free(c);

    return(0);
}

License

Apache License, Version 2.0

About

A structured logger for Fluentd (C)

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages