Commit Graph

316 Commits

Author SHA1 Message Date
Loïc Hoguin d5e3bdd623
Add ADDITIONAL_PLUGINS variable
This allows including additional applications or third party
plugins when creating a release, running the broker locally,
or just building from the top-level Makefile.

To include Looking Glass in a release, for example:

$ make package-generic-unix ADDITIONAL_PLUGINS="looking_glass"

A Docker image can then be built using this release and will
contain Looking Glass:

$ make docker-image

Beware macOS users! Applications such as Looking Glass include
NIFs. NIFs must be compiled in the right environment. If you
are building a Docker image then make sure to build the NIF
on Linux! In the two steps above, this corresponds to Step 1.

To run the broker with Looking Glass available:

$ make run-broker ADDITIONAL_PLUGINS="looking_glass"

This commit also moves Looking Glass dependency information
into rabbitmq-components.mk so it is available at all times.
2021-03-12 12:29:28 +01:00
Jean-Sébastien Pédron cdcf602749
Switch from Lager to the new Erlang Logger API for logging
The configuration remains the same for the end-user. The only exception
is the log root directory: it is now set through the `log_root`
application env. variable in `rabbit`. People using the Cuttlefish-based
configuration file are not affected by this exception.

The main change is how the logging facility is configured. It now
happens in `rabbit_prelaunch_logging`. The `rabbit_lager` module is
removed.

The supported outputs remain the same: the console, text files, the
`amq.rabbitmq.log` exchange and syslog.

The message text format slightly changed: the timestamp is more precise
(now to the microsecond) and the level can be abbreviated to always be
4-character long to align all messages and improve readability. Here is
an example:

    2021-03-03 10:22:30.377392+01:00 [dbug] <0.229.0> == Prelaunch DONE ==
    2021-03-03 10:22:30.377860+01:00 [info] <0.229.0>
    2021-03-03 10:22:30.377860+01:00 [info] <0.229.0>  Starting RabbitMQ 3.8.10+115.g071f3fb on Erlang 23.2.5
    2021-03-03 10:22:30.377860+01:00 [info] <0.229.0>  Licensed under the MPL 2.0. Website: https://rabbitmq.com

The example above also shows that multiline messages are supported and
each line is prepended with the same prefix (the timestamp, the level
and the Erlang process PID).

JSON is also supported as a message format and now for any outputs.
Indeed, it is possible to use it with e.g. syslog or the exchange. Here
is an example of a JSON-formatted message sent to syslog:

    Mar  3 11:23:06 localhost rabbitmq-server[27908] <0.229.0> - {"time":"2021-03-03T11:23:06.998466+01:00","level":"notice","msg":"Logging: configured log handlers are now ACTIVE","meta":{"domain":"rabbitmq.prelaunch","file":"src/rabbit_prelaunch_logging.erl","gl":"<0.228.0>","line":311,"mfa":["rabbit_prelaunch_logging","configure_logger",1],"pid":"<0.229.0>"}}

For quick testing, the values accepted by the `$RABBITMQ_LOGS`
environment variables were extended:
  * `-` still means stdout
  * `-stderr` means stderr
  * `syslog:` means syslog on localhost
  * `exchange:` means logging to `amq.rabbitmq.log`

`$RABBITMQ_LOG` was also extended. It now accepts a `+json` modifier (in
addition to the existing `+color` one). With that modifier, messages are
formatted as JSON intead of plain text.

The `rabbitmqctl rotate_logs` command is deprecated. The reason is
Logger does not expose a function to force log rotation. However, it
will detect when a file was rotated by an external tool.

From a developer point of view, the old `rabbit_log*` API remains
supported, though it is now deprecated. It is implemented as regular
modules: there is no `parse_transform` involved anymore.

In the code, it is recommended to use the new Logger macros. For
instance, `?LOG_INFO(Format, Args)`. If possible, messages should be
augmented with some metadata. For instance (note the map after the
message):

    ?LOG_NOTICE("Logging: switching to configured handler(s); following "
                "messages may not be visible in this log output",
                #{domain => ?RMQLOG_DOMAIN_PRELAUNCH}),

Domains in Erlang Logger parlance are the way to categorize messages.
Some predefined domains, matching previous categories, are currently
defined in `rabbit_common/include/logging.hrl` or headers in the
relevant plugins for plugin-specific categories.

At this point, very few messages have been converted from the old
`rabbit_log*` API to the new macros. It can be done gradually when
working on a particular module or logging.

The Erlang builtin console/file handler, `logger_std_h`, has been forked
because it lacks date-based file rotation. The configuration of
date-based rotation is identical to Lager. Once the dust has settled for
this feature, the goal is to submit it upstream for inclusion in Erlang.
The forked module is calld `rabbit_logger_std_h` and is based
`logger_std_h` in Erlang 23.0.
2021-03-11 15:17:36 +01:00
dcorbacho 61f7b2a723 Update to ranch 2.0 2021-03-08 23:11:05 +01:00
Michael Klishin b6c4831e75
Bump Lager to 3.9.1 2021-03-04 04:36:39 +03:00
Loïc Hoguin 66ac1bf5e9
Bump observer_cli to 1.6.1
More responsive when the system is overloaded with file calls.
2021-03-01 21:55:27 +03:00
Michael Klishin 8fe3df9343
Upgrade Lager to 3.9.0 for OTP 24 compatibility
`lager_util:expand_path/1` use changes are
due to erlang-lager/lager#540
2021-02-26 00:52:15 +03:00
Michael Klishin f73e851f9c
Bump observer_cli to 1.6.0 2021-02-24 12:53:55 +03:00
Michael Klishin a5098b28a7
Bump Lager to 3.8.2 for OTP 24 compatibility 2021-02-24 12:53:30 +03:00
Michael Klishin b11a79cccf
Bump (c) year in header files 2021-02-04 07:04:58 +03:00
Arnaud Cogoluègnes b921ac11a8
Merge pull request #2712 from rabbitmq/rabbitmq-stream-prometheus
Add stream prometheus plugin
2021-01-27 16:46:37 +01:00
Michael Klishin 52479099ec
Bump (c) year 2021-01-22 09:00:14 +03:00
Arnaud Cogoluègnes bf72683eb2
Add stream prometheus plugin 2021-01-11 16:49:56 +01:00
Arnaud Cogoluègnes 23d7e8114c
Introduce stream management plugin 2020-11-19 14:48:25 +01:00
Arnaud Cogoluègnes ffbe2e41c7 Update rabbitmq-components.mk 2020-11-03 14:27:47 +01:00
Michael Klishin b55e494cb5 Update rabbitmq-components.mk 2020-10-21 12:55:43 +03:00
Luke Bakken 74b2991723 Update rabbitmq-components.mk 2020-08-04 08:41:49 -07:00
Jean-Sébastien Pédron ce9bd1531c Update rabbitmq-components.mk 2020-07-30 12:06:56 +02:00
Luke Bakken 02a03b84cb Update rabbitmq-components.mk 2020-07-29 10:02:05 -07:00
dcorbacho 4f4f319758 Update erlang.mk 2020-07-21 14:33:22 +01:00
Michael Klishin 441117253e Update rabbitmq-components.mk 2020-07-21 13:12:53 +03:00
Michael Klishin 48a3fc2c54 Update rabbitmq-components.mk 2020-07-21 03:45:15 +03:00
dcorbacho 12330efc54 Revert drop of Exhibit B on MPL 2.0 2020-07-20 17:03:05 +01:00
dcorbacho e3a7ba7707 Update LICENSE 2020-07-20 12:08:32 +01:00
Michael Klishin 88483b3b5c Switch to MPL2 2020-07-14 17:45:27 +03:00
Jean-Sébastien Pédron cbf3e26896 Update erlang.mk 2020-06-23 17:14:59 +02:00
Michael Klishin 67dc47c023 Update rabbitmq-components.mk 2020-06-10 19:51:20 +03:00
Jean-Sébastien Pédron 8ba3d74930 Update copyright (year 2020) 2020-03-10 16:43:01 +01:00
Michael Klishin 9b82623b0a Merge branch 'master' into polish-urls-remaining-master 2020-03-09 11:17:20 +03:00
Michael Klishin 9c109eadf6 Update license file name 2020-03-09 10:48:26 +03:00
Michael Klishin 597c4740f9 Correct misleading licensing info
This plugin had a few copy-and-paste artifacts:

 * MPL 2 licenses were used instead of MPL 1.1 (as the rest of RabbitMQ 
does)
 * LICENSE.md claimed that the license is actually MIT

It was never the intent of the core team to use either
license as that would contradict the license used by all
other tier 1 plugins.
2020-03-09 10:47:00 +03:00
Gerhard Lazu a6c74a7405 Update rabbitmq-components.mk 2020-03-06 09:19:19 +00:00
Gerhard Lazu 34fa8d14d0 Update erlang.mk 2020-03-06 09:18:16 +00:00
Jean-Sébastien Pédron 3b80e38813 Travis CI: Update config from rabbitmq-common 2020-03-04 14:24:31 +01:00
Jean-Sébastien Pédron 6c00d4fd12 Travis CI: Update config from rabbitmq-common 2020-03-04 11:17:17 +01:00
Jean-Sébastien Pédron d5e81c9211 system_SUITE: Give a chance to all messages to be queued
After queues are declared and bound, we wait a few seconds so that
recent messages are queued.

Otherwise, in CI, we sometimes see that a message or two are missing.
2020-03-03 16:50:44 +01:00
Jean-Sébastien Pédron b2eeab0a7a Travis CI: Update config from rabbitmq-common 2020-03-03 14:53:41 +01:00
Gerhard Lazu a823d76094 Update rabbitmq-components.mk 2020-02-11 15:31:47 +00:00
Michael Klishin 194db079ae (c) bump 2019-12-29 05:50:34 +03:00
Jean-Sébastien Pédron 56d42b45e3 Git: Ignore copied CLI 2019-12-12 15:04:35 +01:00
Jean-Sébastien Pédron 56379c2bd4 Update rabbitmq-components.mk 2019-12-12 13:14:57 +01:00
kjnilsson 6c445514d0 Update rabbitmq-components.mk 2019-09-13 10:24:29 +01:00
kjnilsson 1054d3aeb0 Update rabbitmq-components.mk 2019-09-04 10:31:08 +01:00
Jean-Sébastien Pédron bd30f3b3c2 Update erlang.mk 2019-08-29 20:45:46 +02:00
Michael Klishin 2bf829cdef Update rabbitmq-components.mk 2019-08-11 01:48:05 +10:00
Jean-Sébastien Pédron dcda3a9066 Update erlang.mk 2019-08-02 09:54:35 +02:00
Michael Klishin 0b17efb4d3 Update rabbitmq-components.mk 2019-08-01 17:13:26 +03:00
Arnaud Cogoluègnes 21deb11fab Update rabbitmq-components.mk 2019-07-09 16:06:08 +02:00
Jean-Sébastien Pédron 0433a31c4b Update rabbitmq-components.mk 2019-06-28 16:05:39 +02:00
Jean-Sébastien Pédron bec820b224 Update erlang.mk 2019-06-28 16:02:41 +02:00
Gerhard Lazu 9c6b3325d3 Update rabbitmq-components.mk 2019-06-03 02:23:45 +01:00
Jean-Sébastien Pédron d42601b165 Update rabbitmq-components.mk 2019-05-17 15:17:25 +02:00
Michael Klishin 183bf717bc Update rabbitmq-components.mk 2019-05-17 08:37:08 +03:00
Michael Klishin 1b0f734919 Update rabbitmq-components.mk 2019-05-14 11:51:00 +03:00
Michael Klishin 40116b9889 Update rabbitmq-components.mk 2019-05-13 16:40:44 +03:00
Gerhard Lazu 2b67cf2ded Update rabbitmq-components.mk 2019-05-01 13:18:23 +01:00
Luke Bakken 62c8afa0f5 Update rabbitmq-components.mk 2019-04-30 16:21:02 -07:00
Jean-Sébastien Pédron 79f6a1c082 Update rabbitmq-components.mk 2019-04-30 14:47:37 +02:00
Gerhard Lazu fa6d524577 Update rabbitmq-components.mk 2019-04-22 21:55:13 +01:00
Spring Operator 5cbcafbc73 URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# HTTP URLs that Could Not Be Fixed
These URLs were unable to be fixed. Please review them to see if they can be manually resolved.

* http://blog.listincomprehension.com/search/label/procket (200) with 1 occurrences could not be migrated:
   ([https](https://blog.listincomprehension.com/search/label/procket) result ClosedChannelException).
* http://dozzie.jarowit.net/trac/wiki/TOML (200) with 1 occurrences could not be migrated:
   ([https](https://dozzie.jarowit.net/trac/wiki/TOML) result SSLHandshakeException).
* http://dozzie.jarowit.net/trac/wiki/subproc (200) with 1 occurrences could not be migrated:
   ([https](https://dozzie.jarowit.net/trac/wiki/subproc) result SSLHandshakeException).
* http://e2project.org (200) with 1 occurrences could not be migrated:
   ([https](https://e2project.org) result AnnotatedConnectException).
* http://nitrogenproject.com/ (200) with 2 occurrences could not be migrated:
   ([https](https://nitrogenproject.com/) result ConnectTimeoutException).
* http://proper.softlab.ntua.gr (200) with 1 occurrences could not be migrated:
   ([https](https://proper.softlab.ntua.gr) result SSLHandshakeException).
* http://yaws.hyber.org (200) with 1 occurrences could not be migrated:
   ([https](https://yaws.hyber.org) result AnnotatedConnectException).
* http://choven.ca (503) with 1 occurrences could not be migrated:
   ([https](https://choven.ca) result ConnectTimeoutException).

# Fixed URLs

## Fixed But Review Recommended
These URLs were fixed, but the https status was not OK. However, the https status was the same as the http request or http redirected to an https URL, so they were migrated. Your review is recommended.

* http://fixprotocol.org/ (301) with 1 occurrences migrated to:
  https://fixtrading.org ([https](https://fixprotocol.org/) result SSLHandshakeException).
* http://erldb.org (UnknownHostException) with 1 occurrences migrated to:
  https://erldb.org ([https](https://erldb.org) result UnknownHostException).

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* http://cloudi.org/ with 27 occurrences migrated to:
  https://cloudi.org/ ([https](https://cloudi.org/) result 200).
* http://erlware.org/ with 1 occurrences migrated to:
  https://erlware.org/ ([https](https://erlware.org/) result 200).
* http://inaka.github.io/cowboy-trails/ with 1 occurrences migrated to:
  https://inaka.github.io/cowboy-trails/ ([https](https://inaka.github.io/cowboy-trails/) result 200).
* http://ninenines.eu with 6 occurrences migrated to:
  https://ninenines.eu ([https](https://ninenines.eu) result 200).
* http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html with 1 occurrences migrated to:
  https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html ([https](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) result 200).
* http://www.actordb.com/ with 2 occurrences migrated to:
  https://www.actordb.com/ ([https](https://www.actordb.com/) result 200).
* http://www.cs.kent.ac.uk/projects/wrangler/Home.html with 1 occurrences migrated to:
  https://www.cs.kent.ac.uk/projects/wrangler/Home.html ([https](https://www.cs.kent.ac.uk/projects/wrangler/Home.html) result 200).
* http://www.rabbitmq.com/community-plugins/ with 1 occurrences migrated to:
  https://www.rabbitmq.com/community-plugins/ ([https](https://www.rabbitmq.com/community-plugins/) result 200).
* http://www.rabbitmq.com/plugin-development.html with 1 occurrences migrated to:
  https://www.rabbitmq.com/plugin-development.html ([https](https://www.rabbitmq.com/plugin-development.html) result 200).
* http://www.rabbitmq.com/relocate.html with 1 occurrences migrated to:
  https://www.rabbitmq.com/relocate.html ([https](https://www.rabbitmq.com/relocate.html) result 200).
* http://www.rebar3.org with 1 occurrences migrated to:
  https://www.rebar3.org ([https](https://www.rebar3.org) result 200).
* http://contributor-covenant.org with 1 occurrences migrated to:
  https://contributor-covenant.org ([https](https://contributor-covenant.org) result 301).
* http://contributor-covenant.org/version/1/3/0/ with 1 occurrences migrated to:
  https://contributor-covenant.org/version/1/3/0/ ([https](https://contributor-covenant.org/version/1/3/0/) result 301).
* http://inaka.github.com/apns4erl with 1 occurrences migrated to:
  https://inaka.github.com/apns4erl ([https](https://inaka.github.com/apns4erl) result 301).
* http://inaka.github.com/edis/ with 1 occurrences migrated to:
  https://inaka.github.com/edis/ ([https](https://inaka.github.com/edis/) result 301).
* http://lasp-lang.org/ with 1 occurrences migrated to:
  https://lasp-lang.org/ ([https](https://lasp-lang.org/) result 301).
* http://saleyn.github.com/erlexec with 1 occurrences migrated to:
  https://saleyn.github.com/erlexec ([https](https://saleyn.github.com/erlexec) result 301).
* http://www.mozilla.org/MPL/ with 2 occurrences migrated to:
  https://www.mozilla.org/MPL/ ([https](https://www.mozilla.org/MPL/) result 301).
* http://zhongwencool.github.io/observer_cli with 1 occurrences migrated to:
  https://zhongwencool.github.io/observer_cli ([https](https://zhongwencool.github.io/observer_cli) result 301).
2019-03-20 03:21:02 -05:00
Michael Klishin 6ceba60028 Travis: use Erlang 21.3, Elixir 1.8.1 2019-03-20 10:33:19 +03:00
Michael Klishin 9f2eec7181 Update rabbitmq-components.mk 2019-03-15 09:34:47 +03:00
Michael Klishin 770bca40e8 Update rabbitmq-components.mk 2019-03-15 05:05:55 +03:00
Michael Klishin 49d0279679 Update rabbitmq-components.mk 2019-02-12 23:24:05 +03:00
Michael Klishin 51b41154e8 .travis.yml: use 21.2 as 21.2.2 builds are no available 2019-01-14 01:20:26 +03:00
Michael Klishin aab4b725bb .travis.yml: sync Erlang and Elixir versions, require Erlang/OTP 21.2 2019-01-13 05:50:04 +03:00
Luke Bakken a0b4dea6f8 Update rabbitmq-components.mk 2019-01-09 12:55:18 -08:00
Luke Bakken 6b3baea1f2 Update rabbitmq-components.mk 2019-01-08 11:58:33 -08:00
Michael Klishin 06abbeb962 Update rabbitmq-components.mk 2018-12-06 18:29:00 +03:00
Michael Klishin 0eda17fe8f Update rabbitmq-components.mk 2018-12-06 03:15:23 +03:00
Jean-Sébastien Pédron 6bafbf44f7 Update rabbitmq-components.mk 2018-11-30 14:56:56 +01:00
Jean-Sébastien Pédron 44a491ae49 Update rabbitmq-components.mk 2018-11-22 09:19:41 +01:00
kjnilsson fcbaf2defd Update rabbitmq-components.mk 2018-10-29 12:43:28 +00:00
Jean-Sébastien Pédron 469243cd12 Update rabbitmq-components.mk 2018-09-19 10:38:22 +02:00
Jean-Sébastien Pédron 7c899dd95e Update rabbitmq-components.mk 2018-09-11 14:22:37 +02:00
Jean-Sébastien Pédron 52bedf88f3 Update rabbitmq-components.mk 2018-08-09 17:44:21 +02:00
Jean-Sébastien Pédron 7cd7dc7676 Update rabbitmq-components.mk 2018-08-09 12:17:07 +02:00
Jean-Sébastien Pédron 8b9e3e50c9 Update rabbitmq-components.mk 2018-06-07 11:31:42 +02:00
Jean-Sébastien Pédron 47954a291d Update erlang.mk 2018-04-11 10:54:02 +02:00
Jean-Sébastien Pédron 9a9ac3d840 Update rabbitmq-components.mk 2018-04-11 10:51:28 +02:00
Jean-Sébastien Pédron 648c786382 Update rabbitmq-components.mk 2018-04-11 10:10:10 +02:00
Jean-Sébastien Pédron 6a22cfb651 Travis CI: Update config from rabbitmq-common 2018-04-10 13:08:57 +02:00
Jean-Sébastien Pédron 69dd1d927d Update erlang.mk 2018-03-02 19:08:49 +01:00
Jean-Sébastien Pédron 0234f5108b Update rabbitmq-components.mk 2018-01-30 15:23:52 +01:00
Luke Bakken b9186c5b32 Update rabbitmq-components.mk 2018-01-29 16:22:21 -08:00
Jean-Sébastien Pédron b80199c806 Update rabbitmq-components.mk 2018-01-23 17:21:42 +01:00
Jean-Sébastien Pédron 93142e8ec8 Update rabbitmq-components.mk 2018-01-23 15:31:30 +01:00
Diana Corbacho 3fa13804b8 Update rabbitmq-components.mk 2018-01-22 22:13:29 +00:00
Jean-Sébastien Pédron f8f42e5de2 Travis CI: Update config from rabbitmq-common 2017-12-15 15:15:00 +01:00
Jean-Sébastien Pédron b920bec7c1 Update rabbitmq-components.mk 2017-12-01 11:06:55 +01:00
Jean-Sébastien Pédron 0a63579100 Update rabbitmq-components.mk 2017-11-28 14:01:10 +01:00
Jean-Sébastien Pédron 22deb45f1f Update rabbitmq-components.mk 2017-11-28 13:30:42 +01:00
Jean-Sébastien Pédron b0b5d96c61 Travis CI: Update config from rabbitmq-common 2017-11-08 10:37:49 +01:00
Jean-Sébastien Pédron 8c1e3b8112 Merge branch 'stable' 2017-10-13 15:12:16 +02:00
Jean-Sébastien Pédron e575388a0d Update rabbitmq-components.mk 2017-10-13 14:33:15 +02:00
Jean-Sébastien Pédron b5d5a8ac3e Update rabbitmq-components.mk 2017-10-13 14:13:26 +02:00
Jean-Sébastien Pédron 11938a68de Update rabbitmq-components.mk 2017-10-13 12:15:50 +02:00
Michael Klishin 44b0b38cf1 Update rabbitmq-components.mk 2017-09-13 17:54:39 -04:00
Michael Klishin de242754b4 Update rabbitmq-components.mk 2017-09-13 17:45:42 -04:00
Michael Klishin dce975c92a Update rabbitmq-components.mk 2017-09-12 19:53:30 -04:00
Michael Klishin df58b47b52 Update rabbitmq-components.mk 2017-09-12 12:42:02 -04:00