Browse Source

Update changelog and docs

DarthSim 5 years ago
parent
commit
eb28352a78
4 changed files with 19 additions and 6 deletions
  1. 4 0
      CHANGELOG.md
  2. 10 3
      docs/configuration.md
  3. 1 1
      docs/generating_the_url_advanced.md
  4. 4 2
      docs/watermark.md

+ 4 - 0
CHANGELOG.md

@@ -2,6 +2,10 @@
 
 
 ## master
 ## master
 
 
+- New default log format;
+- `structured` and `json` log formats. Can be set with `IMGPROXY_LOG_FORMAT`;
+- Better watermarking: image transparency doesn't affect watermarks, faster watermark scaling.
+
 ## v2.4.1
 ## v2.4.1
 
 
 - More verbose URL parsing errors;
 - More verbose URL parsing errors;

+ 10 - 3
docs/configuration.md

@@ -192,15 +192,22 @@ imgproxy can report occurred errors to Bugsnag, Honeybadger and Sentry:
 * `IMGPROXY_SENTRY_ENVIRONMENT`: Sentry environment to report to. Default: `production`.
 * `IMGPROXY_SENTRY_ENVIRONMENT`: Sentry environment to report to. Default: `production`.
 * `IMGPROXY_SENTRY_RELEASE`: Sentry release to report to. Default: `imgproxy/{imgproxy version}`.
 * `IMGPROXY_SENTRY_RELEASE`: Sentry release to report to. Default: `imgproxy/{imgproxy version}`.
 
 
-### Syslog
+### Log
+
+* `IMGPROXY_LOG_FORMAT`: the log format. The following formats are supported:
+  * `pretty`: _(default)_ colored human-readable format;
+  * `structured`: machine-readable format;
+  * `json`: JSON format;
 
 
 imgproxy can send logs to syslog, but this feature is disabled by default. To enable it, set `IMGPROXY_SYSLOG_ENABLE` to `true`:
 imgproxy can send logs to syslog, but this feature is disabled by default. To enable it, set `IMGPROXY_SYSLOG_ENABLE` to `true`:
 
 
 * `IMGPROXY_SYSLOG_ENABLE`: when `true`, enables sending logs to syslog;
 * `IMGPROXY_SYSLOG_ENABLE`: when `true`, enables sending logs to syslog;
-* `IMGPROXY_SYSLOG_LEVEL`: maximum log level to send to syslog. Known levels are: `crit`, `error`, `warning` and `notice`. Default: `notice`;
+* `IMGPROXY_SYSLOG_LEVEL`: maximum log level to send to syslog. Known levels are: `crit`, `error`, `warning` and `info`. Default: `info`;
 * `IMGPROXY_SYSLOG_NETWORK`: network that will be used to connect to syslog. When blank, the local syslog server will be used. Known networks are `tcp`, `tcp4`, `tcp6`, `udp`, `udp4`, `udp6`, `ip`, `ip4`, `ip6`, `unix`, `unixgram` and `unixpacket`. Default: blank;
 * `IMGPROXY_SYSLOG_NETWORK`: network that will be used to connect to syslog. When blank, the local syslog server will be used. Known networks are `tcp`, `tcp4`, `tcp6`, `udp`, `udp4`, `udp6`, `ip`, `ip4`, `ip6`, `unix`, `unixgram` and `unixpacket`. Default: blank;
 * `IMGPROXY_SYSLOG_ADDRESS`: address of the syslog service. Not used if `IMGPROXY_SYSLOG_NETWORK` is blank. Default: blank;
 * `IMGPROXY_SYSLOG_ADDRESS`: address of the syslog service. Not used if `IMGPROXY_SYSLOG_NETWORK` is blank. Default: blank;
-* `IMGPROXY_SYSLOG_TAG`: specific syslogtag. Default: `imgproxy`;
+* `IMGPROXY_SYSLOG_TAG`: specific syslog tag. Default: `imgproxy`;
+
+**Note:** imgproxy always uses structured log format for syslog.
 
 
 ### Memory usage tweaks
 ### Memory usage tweaks
 
 

+ 1 - 1
docs/generating_the_url_advanced.md

@@ -218,7 +218,7 @@ wm:%opacity:%position:%x_offset:%y_offset:%scale
 
 
 Puts watermark on the processed image.
 Puts watermark on the processed image.
 
 
-* `opacity` - watermark opacity modifier. Final opacity is calculated like `base_opacity * opacity`. It's highly recommended to set this argument as `1` and adjust opacity with `IMGPROXY_WATERMARK_OPACITY` since this would optimize performance and memory usage.
+* `opacity` - watermark opacity modifier. Final opacity is calculated like `base_opacity * opacity`.
 * `position` - (optional) specifies the position of the watermark. Available values:
 * `position` - (optional) specifies the position of the watermark. Available values:
   * `ce`: (default) center;
   * `ce`: (default) center;
   * `no`: north (top edge);
   * `no`: north (top edge);

+ 4 - 2
docs/watermark.md

@@ -6,12 +6,14 @@ imgproxy supports watermarking processed images with another image.
 
 
 There are three ways to specify a watermark image using environment variables:
 There are three ways to specify a watermark image using environment variables:
 
 
-* `IMGPROXY_WATERMARK_DATA` - Base64-encoded image data. You can easily calculate it with `base64 tmp/watermark.png | tr -d '\n'`.
+* `IMGPROXY_WATERMARK_DATA` - Base64-encoded image data. You can easily calculate it with `base64 tmp/watermark.webp | tr -d '\n'`.
 * `IMGPROXY_WATERMARK_PATH` - path to the locally stored image.
 * `IMGPROXY_WATERMARK_PATH` - path to the locally stored image.
 * `IMGPROXY_WATERMARK_URL` - watermark image URL.
 * `IMGPROXY_WATERMARK_URL` - watermark image URL.
 
 
 You can also specify the base opacity of watermark with `IMGPROXY_WATERMARK_OPACITY`.
 You can also specify the base opacity of watermark with `IMGPROXY_WATERMARK_OPACITY`.
 
 
+**Note:** If you're going to use `scale` argument of `watermark`, it's highly recommended to use SVG, WebP or JPEG watermarks since these formats support scale-on-load.
+
 ## Watermarking an image
 ## Watermarking an image
 
 
 Watermarks are only available with [advanced URL format](generating_the_url_advanced.md). Use `watermark` processing option to put the watermark on the processed image:
 Watermarks are only available with [advanced URL format](generating_the_url_advanced.md). Use `watermark` processing option to put the watermark on the processed image:
@@ -23,7 +25,7 @@ wm:%opacity:%position:%x_offset:%y_offset:%scale
 
 
 Where arguments are:
 Where arguments are:
 
 
-* `opacity` - watermark opacity modifier. Final opacity is calculated like `base_opacity * opacity`. It's highly recommended to set this argument as `1` and adjust opacity with `IMGPROXY_WATERMARK_OPACITY` since this would optimize performance and memory usage.
+* `opacity` - watermark opacity modifier. Final opacity is calculated like `base_opacity * opacity`.
 * `position` - (optional) specifies the position of the watermark. Available values:
 * `position` - (optional) specifies the position of the watermark. Available values:
   * `ce`: (default) center;
   * `ce`: (default) center;
   * `no`: north (top edge);
   * `no`: north (top edge);