Print a buffered log to the real log file. */
| 855 | Print a buffered log to the real log file. |
| 856 | */ |
| 857 | void Buffered_log::print() |
| 858 | { |
| 859 | /* |
| 860 | Since messages are buffered, they can be printed out |
| 861 | of order with other entries in the log. |
| 862 | Add "Buffered xxx" to the message text to prevent confusion. |
| 863 | */ |
| 864 | switch(m_level) |
| 865 | { |
| 866 | case ERROR_LEVEL: |
| 867 | sql_print_error("Buffered error: %s\n", m_message.c_ptr_safe()); |
| 868 | break; |
| 869 | case WARNING_LEVEL: |
| 870 | sql_print_warning("Buffered warning: %s\n", m_message.c_ptr_safe()); |
| 871 | break; |
| 872 | case INFORMATION_LEVEL: |
| 873 | /* |
| 874 | Messages printed as "information" still end up in the mysqld *error* log, |
| 875 | but with a [Note] tag instead of an [ERROR] tag. |
| 876 | While this is probably fine for a human reading the log, |
| 877 | it is upsetting existing automated scripts used to parse logs, |
| 878 | because such scripts are likely to not already handle [Note] properly. |
| 879 | INFORMATION_LEVEL messages are simply silenced, on purpose, |
| 880 | to avoid un needed verbosity. |
| 881 | */ |
| 882 | break; |
| 883 | } |
| 884 | } |
| 885 | |
| 886 | /** |
| 887 | Collection of all the buffered log messages. |
no test coverage detected