Skip to content

Filter Logs

frikilax edited this page Nov 7, 2019 · 8 revisions

Logs filter

Description

Dumb filter that write the body received in Redis and/or in a file.

Filter Code

0x4C4F4753

Dependencies

  • hiredis 0.13 or above

Darwin configuration

Example of darwin configuration for this filter :

{
    "logs_1": {
        "exec_path": "/path/to/darwin/build/darwin_logs",
        "config_file":"/path/to/conf/logs.conf",
        "output": "NONE",
        "next_filter": "",
        "nb_thread": 1,
        "log_level": "DEBUG",
        "cache_size": 0
    }
}

Config file

  • redis_socket_path: the Redis in which the filter will write
  • redis_list_name: the Redis' key under which the filter will write
  • redis_channel_name: the Redis' channel to write the message to
  • log_file_path: the log in which the filter will write

You need to provide at least <log_file_path> and/or <redis_socket_path>.

If <redis_socket_path> is provided, you need to also provide <redis_list_name> and/or <redis_channel_name>.

{
    "redis_socket_path": "/var/sockets/redis/redis.sock",
    "redis_list_name": "logs_darwin",
    "redis_chanle_name": "darwin.logs",
    "log_file_path": "/var/log/darwin/logs.log"
}

Body

A whatever string.

WARNING: the Flogs filter is used as a workaround to get additional context during other filters matches and as such, is not intended to get input from clients. Although it is possible and create usages, we recommend using Flogs as a "front" filter with caution, and at least not request returns from it, as this filter is not intended to give answers !

Clone this wiki locally