Rename ?ERROR_LOGGER_LOGGER to ?ERROR_LOGGER.

Change-Id: I6cf6e3241f3cd555fadcf124a1dd2ba40634259b
Reviewed-on: http://review.couchbase.org/14341
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Eliminate synchronous log levels.

Change-Id: I6255ea15acbf191fd00e1f33eb0d80ba8ad1ee51
Reviewed-on: http://review.couchbase.org/14342
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Flatten generated code only once at the end.

Change-Id: I762f9c6c6a7c154a9b245e40239ef4f1b09dbedb
Reviewed-on: http://review.couchbase.org/14343
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Inline calls to sinks directly into code generated for loggers.

Change-Id: If059e28ba3cd91f5cd6e0b803c91bb329c308014
Reviewed-on: http://review.couchbase.org/14344
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Formatter is set on per-logger (not per-sink) basis.

And inline appropriate calls into a generated code.

Note: this breaks ns_log_sink. We'll fix it in following commits.

Change-Id: I6146d026934bcab57a09fa746836d4b6a683d6f9
Reviewed-on: http://review.couchbase.org/14345
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Eliminate logger processes.

Change-Id: I50fe6f790b5def9c8108d95a38462568c127b2aa
Reviewed-on: http://review.couchbase.org/14346
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Let sinks use raw logging call information if they need it.

To achieve this we introduce two sink types. Namely 'preformatted' and
'raw'. A sink of 'preformatted' type just gets fully formatted message
(formatted by logger formatter). On the contrary, sinks of 'raw' type
get formatted user message and additional information about the
logging call (see #log_info{} in ale.hrl). Thus such a sink can use
this information to format the message in the way it likes.

Change-Id: I7ef8662a945dcfb528ce083c5e8cba0072c28bf3
Reviewed-on: http://review.couchbase.org/14347
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Update logging to latest ale changes.

Change-Id: I5c01f3fcdd8336c3fe97d568d9c3c32210501f20
Reviewed-on: http://review.couchbase.org/14348
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Log only info messages to default log.

Change-Id: I9a142d4c964750892f83863d1439618499c7e23d
Reviewed-on: http://review.couchbase.org/14383
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Use only ?rebalance_* logging macros in ebucketmigrator_srv.

It might be not completely correct since ebucketmigrator_srv is for
replication as well. But at least it will make all the messages
consistent with respect to logger that is used.

Change-Id: Id7845ebc503a16f7b9f4cc7c69bd6fa64e011bf9
Reviewed-on: http://review.couchbase.org/14385
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Log file for messages of all log levels (including debug).

Change-Id: Id653a1558c50f564898f64ec05fdac112b76a83c
Reviewed-on: http://review.couchbase.org/14382
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
All the messages from menelaus go to ?MENELAUS_LOGGER.

Change-Id: Ideb0bea907b273d7e3de01d341d56c7bff31f9b6
Reviewed-on: http://review.couchbase.org/14384
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Tested-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>
Merge remote-tracking branch 'origin/branch-181' into branch-18

* origin/branch-181:
  All the messages from menelaus go to ?MENELAUS_LOGGER.
  Log file for messages of all log levels (including debug).
  Use only ?rebalance_* logging macros in ebucketmigrator_srv.
  Log only info messages to default log.
  Update logging to latest ale changes.
  Let sinks use raw logging call information if they need it.
  Eliminate logger processes.
  Formatter is set on per-logger (not per-sink) basis.
  Inline calls to sinks directly into code generated for loggers.
  Flatten generated code only once at the end.
  Eliminate synchronous log levels.
  Rename ?ERROR_LOGGER_LOGGER to ?ERROR_LOGGER.

Conflicts:
	src/menelaus_web.erl

Change-Id: I1090245f4b8186fa7e3cab60d606ae4e781c66fa