Skip to content

Commit

Permalink
out_file: explain how to use a placeholder in symlink_path (v1.4.0)
Browse files Browse the repository at this point in the history
This is a new feature added in v1.4.0. See:

https://www.fluentd.org/blog/fluentd-v1.4.0-has-been-released

Signed-off-by: Fujimoto Seiji <fujimoto@clear-code.com>
  • Loading branch information
Fujimoto Seiji committed Apr 10, 2019
1 parent f1f7764 commit de56d50
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions docs/v1.0/out_file.txt
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,39 @@ After flushed, you see actual output result
/path/to/file.test.20180405.log_0 # tag is 'test'

See also note in `path` parameter.

### Can I use a placeholder in `symlink_path`?

Since Fluentd v1.4.0, you can use the placeholder syntax in `symlink_path` parameter.
For example, suppose you have the following configuration.

<source>
@type dummy
tag dummy1
</source>

<source>
@type dummy
tag dummy2
</source>

<match dummy*>
@type file
path /tmp/logs/${tag}
symlink_path /tmp/logs/current-${tag}
<buffer tag,time>
@type file
</buffer>
</match>

This produces the following directory layout.

$ tree /tmp/logs/
/tmp/logs/
├── ${tag}
│   ├── buffer.b57fb1dd96306dd0b308e094f7ec2228f.log
│   ├── buffer.b57fb1dd96306dd0b308e094f7ec2228f.log.meta
│   ├── buffer.b57fb1dd96339a870530991d4871cfe11.log
│   └── buffer.b57fb1dd96339a870530991d4871cfe11.log.meta
├── current-dummy1 -> /tmp/logs/${tag}/buffer.b57fb1dd96339a870530991d4871cfe11.log
└── current-dummy2 -> /tmp/logs/${tag}/buffer.b57fb1dd96306dd0b308e094f7ec2228f.log

0 comments on commit de56d50

Please sign in to comment.