fluent.logger

Fluent logger implementation.

Fluentd is a missing event collector.

Members

Classes

FluentLogger
class FluentLogger

$(D_PSYMBOL FluentLogger) is a $(D_PSYMBOL Fluentd) client

Logger
class Logger

Base class for Fluent loggers

Tester
class Tester
Undocumented in source.

Examples

struct Event
{
    string text = "This is D";
    long   id   = 0;
}

// Create a configuration
FluentLogger.Configuration conf;
conf.host = "backend1";

// Create a logger with tag prefix and configuration
auto logger = new FluentLogger("app", conf);

// Write Event object with "test" tag to Fluentd 
logger.post("test", Event());
// Fluentd accepts {"text":"This is D","id":0} at "app.test" input

// Disconnect and perform cleanup
logger.close(); // Or destroy(logger);

See Also

Meta

License

<a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.

Authors

Masahiro Nakagawa