From 813fde30c01099305570c263ccb696030d66448f Mon Sep 17 00:00:00 2001 From: cn Date: Thu, 23 Nov 2017 20:15:36 +0100 Subject: [PATCH] docs: change syntax name, add example --- CHANGELOG.md | 6 +++++ README.md | 4 +-- example.fluent.conf | 63 +++++++++++++++++++++++++++++++++++++++++++ grammars/fluentd.cson | 2 +- package.json | 2 +- 5 files changed, 73 insertions(+), 4 deletions(-) create mode 100644 example.fluent.conf diff --git a/CHANGELOG.md b/CHANGELOG.md index cf0275e..4ecde95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 1.1.0 + +IMPROVEMENTS: + +- Add example Fluentd Configuration file using as many Fluentd features as possible even if they are not highlighted correctly + ## 1.0.0 (November 22, 2017) NEW FEATURES: diff --git a/README.md b/README.md index 330610f..929ea00 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Fluentd Config File language support in Atom +# Fluentd Configuration language support in Atom -Adds basic syntax highlighting based on the [Sublime Text and TextMate package](https://github.com/adamchainz/fluentd.tmLanguage) to `fluent.conf` files in Atom. +Adds basic syntax highlighting based on the [Sublime Text and TextMate package](https://github.com/adamchainz/fluentd.tmLanguage) with some improvements to `fluent.conf` files in Atom. ## License diff --git a/example.fluent.conf b/example.fluent.conf new file mode 100644 index 0000000..d36f1b7 --- /dev/null +++ b/example.fluent.conf @@ -0,0 +1,63 @@ + +# Receive events from 24224/tcp +# This is used by log forwarding and the fluent-cat command + + @type forward + port 24224 + str_param "foo # This line is converted to "foo\nbar". NL is kept in the parameter + bar" + array_param [ + "a", "b" + ] + hash_param { + "k":"v", + "k1":10 + } + host_param "#{Socket.gethostname}" # host_param is actual hostname like `webserver1`. + env_param "foo-#{ENV["FOO_BAR"]}" # NOTE that foo-"#{ENV["FOO_BAR"]}" doesn't work. + + + + @type tail + @label @SYSTEM + + +# http://this.host:9880/myapp.access?json={"event":"data"} + + @type http + port 9880 + + + + @type record_transformer + + host_param "#{Socket.gethostname}" + + + + + @type file + path /var/log/fluent/access + + + + + + # equal to -qq option + log_level error + # equal to --without-source option + without_source + # ... + + +# Include config files in the ./config.d directory +@include config.d/*.conf diff --git a/grammars/fluentd.cson b/grammars/fluentd.cson index 7ae55bb..d958b32 100644 --- a/grammars/fluentd.cson +++ b/grammars/fluentd.cson @@ -1,5 +1,5 @@ scopeName: 'source.fluentd' -name: 'Fluentd Config File' +name: 'Fluentd Configuration' fileTypes: [ 'fluent.conf' ] diff --git a/package.json b/package.json index 1f39df2..92becee 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "language-fluentd", - "description": "Fluentd Config File language support in Atom", + "description": "Fluentd Configuration language support in Atom", "version": "1.0.0", "engines": { "atom": "*"