From acc83768e61dddd8a48f08b69eb94e04621b0c19 Mon Sep 17 00:00:00 2001
From: Cyrill Gorcunov <gorcunov@gmail.com>
Date: Wed, 15 Jan 2020 13:46:45 +0300
Subject: [PATCH] box/console: rename format to format_yaml

This will allow us to implement own formatter for
Lua output mode, so to be precise which exactly formatter
is caller lets rename general "format" to "format_yaml".

Part-of #4682

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
 src/box/lua/console.c   | 2 +-
 src/box/lua/console.lua | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/box/lua/console.c b/src/box/lua/console.c
index d437ff3fe7..734c0ee479 100644
--- a/src/box/lua/console.c
+++ b/src/box/lua/console.c
@@ -352,7 +352,7 @@ lbox_console_add_history(struct lua_State *L)
  *         parameter.
  */
 static int
-lbox_console_format(struct lua_State *L)
+lbox_console_format_yaml(struct lua_State *L)
 {
 	int arg_count = lua_gettop(L);
 	if (arg_count == 0) {
diff --git a/src/box/lua/console.lua b/src/box/lua/console.lua
index 2add9a79d5..5642ca956d 100644
--- a/src/box/lua/console.lua
+++ b/src/box/lua/console.lua
@@ -53,7 +53,7 @@ output_handlers["yaml"] = function(status, opts, ...)
     local err
     if status then
         -- serializer can raise an exception
-        status, err = pcall(internal.format, ...)
+        status, err = pcall(internal.format_yaml, ...)
         if status then
             return err
         else
@@ -66,7 +66,7 @@ output_handlers["yaml"] = function(status, opts, ...)
             err = box.NULL
         end
     end
-    return internal.format({ error = err })
+    return internal.format_yaml({ error = err })
 end
 
 -- A map for internal symbols in case if they
-- 
GitLab