<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html xmlns:erl="http://erlang.org" xmlns:fn="http://www.w3.org/2005/02/xpath-functions"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" href="../../../../doc/otp_doc.css" type="text/css"> <title>Erlang -- logger</title> </head> <body> <div id="container"> <script id="js" type="text/javascript" language="JavaScript" src="../../../../doc/js/flipmenu/flipmenu.js"></script><script id="js2" type="text/javascript" src="../../../../doc/js/erlresolvelinks.js"></script><script language="JavaScript" type="text/javascript"> <!-- function getWinHeight() { var myHeight = 0; if( typeof( window.innerHeight ) == 'number' ) { //Non-IE myHeight = window.innerHeight; } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode' myHeight = document.documentElement.clientHeight; } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { //IE 4 compatible myHeight = document.body.clientHeight; } return myHeight; } function setscrollpos() { var objf=document.getElementById('loadscrollpos'); document.getElementById("leftnav").scrollTop = objf.offsetTop - getWinHeight()/2; } function addEvent(obj, evType, fn){ if (obj.addEventListener){ obj.addEventListener(evType, fn, true); return true; } else if (obj.attachEvent){ var r = obj.attachEvent("on"+evType, fn); return r; } else { return false; } } addEvent(window, 'load', setscrollpos); //--></script><div id="leftnav"><div class="innertube"> <div class="erlang-logo-wrapper"><a href="../../../../doc/index.html"><img alt="Erlang Logo" src="../../../../doc/erlang-logo.png" class="erlang-logo"></a></div> <p class="section-title">Kernel</p> <p class="section-subtitle">Reference Manual</p> <p class="section-version">Version 6.2</p> <ul class="panel-sections"> <li><a href="users_guide.html">User's Guide</a></li> <li><a href="index.html">Reference Manual</a></li> <li><a href="release_notes.html">Release Notes</a></li> <li><a href="../pdf/kernel-6.2.pdf">PDF</a></li> <li><a href="../../../../doc/index.html">Top</a></li> </ul> <ul class="expand-collapse-items"> <li><a href="javascript:openAllFlips()">Expand All</a></li> <li><a href="javascript:closeAllFlips()">Contract All</a></li> </ul> <h3>Table of Contents</h3> <ul class="flipMenu"> <li title="kernel (App)"><a href="kernel_app.html">kernel (App) </a></li> <li title="app"><a href="app.html">app</a></li> <li id="no" title="application " expanded="false">application<ul> <li><a href="application.html"> Top of manual page </a></li> <li title="ensure_all_started-1"><a href="application.html#ensure_all_started-1">ensure_all_started/1</a></li> <li title="ensure_all_started-2"><a href="application.html#ensure_all_started-2">ensure_all_started/2</a></li> <li title="ensure_started-1"><a href="application.html#ensure_started-1">ensure_started/1</a></li> <li title="ensure_started-2"><a href="application.html#ensure_started-2">ensure_started/2</a></li> <li title="get_all_env-0"><a href="application.html#get_all_env-0">get_all_env/0</a></li> <li title="get_all_env-1"><a href="application.html#get_all_env-1">get_all_env/1</a></li> <li title="get_all_key-0"><a href="application.html#get_all_key-0">get_all_key/0</a></li> <li title="get_all_key-1"><a href="application.html#get_all_key-1">get_all_key/1</a></li> <li title="get_application-0"><a href="application.html#get_application-0">get_application/0</a></li> <li title="get_application-1"><a href="application.html#get_application-1">get_application/1</a></li> <li title="get_env-1"><a href="application.html#get_env-1">get_env/1</a></li> <li title="get_env-2"><a href="application.html#get_env-2">get_env/2</a></li> <li title="get_env-3"><a href="application.html#get_env-3">get_env/3</a></li> <li title="get_key-1"><a href="application.html#get_key-1">get_key/1</a></li> <li title="get_key-2"><a href="application.html#get_key-2">get_key/2</a></li> <li title="load-1"><a href="application.html#load-1">load/1</a></li> <li title="load-2"><a href="application.html#load-2">load/2</a></li> <li title="loaded_applications-0"><a href="application.html#loaded_applications-0">loaded_applications/0</a></li> <li title="permit-2"><a href="application.html#permit-2">permit/2</a></li> <li title="set_env-3"><a href="application.html#set_env-3">set_env/3</a></li> <li title="set_env-4"><a href="application.html#set_env-4">set_env/4</a></li> <li title="start-1"><a href="application.html#start-1">start/1</a></li> <li title="start-2"><a href="application.html#start-2">start/2</a></li> <li title="start_type-0"><a href="application.html#start_type-0">start_type/0</a></li> <li title="stop-1"><a href="application.html#stop-1">stop/1</a></li> <li title="takeover-2"><a href="application.html#takeover-2">takeover/2</a></li> <li title="unload-1"><a href="application.html#unload-1">unload/1</a></li> <li title="unset_env-2"><a href="application.html#unset_env-2">unset_env/2</a></li> <li title="unset_env-3"><a href="application.html#unset_env-3">unset_env/3</a></li> <li title="which_applications-0"><a href="application.html#which_applications-0">which_applications/0</a></li> <li title="which_applications-1"><a href="application.html#which_applications-1">which_applications/1</a></li> <li title="Module:config_change-3"><a href="application.html#Module:config_change-3">Module:config_change/3</a></li> <li title="Module:prep_stop-1"><a href="application.html#Module:prep_stop-1">Module:prep_stop/1</a></li> <li title="Module:start-2"><a href="application.html#Module:start-2">Module:start/2</a></li> <li title="Module:start_phase-3"><a href="application.html#Module:start_phase-3">Module:start_phase/3</a></li> <li title="Module:stop-1"><a href="application.html#Module:stop-1">Module:stop/1</a></li> </ul> </li> <li id="no" title="auth " expanded="false">auth<ul> <li><a href="auth.html"> Top of manual page </a></li> <li title="cookie-0"><a href="auth.html#cookie-0">cookie/0</a></li> <li title="cookie-1"><a href="auth.html#cookie-1">cookie/1</a></li> <li title="is_auth-1"><a href="auth.html#is_auth-1">is_auth/1</a></li> <li title="node_cookie-1"><a href="auth.html#node_cookie-1">node_cookie/1</a></li> <li title="node_cookie-2"><a href="auth.html#node_cookie-2">node_cookie/2</a></li> </ul> </li> <li id="no" title="code " expanded="false">code<ul> <li><a href="code.html"> Top of manual page </a></li> <li title="add_path-1"><a href="code.html#add_path-1">add_path/1</a></li> <li title="add_patha-1"><a href="code.html#add_patha-1">add_patha/1</a></li> <li title="add_paths-1"><a href="code.html#add_paths-1">add_paths/1</a></li> <li title="add_pathsa-1"><a href="code.html#add_pathsa-1">add_pathsa/1</a></li> <li title="add_pathsz-1"><a href="code.html#add_pathsz-1">add_pathsz/1</a></li> <li title="add_pathz-1"><a href="code.html#add_pathz-1">add_pathz/1</a></li> <li title="all_loaded-0"><a href="code.html#all_loaded-0">all_loaded/0</a></li> <li title="atomic_load-1"><a href="code.html#atomic_load-1">atomic_load/1</a></li> <li title="clash-0"><a href="code.html#clash-0">clash/0</a></li> <li title="compiler_dir-0"><a href="code.html#compiler_dir-0">compiler_dir/0</a></li> <li title="del_path-1"><a href="code.html#del_path-1">del_path/1</a></li> <li title="delete-1"><a href="code.html#delete-1">delete/1</a></li> <li title="ensure_loaded-1"><a href="code.html#ensure_loaded-1">ensure_loaded/1</a></li> <li title="ensure_modules_loaded-1"><a href="code.html#ensure_modules_loaded-1">ensure_modules_loaded/1</a></li> <li title="finish_loading-1"><a href="code.html#finish_loading-1">finish_loading/1</a></li> <li title="get_mode-0"><a href="code.html#get_mode-0">get_mode/0</a></li> <li title="get_object_code-1"><a href="code.html#get_object_code-1">get_object_code/1</a></li> <li title="get_path-0"><a href="code.html#get_path-0">get_path/0</a></li> <li title="is_loaded-1"><a href="code.html#is_loaded-1">is_loaded/1</a></li> <li title="is_module_native-1"><a href="code.html#is_module_native-1">is_module_native/1</a></li> <li title="is_sticky-1"><a href="code.html#is_sticky-1">is_sticky/1</a></li> <li title="lib_dir-0"><a href="code.html#lib_dir-0">lib_dir/0</a></li> <li title="lib_dir-1"><a href="code.html#lib_dir-1">lib_dir/1</a></li> <li title="lib_dir-2"><a href="code.html#lib_dir-2">lib_dir/2</a></li> <li title="load_abs-1"><a href="code.html#load_abs-1">load_abs/1</a></li> <li title="load_binary-3"><a href="code.html#load_binary-3">load_binary/3</a></li> <li title="load_file-1"><a href="code.html#load_file-1">load_file/1</a></li> <li title="modified_modules-0"><a href="code.html#modified_modules-0">modified_modules/0</a></li> <li title="module_status-1"><a href="code.html#module_status-1">module_status/1</a></li> <li title="objfile_extension-0"><a href="code.html#objfile_extension-0">objfile_extension/0</a></li> <li title="prepare_loading-1"><a href="code.html#prepare_loading-1">prepare_loading/1</a></li> <li title="priv_dir-1"><a href="code.html#priv_dir-1">priv_dir/1</a></li> <li title="purge-1"><a href="code.html#purge-1">purge/1</a></li> <li title="replace_path-2"><a href="code.html#replace_path-2">replace_path/2</a></li> <li title="root_dir-0"><a href="code.html#root_dir-0">root_dir/0</a></li> <li title="set_path-1"><a href="code.html#set_path-1">set_path/1</a></li> <li title="soft_purge-1"><a href="code.html#soft_purge-1">soft_purge/1</a></li> <li title="stick_dir-1"><a href="code.html#stick_dir-1">stick_dir/1</a></li> <li title="unstick_dir-1"><a href="code.html#unstick_dir-1">unstick_dir/1</a></li> <li title="where_is_file-1"><a href="code.html#where_is_file-1">where_is_file/1</a></li> <li title="which-1"><a href="code.html#which-1">which/1</a></li> </ul> </li> <li title="config"><a href="config.html">config</a></li> <li id="no" title="disk_log " expanded="false">disk_log<ul> <li><a href="disk_log.html"> Top of manual page </a></li> <li title="accessible_logs-0"><a href="disk_log.html#accessible_logs-0">accessible_logs/0</a></li> <li title="alog-2"><a href="disk_log.html#alog-2">alog/2</a></li> <li title="alog_terms-2"><a href="disk_log.html#alog_terms-2">alog_terms/2</a></li> <li title="balog-2"><a href="disk_log.html#balog-2">balog/2</a></li> <li title="balog_terms-2"><a href="disk_log.html#balog_terms-2">balog_terms/2</a></li> <li title="bchunk-2"><a href="disk_log.html#bchunk-2">bchunk/2</a></li> <li title="bchunk-3"><a href="disk_log.html#bchunk-3">bchunk/3</a></li> <li title="block-1"><a href="disk_log.html#block-1">block/1</a></li> <li title="block-2"><a href="disk_log.html#block-2">block/2</a></li> <li title="blog-2"><a href="disk_log.html#blog-2">blog/2</a></li> <li title="blog_terms-2"><a href="disk_log.html#blog_terms-2">blog_terms/2</a></li> <li title="breopen-3"><a href="disk_log.html#breopen-3">breopen/3</a></li> <li title="btruncate-2"><a href="disk_log.html#btruncate-2">btruncate/2</a></li> <li title="change_header-2"><a href="disk_log.html#change_header-2">change_header/2</a></li> <li title="change_notify-3"><a href="disk_log.html#change_notify-3">change_notify/3</a></li> <li title="change_size-2"><a href="disk_log.html#change_size-2">change_size/2</a></li> <li title="chunk-2"><a href="disk_log.html#chunk-2">chunk/2</a></li> <li title="chunk-3"><a href="disk_log.html#chunk-3">chunk/3</a></li> <li title="chunk_info-1"><a href="disk_log.html#chunk_info-1">chunk_info/1</a></li> <li title="chunk_step-3"><a href="disk_log.html#chunk_step-3">chunk_step/3</a></li> <li title="close-1"><a href="disk_log.html#close-1">close/1</a></li> <li title="format_error-1"><a href="disk_log.html#format_error-1">format_error/1</a></li> <li title="inc_wrap_file-1"><a href="disk_log.html#inc_wrap_file-1">inc_wrap_file/1</a></li> <li title="info-1"><a href="disk_log.html#info-1">info/1</a></li> <li title="lclose-1"><a href="disk_log.html#lclose-1">lclose/1</a></li> <li title="lclose-2"><a href="disk_log.html#lclose-2">lclose/2</a></li> <li title="log-2"><a href="disk_log.html#log-2">log/2</a></li> <li title="log_terms-2"><a href="disk_log.html#log_terms-2">log_terms/2</a></li> <li title="open-1"><a href="disk_log.html#open-1">open/1</a></li> <li title="pid2name-1"><a href="disk_log.html#pid2name-1">pid2name/1</a></li> <li title="reopen-2"><a href="disk_log.html#reopen-2">reopen/2</a></li> <li title="reopen-3"><a href="disk_log.html#reopen-3">reopen/3</a></li> <li title="sync-1"><a href="disk_log.html#sync-1">sync/1</a></li> <li title="truncate-1"><a href="disk_log.html#truncate-1">truncate/1</a></li> <li title="truncate-2"><a href="disk_log.html#truncate-2">truncate/2</a></li> <li title="unblock-1"><a href="disk_log.html#unblock-1">unblock/1</a></li> </ul> </li> <li id="no" title="erl_boot_server " expanded="false">erl_boot_server<ul> <li><a href="erl_boot_server.html"> Top of manual page </a></li> <li title="add_slave-1"><a href="erl_boot_server.html#add_slave-1">add_slave/1</a></li> <li title="delete_slave-1"><a href="erl_boot_server.html#delete_slave-1">delete_slave/1</a></li> <li title="start-1"><a href="erl_boot_server.html#start-1">start/1</a></li> <li title="start_link-1"><a href="erl_boot_server.html#start_link-1">start_link/1</a></li> <li title="which_slaves-0"><a href="erl_boot_server.html#which_slaves-0">which_slaves/0</a></li> </ul> </li> <li id="no" title="erl_ddll " expanded="false">erl_ddll<ul> <li><a href="erl_ddll.html"> Top of manual page </a></li> <li title="demonitor-1"><a href="erl_ddll.html#demonitor-1">demonitor/1</a></li> <li title="format_error-1"><a href="erl_ddll.html#format_error-1">format_error/1</a></li> <li title="info-0"><a href="erl_ddll.html#info-0">info/0</a></li> <li title="info-1"><a href="erl_ddll.html#info-1">info/1</a></li> <li title="info-2"><a href="erl_ddll.html#info-2">info/2</a></li> <li title="load-2"><a href="erl_ddll.html#load-2">load/2</a></li> <li title="load_driver-2"><a href="erl_ddll.html#load_driver-2">load_driver/2</a></li> <li title="loaded_drivers-0"><a href="erl_ddll.html#loaded_drivers-0">loaded_drivers/0</a></li> <li title="monitor-2"><a href="erl_ddll.html#monitor-2">monitor/2</a></li> <li title="reload-2"><a href="erl_ddll.html#reload-2">reload/2</a></li> <li title="reload_driver-2"><a href="erl_ddll.html#reload_driver-2">reload_driver/2</a></li> <li title="try_load-3"><a href="erl_ddll.html#try_load-3">try_load/3</a></li> <li title="try_unload-2"><a href="erl_ddll.html#try_unload-2">try_unload/2</a></li> <li title="unload-1"><a href="erl_ddll.html#unload-1">unload/1</a></li> <li title="unload_driver-1"><a href="erl_ddll.html#unload_driver-1">unload_driver/1</a></li> </ul> </li> <li id="no" title="erl_epmd " expanded="false">erl_epmd<ul> <li><a href="erl_epmd.html"> Top of manual page </a></li> <li title="address_please-3"><a href="erl_epmd.html#address_please-3">address_please/3</a></li> <li title="names-1"><a href="erl_epmd.html#names-1">names/1</a></li> <li title="port_please-2"><a href="erl_epmd.html#port_please-2">port_please/2</a></li> <li title="port_please-3"><a href="erl_epmd.html#port_please-3">port_please/3</a></li> <li title="register_node-2"><a href="erl_epmd.html#register_node-2">register_node/2</a></li> <li title="register_node-3"><a href="erl_epmd.html#register_node-3">register_node/3</a></li> <li title="start_link-0"><a href="erl_epmd.html#start_link-0">start_link/0</a></li> </ul> </li> <li title="erl_prim_loader"><a href="erl_prim_loader.html">erl_prim_loader</a></li> <li title="erlang"><a href="erlang.html">erlang</a></li> <li id="no" title="error_handler " expanded="false">error_handler<ul> <li><a href="error_handler.html"> Top of manual page </a></li> <li title="raise_undef_exception-3"><a href="error_handler.html#raise_undef_exception-3">raise_undef_exception/3</a></li> <li title="undefined_function-3"><a href="error_handler.html#undefined_function-3">undefined_function/3</a></li> <li title="undefined_lambda-3"><a href="error_handler.html#undefined_lambda-3">undefined_lambda/3</a></li> </ul> </li> <li id="no" title="error_logger " expanded="false">error_logger<ul> <li><a href="error_logger.html"> Top of manual page </a></li> <li title="add_report_handler-1"><a href="error_logger.html#add_report_handler-1">add_report_handler/1</a></li> <li title="add_report_handler-2"><a href="error_logger.html#add_report_handler-2">add_report_handler/2</a></li> <li title="delete_report_handler-1"><a href="error_logger.html#delete_report_handler-1">delete_report_handler/1</a></li> <li title="error_msg-1"><a href="error_logger.html#error_msg-1">error_msg/1</a></li> <li title="error_msg-2"><a href="error_logger.html#error_msg-2">error_msg/2</a></li> <li title="error_report-1"><a href="error_logger.html#error_report-1">error_report/1</a></li> <li title="error_report-2"><a href="error_logger.html#error_report-2">error_report/2</a></li> <li title="format-2"><a href="error_logger.html#format-2">format/2</a></li> <li title="get_format_depth-0"><a href="error_logger.html#get_format_depth-0">get_format_depth/0</a></li> <li title="info_msg-1"><a href="error_logger.html#info_msg-1">info_msg/1</a></li> <li title="info_msg-2"><a href="error_logger.html#info_msg-2">info_msg/2</a></li> <li title="info_report-1"><a href="error_logger.html#info_report-1">info_report/1</a></li> <li title="info_report-2"><a href="error_logger.html#info_report-2">info_report/2</a></li> <li title="logfile-1"><a href="error_logger.html#logfile-1">logfile/1</a></li> <li title="tty-1"><a href="error_logger.html#tty-1">tty/1</a></li> <li title="warning_map-0"><a href="error_logger.html#warning_map-0">warning_map/0</a></li> <li title="warning_msg-1"><a href="error_logger.html#warning_msg-1">warning_msg/1</a></li> <li title="warning_msg-2"><a href="error_logger.html#warning_msg-2">warning_msg/2</a></li> <li title="warning_report-1"><a href="error_logger.html#warning_report-1">warning_report/1</a></li> <li title="warning_report-2"><a href="error_logger.html#warning_report-2">warning_report/2</a></li> </ul> </li> <li id="no" title="file " expanded="false">file<ul> <li><a href="file.html"> Top of manual page </a></li> <li title="advise-4"><a href="file.html#advise-4">advise/4</a></li> <li title="allocate-3"><a href="file.html#allocate-3">allocate/3</a></li> <li title="change_group-2"><a href="file.html#change_group-2">change_group/2</a></li> <li title="change_mode-2"><a href="file.html#change_mode-2">change_mode/2</a></li> <li title="change_owner-2"><a href="file.html#change_owner-2">change_owner/2</a></li> <li title="change_owner-3"><a href="file.html#change_owner-3">change_owner/3</a></li> <li title="change_time-2"><a href="file.html#change_time-2">change_time/2</a></li> <li title="change_time-3"><a href="file.html#change_time-3">change_time/3</a></li> <li title="close-1"><a href="file.html#close-1">close/1</a></li> <li title="consult-1"><a href="file.html#consult-1">consult/1</a></li> <li title="copy-2"><a href="file.html#copy-2">copy/2</a></li> <li title="copy-3"><a href="file.html#copy-3">copy/3</a></li> <li title="datasync-1"><a href="file.html#datasync-1">datasync/1</a></li> <li title="del_dir-1"><a href="file.html#del_dir-1">del_dir/1</a></li> <li title="delete-1"><a href="file.html#delete-1">delete/1</a></li> <li title="eval-1"><a href="file.html#eval-1">eval/1</a></li> <li title="eval-2"><a href="file.html#eval-2">eval/2</a></li> <li title="format_error-1"><a href="file.html#format_error-1">format_error/1</a></li> <li title="get_cwd-0"><a href="file.html#get_cwd-0">get_cwd/0</a></li> <li title="get_cwd-1"><a href="file.html#get_cwd-1">get_cwd/1</a></li> <li title="list_dir-1"><a href="file.html#list_dir-1">list_dir/1</a></li> <li title="list_dir_all-1"><a href="file.html#list_dir_all-1">list_dir_all/1</a></li> <li title="make_dir-1"><a href="file.html#make_dir-1">make_dir/1</a></li> <li title="make_link-2"><a href="file.html#make_link-2">make_link/2</a></li> <li title="make_symlink-2"><a href="file.html#make_symlink-2">make_symlink/2</a></li> <li title="native_name_encoding-0"><a href="file.html#native_name_encoding-0">native_name_encoding/0</a></li> <li title="open-2"><a href="file.html#open-2">open/2</a></li> <li title="path_consult-2"><a href="file.html#path_consult-2">path_consult/2</a></li> <li title="path_eval-2"><a href="file.html#path_eval-2">path_eval/2</a></li> <li title="path_open-3"><a href="file.html#path_open-3">path_open/3</a></li> <li title="path_script-2"><a href="file.html#path_script-2">path_script/2</a></li> <li title="path_script-3"><a href="file.html#path_script-3">path_script/3</a></li> <li title="pid2name-1"><a href="file.html#pid2name-1">pid2name/1</a></li> <li title="position-2"><a href="file.html#position-2">position/2</a></li> <li title="pread-2"><a href="file.html#pread-2">pread/2</a></li> <li title="pread-3"><a href="file.html#pread-3">pread/3</a></li> <li title="pwrite-2"><a href="file.html#pwrite-2">pwrite/2</a></li> <li title="pwrite-3"><a href="file.html#pwrite-3">pwrite/3</a></li> <li title="read-2"><a href="file.html#read-2">read/2</a></li> <li title="read_file-1"><a href="file.html#read_file-1">read_file/1</a></li> <li title="read_file_info-1"><a href="file.html#read_file_info-1">read_file_info/1</a></li> <li title="read_file_info-2"><a href="file.html#read_file_info-2">read_file_info/2</a></li> <li title="read_line-1"><a href="file.html#read_line-1">read_line/1</a></li> <li title="read_link-1"><a href="file.html#read_link-1">read_link/1</a></li> <li title="read_link_all-1"><a href="file.html#read_link_all-1">read_link_all/1</a></li> <li title="read_link_info-1"><a href="file.html#read_link_info-1">read_link_info/1</a></li> <li title="read_link_info-2"><a href="file.html#read_link_info-2">read_link_info/2</a></li> <li title="rename-2"><a href="file.html#rename-2">rename/2</a></li> <li title="script-1"><a href="file.html#script-1">script/1</a></li> <li title="script-2"><a href="file.html#script-2">script/2</a></li> <li title="sendfile-2"><a href="file.html#sendfile-2">sendfile/2</a></li> <li title="sendfile-5"><a href="file.html#sendfile-5">sendfile/5</a></li> <li title="set_cwd-1"><a href="file.html#set_cwd-1">set_cwd/1</a></li> <li title="sync-1"><a href="file.html#sync-1">sync/1</a></li> <li title="truncate-1"><a href="file.html#truncate-1">truncate/1</a></li> <li title="write-2"><a href="file.html#write-2">write/2</a></li> <li title="write_file-2"><a href="file.html#write_file-2">write_file/2</a></li> <li title="write_file-3"><a href="file.html#write_file-3">write_file/3</a></li> <li title="write_file_info-2"><a href="file.html#write_file_info-2">write_file_info/2</a></li> <li title="write_file_info-3"><a href="file.html#write_file_info-3">write_file_info/3</a></li> </ul> </li> <li id="no" title="gen_sctp " expanded="false">gen_sctp<ul> <li><a href="gen_sctp.html"> Top of manual page </a></li> <li title="abort-2"><a href="gen_sctp.html#abort-2">abort/2</a></li> <li title="close-1"><a href="gen_sctp.html#close-1">close/1</a></li> <li title="connect-4"><a href="gen_sctp.html#connect-4">connect/4</a></li> <li title="connect-5"><a href="gen_sctp.html#connect-5">connect/5</a></li> <li title="connect_init-4"><a href="gen_sctp.html#connect_init-4">connect_init/4</a></li> <li title="connect_init-5"><a href="gen_sctp.html#connect_init-5">connect_init/5</a></li> <li title="controlling_process-2"><a href="gen_sctp.html#controlling_process-2">controlling_process/2</a></li> <li title="eof-2"><a href="gen_sctp.html#eof-2">eof/2</a></li> <li title="error_string-1"><a href="gen_sctp.html#error_string-1">error_string/1</a></li> <li title="listen-2"><a href="gen_sctp.html#listen-2">listen/2</a></li> <li title="open-0"><a href="gen_sctp.html#open-0">open/0</a></li> <li title="open-1"><a href="gen_sctp.html#open-1">open/1</a></li> <li title="open-2"><a href="gen_sctp.html#open-2">open/2</a></li> <li title="peeloff-2"><a href="gen_sctp.html#peeloff-2">peeloff/2</a></li> <li title="recv-1"><a href="gen_sctp.html#recv-1">recv/1</a></li> <li title="recv-2"><a href="gen_sctp.html#recv-2">recv/2</a></li> <li title="send-3"><a href="gen_sctp.html#send-3">send/3</a></li> <li title="send-4"><a href="gen_sctp.html#send-4">send/4</a></li> </ul> </li> <li id="no" title="gen_tcp " expanded="false">gen_tcp<ul> <li><a href="gen_tcp.html"> Top of manual page </a></li> <li title="accept-1"><a href="gen_tcp.html#accept-1">accept/1</a></li> <li title="accept-2"><a href="gen_tcp.html#accept-2">accept/2</a></li> <li title="close-1"><a href="gen_tcp.html#close-1">close/1</a></li> <li title="connect-3"><a href="gen_tcp.html#connect-3">connect/3</a></li> <li title="connect-4"><a href="gen_tcp.html#connect-4">connect/4</a></li> <li title="controlling_process-2"><a href="gen_tcp.html#controlling_process-2">controlling_process/2</a></li> <li title="listen-2"><a href="gen_tcp.html#listen-2">listen/2</a></li> <li title="recv-2"><a href="gen_tcp.html#recv-2">recv/2</a></li> <li title="recv-3"><a href="gen_tcp.html#recv-3">recv/3</a></li> <li title="send-2"><a href="gen_tcp.html#send-2">send/2</a></li> <li title="shutdown-2"><a href="gen_tcp.html#shutdown-2">shutdown/2</a></li> </ul> </li> <li id="no" title="gen_udp " expanded="false">gen_udp<ul> <li><a href="gen_udp.html"> Top of manual page </a></li> <li title="close-1"><a href="gen_udp.html#close-1">close/1</a></li> <li title="controlling_process-2"><a href="gen_udp.html#controlling_process-2">controlling_process/2</a></li> <li title="open-1"><a href="gen_udp.html#open-1">open/1</a></li> <li title="open-2"><a href="gen_udp.html#open-2">open/2</a></li> <li title="recv-2"><a href="gen_udp.html#recv-2">recv/2</a></li> <li title="recv-3"><a href="gen_udp.html#recv-3">recv/3</a></li> <li title="send-4"><a href="gen_udp.html#send-4">send/4</a></li> </ul> </li> <li id="no" title="global " expanded="false">global<ul> <li><a href="global.html"> Top of manual page </a></li> <li title="del_lock-1"><a href="global.html#del_lock-1">del_lock/1</a></li> <li title="del_lock-2"><a href="global.html#del_lock-2">del_lock/2</a></li> <li title="notify_all_name-3"><a href="global.html#notify_all_name-3">notify_all_name/3</a></li> <li title="random_exit_name-3"><a href="global.html#random_exit_name-3">random_exit_name/3</a></li> <li title="random_notify_name-3"><a href="global.html#random_notify_name-3">random_notify_name/3</a></li> <li title="re_register_name-2"><a href="global.html#re_register_name-2">re_register_name/2</a></li> <li title="re_register_name-3"><a href="global.html#re_register_name-3">re_register_name/3</a></li> <li title="register_name-2"><a href="global.html#register_name-2">register_name/2</a></li> <li title="register_name-3"><a href="global.html#register_name-3">register_name/3</a></li> <li title="registered_names-0"><a href="global.html#registered_names-0">registered_names/0</a></li> <li title="send-2"><a href="global.html#send-2">send/2</a></li> <li title="set_lock-1"><a href="global.html#set_lock-1">set_lock/1</a></li> <li title="set_lock-2"><a href="global.html#set_lock-2">set_lock/2</a></li> <li title="set_lock-3"><a href="global.html#set_lock-3">set_lock/3</a></li> <li title="sync-0"><a href="global.html#sync-0">sync/0</a></li> <li title="trans-2"><a href="global.html#trans-2">trans/2</a></li> <li title="trans-3"><a href="global.html#trans-3">trans/3</a></li> <li title="trans-4"><a href="global.html#trans-4">trans/4</a></li> <li title="unregister_name-1"><a href="global.html#unregister_name-1">unregister_name/1</a></li> <li title="whereis_name-1"><a href="global.html#whereis_name-1">whereis_name/1</a></li> </ul> </li> <li id="no" title="global_group " expanded="false">global_group<ul> <li><a href="global_group.html"> Top of manual page </a></li> <li title="global_groups-0"><a href="global_group.html#global_groups-0">global_groups/0</a></li> <li title="info-0"><a href="global_group.html#info-0">info/0</a></li> <li title="monitor_nodes-1"><a href="global_group.html#monitor_nodes-1">monitor_nodes/1</a></li> <li title="own_nodes-0"><a href="global_group.html#own_nodes-0">own_nodes/0</a></li> <li title="registered_names-1"><a href="global_group.html#registered_names-1">registered_names/1</a></li> <li title="send-2"><a href="global_group.html#send-2">send/2</a></li> <li title="send-3"><a href="global_group.html#send-3">send/3</a></li> <li title="sync-0"><a href="global_group.html#sync-0">sync/0</a></li> <li title="whereis_name-1"><a href="global_group.html#whereis_name-1">whereis_name/1</a></li> <li title="whereis_name-2"><a href="global_group.html#whereis_name-2">whereis_name/2</a></li> </ul> </li> <li id="no" title="heart " expanded="false">heart<ul> <li><a href="heart.html"> Top of manual page </a></li> <li title="clear_callback-0"><a href="heart.html#clear_callback-0">clear_callback/0</a></li> <li title="clear_cmd-0"><a href="heart.html#clear_cmd-0">clear_cmd/0</a></li> <li title="get_callback-0"><a href="heart.html#get_callback-0">get_callback/0</a></li> <li title="get_cmd-0"><a href="heart.html#get_cmd-0">get_cmd/0</a></li> <li title="get_options-0"><a href="heart.html#get_options-0">get_options/0</a></li> <li title="set_callback-2"><a href="heart.html#set_callback-2">set_callback/2</a></li> <li title="set_cmd-1"><a href="heart.html#set_cmd-1">set_cmd/1</a></li> <li title="set_options-1"><a href="heart.html#set_options-1">set_options/1</a></li> </ul> </li> <li id="no" title="inet " expanded="false">inet<ul> <li><a href="inet.html"> Top of manual page </a></li> <li title="close-1"><a href="inet.html#close-1">close/1</a></li> <li title="format_error-1"><a href="inet.html#format_error-1">format_error/1</a></li> <li title="get_rc-0"><a href="inet.html#get_rc-0">get_rc/0</a></li> <li title="getaddr-2"><a href="inet.html#getaddr-2">getaddr/2</a></li> <li title="getaddrs-2"><a href="inet.html#getaddrs-2">getaddrs/2</a></li> <li title="gethostbyaddr-1"><a href="inet.html#gethostbyaddr-1">gethostbyaddr/1</a></li> <li title="gethostbyname-1"><a href="inet.html#gethostbyname-1">gethostbyname/1</a></li> <li title="gethostbyname-2"><a href="inet.html#gethostbyname-2">gethostbyname/2</a></li> <li title="gethostname-0"><a href="inet.html#gethostname-0">gethostname/0</a></li> <li title="getifaddrs-0"><a href="inet.html#getifaddrs-0">getifaddrs/0</a></li> <li title="getifaddrs-1"><a href="inet.html#getifaddrs-1">getifaddrs/1</a></li> <li title="getopts-2"><a href="inet.html#getopts-2">getopts/2</a></li> <li title="getstat-1"><a href="inet.html#getstat-1">getstat/1</a></li> <li title="getstat-2"><a href="inet.html#getstat-2">getstat/2</a></li> <li title="i-0"><a href="inet.html#i-0">i/0</a></li> <li title="i-1"><a href="inet.html#i-1">i/1</a></li> <li title="i-2"><a href="inet.html#i-2">i/2</a></li> <li title="ipv4_mapped_ipv6_address-1"><a href="inet.html#ipv4_mapped_ipv6_address-1">ipv4_mapped_ipv6_address/1</a></li> <li title="ntoa-1"><a href="inet.html#ntoa-1">ntoa/1</a></li> <li title="parse_address-1"><a href="inet.html#parse_address-1">parse_address/1</a></li> <li title="parse_ipv4_address-1"><a href="inet.html#parse_ipv4_address-1">parse_ipv4_address/1</a></li> <li title="parse_ipv4strict_address-1"><a href="inet.html#parse_ipv4strict_address-1">parse_ipv4strict_address/1</a></li> <li title="parse_ipv6_address-1"><a href="inet.html#parse_ipv6_address-1">parse_ipv6_address/1</a></li> <li title="parse_ipv6strict_address-1"><a href="inet.html#parse_ipv6strict_address-1">parse_ipv6strict_address/1</a></li> <li title="parse_strict_address-1"><a href="inet.html#parse_strict_address-1">parse_strict_address/1</a></li> <li title="peername-1"><a href="inet.html#peername-1">peername/1</a></li> <li title="peernames-1"><a href="inet.html#peernames-1">peernames/1</a></li> <li title="peernames-2"><a href="inet.html#peernames-2">peernames/2</a></li> <li title="port-1"><a href="inet.html#port-1">port/1</a></li> <li title="setopts-2"><a href="inet.html#setopts-2">setopts/2</a></li> <li title="sockname-1"><a href="inet.html#sockname-1">sockname/1</a></li> <li title="socknames-1"><a href="inet.html#socknames-1">socknames/1</a></li> <li title="socknames-2"><a href="inet.html#socknames-2">socknames/2</a></li> </ul> </li> <li id="no" title="inet_res " expanded="false">inet_res<ul> <li><a href="inet_res.html"> Top of manual page </a></li> <li title="getbyname-2"><a href="inet_res.html#getbyname-2">getbyname/2</a></li> <li title="getbyname-3"><a href="inet_res.html#getbyname-3">getbyname/3</a></li> <li title="gethostbyaddr-1"><a href="inet_res.html#gethostbyaddr-1">gethostbyaddr/1</a></li> <li title="gethostbyaddr-2"><a href="inet_res.html#gethostbyaddr-2">gethostbyaddr/2</a></li> <li title="gethostbyname-1"><a href="inet_res.html#gethostbyname-1">gethostbyname/1</a></li> <li title="gethostbyname-2"><a href="inet_res.html#gethostbyname-2">gethostbyname/2</a></li> <li title="gethostbyname-3"><a href="inet_res.html#gethostbyname-3">gethostbyname/3</a></li> <li title="lookup-3"><a href="inet_res.html#lookup-3">lookup/3</a></li> <li title="lookup-4"><a href="inet_res.html#lookup-4">lookup/4</a></li> <li title="lookup-5"><a href="inet_res.html#lookup-5">lookup/5</a></li> <li title="nnslookup-4"><a href="inet_res.html#nnslookup-4">nnslookup/4</a></li> <li title="nnslookup-5"><a href="inet_res.html#nnslookup-5">nnslookup/5</a></li> <li title="nslookup-3"><a href="inet_res.html#nslookup-3">nslookup/3</a></li> <li title="nslookup-4"><a href="inet_res.html#nslookup-4">nslookup/4</a></li> <li title="resolve-3"><a href="inet_res.html#resolve-3">resolve/3</a></li> <li title="resolve-4"><a href="inet_res.html#resolve-4">resolve/4</a></li> <li title="resolve-5"><a href="inet_res.html#resolve-5">resolve/5</a></li> </ul> </li> <li title="init"><a href="init.html">init</a></li> <li id="loadscrollpos" title="logger " expanded="true">logger<ul> <li><a href="logger.html"> Top of manual page </a></li> <li title="add_handler-3"><a href="logger.html#add_handler-3">add_handler/3</a></li> <li title="add_handler_filter-3"><a href="logger.html#add_handler_filter-3">add_handler_filter/3</a></li> <li title="add_handlers-1"><a href="logger.html#add_handlers-1">add_handlers/1</a></li> <li title="add_primary_filter-2"><a href="logger.html#add_primary_filter-2">add_primary_filter/2</a></li> <li title="alert-1"><a href="logger.html#alert-1">alert/1</a></li> <li title="alert-2"><a href="logger.html#alert-2">alert/2</a></li> <li title="alert-2"><a href="logger.html#alert-2">alert/2</a></li> <li title="compare_levels-2"><a href="logger.html#compare_levels-2">compare_levels/2</a></li> <li title="critical-1"><a href="logger.html#critical-1">critical/1</a></li> <li title="critical-2"><a href="logger.html#critical-2">critical/2</a></li> <li title="critical-2"><a href="logger.html#critical-2">critical/2</a></li> <li title="debug-1"><a href="logger.html#debug-1">debug/1</a></li> <li title="debug-2"><a href="logger.html#debug-2">debug/2</a></li> <li title="debug-2"><a href="logger.html#debug-2">debug/2</a></li> <li title="emergency-1"><a href="logger.html#emergency-1">emergency/1</a></li> <li title="emergency-2"><a href="logger.html#emergency-2">emergency/2</a></li> <li title="emergency-2"><a href="logger.html#emergency-2">emergency/2</a></li> <li title="error-1"><a href="logger.html#error-1">error/1</a></li> <li title="error-2"><a href="logger.html#error-2">error/2</a></li> <li title="error-2"><a href="logger.html#error-2">error/2</a></li> <li title="format_report-1"><a href="logger.html#format_report-1">format_report/1</a></li> <li title="get_config-0"><a href="logger.html#get_config-0">get_config/0</a></li> <li title="get_handler_config-0"><a href="logger.html#get_handler_config-0">get_handler_config/0</a></li> <li title="get_handler_config-1"><a href="logger.html#get_handler_config-1">get_handler_config/1</a></li> <li title="get_handler_ids-0"><a href="logger.html#get_handler_ids-0">get_handler_ids/0</a></li> <li title="get_module_level-0"><a href="logger.html#get_module_level-0">get_module_level/0</a></li> <li title="get_module_level-1"><a href="logger.html#get_module_level-1">get_module_level/1</a></li> <li title="get_primary_config-0"><a href="logger.html#get_primary_config-0">get_primary_config/0</a></li> <li title="get_process_metadata-0"><a href="logger.html#get_process_metadata-0">get_process_metadata/0</a></li> <li title="info-1"><a href="logger.html#info-1">info/1</a></li> <li title="info-2"><a href="logger.html#info-2">info/2</a></li> <li title="info-2"><a href="logger.html#info-2">info/2</a></li> <li title="log-2"><a href="logger.html#log-2">log/2</a></li> <li title="log-3"><a href="logger.html#log-3">log/3</a></li> <li title="log-4"><a href="logger.html#log-4">log/4</a></li> <li title="notice-1"><a href="logger.html#notice-1">notice/1</a></li> <li title="notice-2"><a href="logger.html#notice-2">notice/2</a></li> <li title="notice-2"><a href="logger.html#notice-2">notice/2</a></li> <li title="remove_handler-1"><a href="logger.html#remove_handler-1">remove_handler/1</a></li> <li title="remove_handler_filter-2"><a href="logger.html#remove_handler_filter-2">remove_handler_filter/2</a></li> <li title="remove_primary_filter-1"><a href="logger.html#remove_primary_filter-1">remove_primary_filter/1</a></li> <li title="set_application_level-2"><a href="logger.html#set_application_level-2">set_application_level/2</a></li> <li title="set_handler_config-2"><a href="logger.html#set_handler_config-2">set_handler_config/2</a></li> <li title="set_handler_config-3"><a href="logger.html#set_handler_config-3">set_handler_config/3</a></li> <li title="set_module_level-2"><a href="logger.html#set_module_level-2">set_module_level/2</a></li> <li title="set_primary_config-1"><a href="logger.html#set_primary_config-1">set_primary_config/1</a></li> <li title="set_primary_config-2"><a href="logger.html#set_primary_config-2">set_primary_config/2</a></li> <li title="set_process_metadata-1"><a href="logger.html#set_process_metadata-1">set_process_metadata/1</a></li> <li title="unset_application_level-1"><a href="logger.html#unset_application_level-1">unset_application_level/1</a></li> <li title="unset_module_level-0"><a href="logger.html#unset_module_level-0">unset_module_level/0</a></li> <li title="unset_module_level-1"><a href="logger.html#unset_module_level-1">unset_module_level/1</a></li> <li title="unset_process_metadata-0"><a href="logger.html#unset_process_metadata-0">unset_process_metadata/0</a></li> <li title="update_formatter_config-2"><a href="logger.html#update_formatter_config-2">update_formatter_config/2</a></li> <li title="update_formatter_config-3"><a href="logger.html#update_formatter_config-3">update_formatter_config/3</a></li> <li title="update_handler_config-2"><a href="logger.html#update_handler_config-2">update_handler_config/2</a></li> <li title="update_handler_config-3"><a href="logger.html#update_handler_config-3">update_handler_config/3</a></li> <li title="update_primary_config-1"><a href="logger.html#update_primary_config-1">update_primary_config/1</a></li> <li title="update_process_metadata-1"><a href="logger.html#update_process_metadata-1">update_process_metadata/1</a></li> <li title="warning-1"><a href="logger.html#warning-1">warning/1</a></li> <li title="warning-2"><a href="logger.html#warning-2">warning/2</a></li> <li title="warning-2"><a href="logger.html#warning-2">warning/2</a></li> <li title="FModule:check_config-1"><a href="logger.html#FModule:check_config-1">FModule:check_config/1</a></li> <li title="FModule:format-2"><a href="logger.html#FModule:format-2">FModule:format/2</a></li> <li title="HModule:adding_handler-1"><a href="logger.html#HModule:adding_handler-1">HModule:adding_handler/1</a></li> <li title="HModule:changing_config-3"><a href="logger.html#HModule:changing_config-3">HModule:changing_config/3</a></li> <li title="HModule:filter_config-1"><a href="logger.html#HModule:filter_config-1">HModule:filter_config/1</a></li> <li title="HModule:log-2"><a href="logger.html#HModule:log-2">HModule:log/2</a></li> <li title="HModule:removing_handler-1"><a href="logger.html#HModule:removing_handler-1">HModule:removing_handler/1</a></li> </ul> </li> <li id="no" title="logger_filters " expanded="false">logger_filters<ul> <li><a href="logger_filters.html"> Top of manual page </a></li> <li title="domain-2"><a href="logger_filters.html#domain-2">domain/2</a></li> <li title="level-2"><a href="logger_filters.html#level-2">level/2</a></li> <li title="progress-2"><a href="logger_filters.html#progress-2">progress/2</a></li> <li title="remote_gl-2"><a href="logger_filters.html#remote_gl-2">remote_gl/2</a></li> </ul> </li> <li id="no" title="logger_formatter " expanded="false">logger_formatter<ul> <li><a href="logger_formatter.html"> Top of manual page </a></li> <li title="check_config-1"><a href="logger_formatter.html#check_config-1">check_config/1</a></li> <li title="format-2"><a href="logger_formatter.html#format-2">format/2</a></li> </ul> </li> <li id="no" title="logger_std_h " expanded="false">logger_std_h<ul> <li><a href="logger_std_h.html"> Top of manual page </a></li> <li title="filesync-1"><a href="logger_std_h.html#filesync-1">filesync/1</a></li> </ul> </li> <li id="no" title="logger_disk_log_h " expanded="false">logger_disk_log_h<ul> <li><a href="logger_disk_log_h.html"> Top of manual page </a></li> <li title="filesync-1"><a href="logger_disk_log_h.html#filesync-1">filesync/1</a></li> </ul> </li> <li id="no" title="net_adm " expanded="false">net_adm<ul> <li><a href="net_adm.html"> Top of manual page </a></li> <li title="dns_hostname-1"><a href="net_adm.html#dns_hostname-1">dns_hostname/1</a></li> <li title="host_file-0"><a href="net_adm.html#host_file-0">host_file/0</a></li> <li title="localhost-0"><a href="net_adm.html#localhost-0">localhost/0</a></li> <li title="names-0"><a href="net_adm.html#names-0">names/0</a></li> <li title="names-1"><a href="net_adm.html#names-1">names/1</a></li> <li title="ping-1"><a href="net_adm.html#ping-1">ping/1</a></li> <li title="world-0"><a href="net_adm.html#world-0">world/0</a></li> <li title="world-1"><a href="net_adm.html#world-1">world/1</a></li> <li title="world_list-1"><a href="net_adm.html#world_list-1">world_list/1</a></li> <li title="world_list-2"><a href="net_adm.html#world_list-2">world_list/2</a></li> </ul> </li> <li id="no" title="net_kernel " expanded="false">net_kernel<ul> <li><a href="net_kernel.html"> Top of manual page </a></li> <li title="allow-1"><a href="net_kernel.html#allow-1">allow/1</a></li> <li title="connect_node-1"><a href="net_kernel.html#connect_node-1">connect_node/1</a></li> <li title="get_net_ticktime-0"><a href="net_kernel.html#get_net_ticktime-0">get_net_ticktime/0</a></li> <li title="getopts-2"><a href="net_kernel.html#getopts-2">getopts/2</a></li> <li title="monitor_nodes-1"><a href="net_kernel.html#monitor_nodes-1">monitor_nodes/1</a></li> <li title="monitor_nodes-2"><a href="net_kernel.html#monitor_nodes-2">monitor_nodes/2</a></li> <li title="set_net_ticktime-1"><a href="net_kernel.html#set_net_ticktime-1">set_net_ticktime/1</a></li> <li title="set_net_ticktime-2"><a href="net_kernel.html#set_net_ticktime-2">set_net_ticktime/2</a></li> <li title="setopts-2"><a href="net_kernel.html#setopts-2">setopts/2</a></li> <li title="start-1"><a href="net_kernel.html#start-1">start/1</a></li> <li title="start-1"><a href="net_kernel.html#start-1">start/1</a></li> <li title="start-1"><a href="net_kernel.html#start-1">start/1</a></li> <li title="stop-0"><a href="net_kernel.html#stop-0">stop/0</a></li> </ul> </li> <li id="no" title="os " expanded="false">os<ul> <li><a href="os.html"> Top of manual page </a></li> <li title="cmd-1"><a href="os.html#cmd-1">cmd/1</a></li> <li title="cmd-2"><a href="os.html#cmd-2">cmd/2</a></li> <li title="find_executable-1"><a href="os.html#find_executable-1">find_executable/1</a></li> <li title="find_executable-2"><a href="os.html#find_executable-2">find_executable/2</a></li> <li title="getenv-0"><a href="os.html#getenv-0">getenv/0</a></li> <li title="getenv-1"><a href="os.html#getenv-1">getenv/1</a></li> <li title="getenv-2"><a href="os.html#getenv-2">getenv/2</a></li> <li title="getpid-0"><a href="os.html#getpid-0">getpid/0</a></li> <li title="perf_counter-0"><a href="os.html#perf_counter-0">perf_counter/0</a></li> <li title="perf_counter-1"><a href="os.html#perf_counter-1">perf_counter/1</a></li> <li title="putenv-2"><a href="os.html#putenv-2">putenv/2</a></li> <li title="set_signal-2"><a href="os.html#set_signal-2">set_signal/2</a></li> <li title="system_time-0"><a href="os.html#system_time-0">system_time/0</a></li> <li title="system_time-1"><a href="os.html#system_time-1">system_time/1</a></li> <li title="timestamp-0"><a href="os.html#timestamp-0">timestamp/0</a></li> <li title="type-0"><a href="os.html#type-0">type/0</a></li> <li title="unsetenv-1"><a href="os.html#unsetenv-1">unsetenv/1</a></li> <li title="version-0"><a href="os.html#version-0">version/0</a></li> </ul> </li> <li id="no" title="pg2 " expanded="false">pg2<ul> <li><a href="pg2.html"> Top of manual page </a></li> <li title="create-1"><a href="pg2.html#create-1">create/1</a></li> <li title="delete-1"><a href="pg2.html#delete-1">delete/1</a></li> <li title="get_closest_pid-1"><a href="pg2.html#get_closest_pid-1">get_closest_pid/1</a></li> <li title="get_local_members-1"><a href="pg2.html#get_local_members-1">get_local_members/1</a></li> <li title="get_members-1"><a href="pg2.html#get_members-1">get_members/1</a></li> <li title="join-2"><a href="pg2.html#join-2">join/2</a></li> <li title="leave-2"><a href="pg2.html#leave-2">leave/2</a></li> <li title="start-0"><a href="pg2.html#start-0">start/0</a></li> <li title="start_link-0"><a href="pg2.html#start_link-0">start_link/0</a></li> <li title="which_groups-0"><a href="pg2.html#which_groups-0">which_groups/0</a></li> </ul> </li> <li id="no" title="rpc " expanded="false">rpc<ul> <li><a href="rpc.html"> Top of manual page </a></li> <li title="abcast-2"><a href="rpc.html#abcast-2">abcast/2</a></li> <li title="abcast-3"><a href="rpc.html#abcast-3">abcast/3</a></li> <li title="async_call-4"><a href="rpc.html#async_call-4">async_call/4</a></li> <li title="block_call-4"><a href="rpc.html#block_call-4">block_call/4</a></li> <li title="block_call-5"><a href="rpc.html#block_call-5">block_call/5</a></li> <li title="call-4"><a href="rpc.html#call-4">call/4</a></li> <li title="call-5"><a href="rpc.html#call-5">call/5</a></li> <li title="cast-4"><a href="rpc.html#cast-4">cast/4</a></li> <li title="eval_everywhere-3"><a href="rpc.html#eval_everywhere-3">eval_everywhere/3</a></li> <li title="eval_everywhere-4"><a href="rpc.html#eval_everywhere-4">eval_everywhere/4</a></li> <li title="multi_server_call-2"><a href="rpc.html#multi_server_call-2">multi_server_call/2</a></li> <li title="multi_server_call-3"><a href="rpc.html#multi_server_call-3">multi_server_call/3</a></li> <li title="multicall-3"><a href="rpc.html#multicall-3">multicall/3</a></li> <li title="multicall-4"><a href="rpc.html#multicall-4">multicall/4</a></li> <li title="multicall-5"><a href="rpc.html#multicall-5">multicall/5</a></li> <li title="nb_yield-1"><a href="rpc.html#nb_yield-1">nb_yield/1</a></li> <li title="nb_yield-2"><a href="rpc.html#nb_yield-2">nb_yield/2</a></li> <li title="parallel_eval-1"><a href="rpc.html#parallel_eval-1">parallel_eval/1</a></li> <li title="pinfo-1"><a href="rpc.html#pinfo-1">pinfo/1</a></li> <li title="pinfo-2"><a href="rpc.html#pinfo-2">pinfo/2</a></li> <li title="pmap-3"><a href="rpc.html#pmap-3">pmap/3</a></li> <li title="sbcast-2"><a href="rpc.html#sbcast-2">sbcast/2</a></li> <li title="sbcast-3"><a href="rpc.html#sbcast-3">sbcast/3</a></li> <li title="server_call-4"><a href="rpc.html#server_call-4">server_call/4</a></li> <li title="yield-1"><a href="rpc.html#yield-1">yield/1</a></li> </ul> </li> <li id="no" title="seq_trace " expanded="false">seq_trace<ul> <li><a href="seq_trace.html"> Top of manual page </a></li> <li title="get_system_tracer-0"><a href="seq_trace.html#get_system_tracer-0">get_system_tracer/0</a></li> <li title="get_token-0"><a href="seq_trace.html#get_token-0">get_token/0</a></li> <li title="get_token-1"><a href="seq_trace.html#get_token-1">get_token/1</a></li> <li title="print-1"><a href="seq_trace.html#print-1">print/1</a></li> <li title="print-2"><a href="seq_trace.html#print-2">print/2</a></li> <li title="reset_trace-0"><a href="seq_trace.html#reset_trace-0">reset_trace/0</a></li> <li title="set_system_tracer-1"><a href="seq_trace.html#set_system_tracer-1">set_system_tracer/1</a></li> <li title="set_token-1"><a href="seq_trace.html#set_token-1">set_token/1</a></li> <li title="set_token-2"><a href="seq_trace.html#set_token-2">set_token/2</a></li> </ul> </li> <li title="user"><a href="user.html">user</a></li> <li id="no" title="wrap_log_reader " expanded="false">wrap_log_reader<ul> <li><a href="wrap_log_reader.html"> Top of manual page </a></li> <li title="chunk-1"><a href="wrap_log_reader.html#chunk-1">chunk/1</a></li> <li title="chunk-2"><a href="wrap_log_reader.html#chunk-2">chunk/2</a></li> <li title="close-1"><a href="wrap_log_reader.html#close-1">close/1</a></li> <li title="open-1"><a href="wrap_log_reader.html#open-1">open/1</a></li> <li title="open-2"><a href="wrap_log_reader.html#open-2">open/2</a></li> </ul> </li> <li title="zlib"><a href="zlib.html">zlib</a></li> </ul> </div></div> <div id="content"> <div class="innertube"> <!-- refpage --><center><h1>logger</h1></center> <h3><span onMouseOver="document.getElementById('ghlink-module-idm281473453809928').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-module-idm281473453809928').style.visibility = 'hidden';"><span id="ghlink-module-idm281473453809928"></span><a class="title_link" name="module" href="#module">Module</a></span></h3> <div class="REFBODY module-body">logger</div> <h3><span onMouseOver="document.getElementById('ghlink-module-summary-idm281473453809480').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-module-summary-idm281473453809480').style.visibility = 'hidden';"><span id="ghlink-module-summary-idm281473453809480"></span><a class="title_link" name="module-summary" href="#module-summary">Module Summary</a></span></h3> <div class="REFBODY module-summary-body">API module for Logger, the standard logging facility in Erlang/OTP.</div> <h3><span onMouseOver="document.getElementById('ghlink-description-idm281473453808984').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-description-idm281473453808984').style.visibility = 'hidden';"><span id="ghlink-description-idm281473453808984" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L39" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="description" href="#description">Description</a></span></h3> <div class="REFBODY description-body"><p> <p>This module implements the main API for logging in Erlang/OTP. To create a log event, use the <span class="bold_code bc-17"><a href="#logging_API">API functions</a></span> or the log <span class="bold_code bc-17"><a href="#macros">macros</a></span>, for example:</p> <div class="example"><pre>?LOG_ERROR("error happened because: ~p", [Reason]). % With macro logger:error("error happened because: ~p", [Reason]). % Without macro</pre></div> <p>To configure the Logger backend, use <span class="bold_code bc-15"><a href="kernel_app.html#logger">Kernel configuration parameters</a></span> or <span class="bold_code bc-17"><a href="#configuration_API">configuration functions</a></span> in the Logger API.</p> <p>By default, the Kernel application installs one log handler at system start. This handler is named <span class="code">default</span>. It receives and processes standard log events produced by the Erlang runtime system, standard behaviours and different Erlang/OTP applications. The log events are by default printed to the terminal.</p> <p>If you want your systems logs to be printed to a file instead, you must configure the default handler to do so. The simplest way is to include the following in your <span class="bold_code bc-19"><a href="config.html"><span class="code">sys.config</span></a></span>:</p> <div class="example"><pre>[{kernel, [{logger, [{handler, default, logger_std_h, #{config => #{type => {file, "path/to/file.log"}}}}]}]}].</pre></div> <p> For more information about: </p> <ul> <li>the Logger facility in general, see the <span class="bold_code bc-19"><a href="logger_chapter.html">User's Guide</a></span>.</li> <li>how to configure Logger, see the <span class="bold_code bc-15"><a href="logger_chapter.html#configuration">Configuration</a></span> section in the User's Guide.</li> <li>the built-in handlers, see <span class="bold_code bc-19"><a href="logger_std_h.html">logger_std_h</a></span> and <span class="bold_code bc-19"><a href="logger_disk_log_h.html">logger_disk_log_h</a></span>.</li> <li>the built-in formatter, see <span class="bold_code bc-19"><a href="logger_formatter.html">logger_formatter</a></span>.</li> <li>built-in filters, see <span class="bold_code bc-19"><a href="logger_filters.html">logger_filters</a></span>.</li> </ul> <div class="note"> <div class="label">Note</div> <div class="content"><p> <p>Since Logger is new in Erlang/OTP 21.0, we do reserve the right to introduce changes to the Logger API and functionality in patches following this release. These changes might or might not be backwards compatible with the initial version.</p> </p></div> </div> </p></div> <h3><span onMouseOver="document.getElementById('ghlink-data-types-idm281473453790952').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-data-types-idm281473453790952').style.visibility = 'hidden';"><span id="ghlink-data-types-idm281473453790952"></span><a class="title_link" name="data-types" href="#data-types">Data Types</a></span></h3> <div class="data-types-body"> <div class="data-type-name" onMouseOver="document.getElementById('ghlink-type-filter').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-type-filter').style.visibility = 'hidden';"> <span id="ghlink-type-filter" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L100" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span> <span class="bold_code bc-4"><a name="type-filter">filter()</a> = <br> {fun((<span class="bold_code bc-17"><a href="#type-log_event">log_event()</a></span>, <span class="bold_code bc-17"><a href="#type-filter_arg">filter_arg()</a></span>) -> <span class="bold_code bc-17"><a href="#type-filter_return">filter_return()</a></span>),<br> <span class="bold_code bc-17"><a href="#type-filter_arg">filter_arg()</a></span>}</span><br> </div> <div class="data-type-desc"><div class="REFBODY rb-7"><p> <p>A filter which can be installed as a handler filter, or as a primary filter in Logger.</p> </p></div></div> </div> <div class="data-types-body"> <div class="data-type-name" onMouseOver="document.getElementById('ghlink-type-filter_arg').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-type-filter_arg').style.visibility = 'hidden';"> <span id="ghlink-type-filter_arg" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L107" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span> <span class="bold_code bc-4"><a name="type-filter_arg">filter_arg()</a> = term()</span><br> </div> <div class="data-type-desc"><div class="REFBODY rb-7"><p> <p>The second argument to the filter fun.</p> </p></div></div> </div> <div class="data-types-body"> <div class="data-type-name" onMouseOver="document.getElementById('ghlink-type-filter_id').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-type-filter_id').style.visibility = 'hidden';"> <span id="ghlink-type-filter_id" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L113" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span> <span class="bold_code bc-4"><a name="type-filter_id">filter_id()</a> = atom()</span><br> </div> <div class="data-type-desc"><div class="REFBODY rb-7"><p> <p>A unique identifier for a filter.</p> </p></div></div> </div> <div class="data-types-body"> <div class="data-type-name" onMouseOver="document.getElementById('ghlink-type-filter_return').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-type-filter_return').style.visibility = 'hidden';"> <span id="ghlink-type-filter_return" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L119" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span> <span class="bold_code bc-4"><a name="type-filter_return">filter_return()</a> = stop | ignore | <span class="bold_code bc-17"><a href="#type-log_event">log_event()</a></span></span><br> </div> <div class="data-type-desc"><div class="REFBODY rb-7"><p> <p>The return value from the filter fun.</p> </p></div></div> </div> <div class="data-types-body"> <div class="data-type-name" onMouseOver="document.getElementById('ghlink-type-formatter_config').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-type-formatter_config').style.visibility = 'hidden';"> <span id="ghlink-type-formatter_config" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L125" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span> <span class="bold_code bc-4"><a name="type-formatter_config">formatter_config()</a> = #{atom() => term()}</span><br> </div> <div class="data-type-desc"><div class="REFBODY rb-7"><p> <p>Configuration data for the formatter. See <span class="bold_code bc-19"><a href="logger_formatter.html"><span class="code">logger_formatter(3)</span></a></span> for an example of a formatter implementation.</p> </p></div></div> </div> <div class="data-types-body"> <div class="data-type-name" onMouseOver="document.getElementById('ghlink-type-handler_config').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-type-handler_config').style.visibility = 'hidden';"> <span id="ghlink-type-handler_config" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L134" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span> <span class="bold_code bc-4"><a name="type-handler_config">handler_config()</a> = <br> #{id => <span class="bold_code bc-17"><a href="#type-handler_id">handler_id()</a></span>,<br> config => term(),<br> level => <span class="bold_code bc-17"><a href="#type-level">level()</a></span> | all | none,<br> module => module(),<br> filter_default => log | stop,<br> filters => [{<span class="bold_code bc-17"><a href="#type-filter_id">filter_id()</a></span>, <span class="bold_code bc-17"><a href="#type-filter">filter()</a></span>}],<br> formatter => {module(), <span class="bold_code bc-17"><a href="#type-formatter_config">formatter_config()</a></span>}}</span><br> </div> <div class="data-type-desc"><div class="REFBODY rb-7"><p> <p>Handler configuration data for Logger. The following default values apply:</p> <ul> <li><span class="code">level => all</span></li> <li><span class="code">filter_default => log</span></li> <li><span class="code">filters => []</span></li> <li> <span class="code">formatter => {logger_formatter, DefaultFormatterConfig</span>}</li> </ul> <p>In addition to these, the following fields are automatically inserted by Logger, values taken from the two first parameters to <span class="bold_code bc-17"><a href="#add_handler-3"><span class="code">add_handler/3</span></a></span>:</p> <ul> <li><span class="code">id => HandlerId</span></li> <li><span class="code">module => Module</span></li> </ul> <p>These are read-only and cannot be changed in runtime.</p> <p>Handler specific configuration data is inserted by the handler callback itself, in a sub structure associated with the field named <span class="code">config</span>. See the <span class="bold_code bc-19"><a href="logger_std_h.html"><span class="code">logger_std_h(3)</span></a></span> and <span class="bold_code bc-19"><a href="logger_disk_log_h.html"><span class="code">logger_disk_log_h</span></a></span> manual pages for information about the specifc configuration for these handlers.</p> <p>See the <span class="bold_code bc-15"><a href="logger_formatter.html#type-config"><span class="code">logger_formatter(3)</span></a></span> manual page for information about the default configuration for this formatter.</p> </p></div></div> </div> <div class="data-types-body"> <div class="data-type-name" onMouseOver="document.getElementById('ghlink-type-handler_id').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-type-handler_id').style.visibility = 'hidden';"> <span id="ghlink-type-handler_id" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L167" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span> <span class="bold_code bc-4"><a name="type-handler_id">handler_id()</a> = atom()</span><br> </div> <div class="data-type-desc"><div class="REFBODY rb-7"><p> <p>A unique identifier for a handler instance.</p> </p></div></div> </div> <div class="data-types-body"> <div class="data-type-name" onMouseOver="document.getElementById('ghlink-type-level').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-type-level').style.visibility = 'hidden';"> <span id="ghlink-type-level" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L173" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span> <span class="bold_code bc-4"><a name="type-level">level()</a> = <br> emergency |<br> alert |<br> critical |<br> error |<br> warning |<br> notice |<br> info |<br> debug</span><br> </div> <div class="data-type-desc"><div class="REFBODY rb-7"><p> <p>The severity level for the message to be logged.</p> </p></div></div> </div> <div class="data-types-body"> <div class="data-type-name" onMouseOver="document.getElementById('ghlink-type-log_event').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-type-log_event').style.visibility = 'hidden';"> <span id="ghlink-type-log_event" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L179" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span> <span class="bold_code bc-4"><a name="type-log_event">log_event()</a> = <br> #{level := <span class="bold_code bc-17"><a href="#type-level">level()</a></span>,<br> msg :=<br> {<span class="bold_code bc-14"><a href="javascript:erlhref('../../../../doc/../','stdlib','io.html#type-format');">io:format()</a></span>, [term()]} |<br> {report, <span class="bold_code bc-17"><a href="#type-report">report()</a></span>} |<br> {string, <span class="bold_code bc-14"><a href="javascript:erlhref('../../../../doc/../','stdlib','unicode.html#type-chardata');">unicode:chardata()</a></span>},<br> meta := <span class="bold_code bc-17"><a href="#type-metadata">metadata()</a></span>}</span><br> </div> <div class="data-type-desc"><div class="REFBODY rb-7"><p> <p></p> </p></div></div> </div> <div class="data-types-body"> <div class="data-type-name" onMouseOver="document.getElementById('ghlink-type-metadata').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-type-metadata').style.visibility = 'hidden';"> <span id="ghlink-type-metadata" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L185" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span> <span class="bold_code bc-4"><a name="type-metadata">metadata()</a> = <br> #{pid => pid(),<br> gl => pid(),<br> time => <span class="bold_code bc-17"><a href="#type-timestamp">timestamp()</a></span>,<br> mfa => {module(), atom(), integer() >= 0},<br> file => <span class="bold_code bc-15"><a href="file.html#type-filename">file:filename()</a></span>,<br> line => integer() >= 0,<br> domain => [atom()],<br> report_cb => <span class="bold_code bc-17"><a href="#type-report_cb">report_cb()</a></span>,<br> atom() => term()}</span><br> </div> <div class="data-type-desc"><div class="REFBODY rb-7"><p> <p>Metadata for the log event.</p> <p>Logger adds the following metadata to each log event:</p> <ul> <li><span class="code">pid => self()</span></li> <li><span class="code">gl => group_leader()</span></li> <li><span class="code">time => erlang:system_time(microsecond)</span></li> </ul> <p>When a log macro is used, Logger also inserts location information:</p> <ul> <li><span class="code">mfa => {?MODULE, ?FUNCTION_NAME, ?FUNCTION_ARITY}</span></li> <li><span class="code">file => ?FILE</span></li> <li><span class="code">line => ?LINE</span></li> </ul> <p>You can add custom metadata, either by specifying a map as the last parameter to any of the log macros or the API functions, or by setting process metadata with <span class="bold_code bc-17"><a href="#set_process_metadata-1"><span class="code">set_process_metadata/1</span></a></span> or <span class="bold_code bc-17"><a href="#update_process_metadata-1"><span class="code">update_process_metadata/1</span></a></span>.</p> <p>Logger merges all the metadata maps before forwarding the log event to the handlers. If the same keys occur, values from the log call overwrite process metadata, which in turn overwrite values set by Logger.</p> <p>The following custom metadata keys have special meaning:</p> <dl> <dt><strong><span class="code">domain</span></strong></dt> <dd> <p>The value associated with this key is used by filters for grouping log events originating from, for example, specific functional areas. See <span class="bold_code bc-15"><a href="logger_filters.html#domain-2"><span class="code">logger_filters:domain/2</span></a></span> for a description of how this field can be used.</p> </dd> <dt><strong><span class="code">report_cb</span></strong></dt> <dd> <p>If the log message is specified as a <span class="bold_code bc-17"><a href="#type-report"><span class="code">report()</span></a></span>, the <span class="code">report_cb</span> key can be associated with a fun (report callback) that converts the report to a format string and arguments, or directly to a string. See the type definition of <span class="bold_code bc-17"><a href="#type-report_cb"><span class="code">report_cb()</span></a></span>, and section <span class="bold_code bc-15"><a href="logger_chapter.html#log_message">Log Message</a></span> in the User's Guide for more information about report callbacks.</p> </dd> </dl> </p></div></div> </div> <div class="data-types-body"> <div class="data-type-name" onMouseOver="document.getElementById('ghlink-type-msg_fun').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-type-msg_fun').style.visibility = 'hidden';"> <span id="ghlink-type-msg_fun" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L241" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span> <span class="bold_code bc-4"><a name="type-msg_fun">msg_fun()</a> = <br> fun((term()) -><br> {<span class="bold_code bc-14"><a href="javascript:erlhref('../../../../doc/../','stdlib','io.html#type-format');">io:format()</a></span>, [term()]} |<br> <span class="bold_code bc-17"><a href="#type-report">report()</a></span> |<br> <span class="bold_code bc-14"><a href="javascript:erlhref('../../../../doc/../','stdlib','unicode.html#type-chardata');">unicode:chardata()</a></span>)</span><br> </div> <div class="data-type-desc"><div class="REFBODY rb-7"><p> <p></p> </p></div></div> </div> <div class="data-types-body"> <div class="data-type-name" onMouseOver="document.getElementById('ghlink-type-primary_config').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-type-primary_config').style.visibility = 'hidden';"> <span id="ghlink-type-primary_config" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L247" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span> <span class="bold_code bc-4"><a name="type-primary_config">primary_config()</a> = <br> #{level => <span class="bold_code bc-17"><a href="#type-level">level()</a></span> | all | none,<br> filter_default => log | stop,<br> filters => [{<span class="bold_code bc-17"><a href="#type-filter_id">filter_id()</a></span>, <span class="bold_code bc-17"><a href="#type-filter">filter()</a></span>}]}</span><br> </div> <div class="data-type-desc"><div class="REFBODY rb-7"><p> <p>Primary configuration data for Logger. The following default values apply:</p> <ul> <li><span class="code">level => info</span></li> <li><span class="code">filter_default => log</span></li> <li><span class="code">filters => []</span></li> </ul> </p></div></div> </div> <div class="data-types-body"> <div class="data-type-name" onMouseOver="document.getElementById('ghlink-type-report').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-type-report').style.visibility = 'hidden';"> <span id="ghlink-type-report" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L259" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span> <span class="bold_code bc-4"><a name="type-report">report()</a> = map() | [{atom(), term()}]</span><br> </div> <div class="data-type-desc"><div class="REFBODY rb-7"><p> <p></p> </p></div></div> </div> <div class="data-types-body"> <div class="data-type-name" onMouseOver="document.getElementById('ghlink-type-report_cb').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-type-report_cb').style.visibility = 'hidden';"> <span id="ghlink-type-report_cb" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L265" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span> <span class="bold_code bc-4"><a name="type-report_cb">report_cb()</a> = <br> fun((<span class="bold_code bc-17"><a href="#type-report">report()</a></span>) -> {<span class="bold_code bc-14"><a href="javascript:erlhref('../../../../doc/../','stdlib','io.html#type-format');">io:format()</a></span>, [term()]}) |<br> fun((<span class="bold_code bc-17"><a href="#type-report">report()</a></span>, <span class="bold_code bc-17"><a href="#type-report_cb_config">report_cb_config()</a></span>) -> <span class="bold_code bc-14"><a href="javascript:erlhref('../../../../doc/../','stdlib','unicode.html#type-chardata');">unicode:chardata()</a></span>)</span><br> </div> <div class="data-type-desc"><div class="REFBODY rb-7"><p> <p>A fun which converts a <span class="bold_code bc-17"><a href="#type-report"><span class="code">report()</span></a></span> to a format string and arguments, or directly to a string. See section <span class="bold_code bc-15"><a href="logger_chapter.html#log_message">Log Message</a></span> in the User's Guide for more information.</p> </p></div></div> </div> <div class="data-types-body"> <div class="data-type-name" onMouseOver="document.getElementById('ghlink-type-report_cb_config').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-type-report_cb_config').style.visibility = 'hidden';"> <span id="ghlink-type-report_cb_config" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L275" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span> <span class="bold_code bc-4"><a name="type-report_cb_config">report_cb_config()</a> = <br> #{depth := integer() >= 1 | unlimited,<br> chars_limit := integer() >= 1 | unlimited,<br> single_line := boolean()}</span><br> </div> <div class="data-type-desc"><div class="REFBODY rb-7"><p> <p></p> </p></div></div> </div> <div class="data-types-body"> <div class="data-type-name" onMouseOver="document.getElementById('ghlink-type-timestamp').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-type-timestamp').style.visibility = 'hidden';"> <span id="ghlink-type-timestamp" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L281" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span> <span class="bold_code bc-4"><a name="type-timestamp">timestamp()</a> = integer()</span><br> </div> <div class="data-type-desc"><div class="REFBODY rb-7"><p> <p>A timestamp produced with <span class="bold_code bc-13"><a href="javascript:erlhref('../../../../doc/../','erts','erlang.html#system_time-1');"><span class="code">erlang:system_time(microsecond)</span></a></span>.</p> </p></div></div> </div> <h3><span onMouseOver="document.getElementById('ghlink-macros-idm281473453720264').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-macros-idm281473453720264').style.visibility = 'hidden';"><span id="ghlink-macros-idm281473453720264" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L291" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="macros" href="#macros">Macros</a></span></h3> <div class="REFBODY rb-3"> <p>The following macros are defined in <span class="code">logger.hrl</span>, which is included in a module with the directive</p> <div class="example"><pre> -include_lib("kernel/include/logger.hrl").</pre></div> <ul> <li><span class="code">?LOG_EMERGENCY(StringOrReport[,Metadata])</span></li> <li><span class="code">?LOG_EMERGENCY(FunOrFormat,Args[,Metadata])</span></li> <li><span class="code">?LOG_ALERT(StringOrReport[,Metadata])</span></li> <li><span class="code">?LOG_ALERT(FunOrFormat,Args[,Metadata])</span></li> <li><span class="code">?LOG_CRITICAL(StringOrReport[,Metadata])</span></li> <li><span class="code">?LOG_CRITICAL(FunOrFormat,Args[,Metadata])</span></li> <li><span class="code">?LOG_ERROR(StringOrReport[,Metadata])</span></li> <li><span class="code">?LOG_ERROR(FunOrFormat,Args[,Metadata])</span></li> <li><span class="code">?LOG_WARNING(StringOrReport[,Metadata])</span></li> <li><span class="code">?LOG_WARNING(FunOrFormat,Args[,Metadata])</span></li> <li><span class="code">?LOG_NOTICE(StringOrReport[,Metadata])</span></li> <li><span class="code">?LOG_NOTICE(FunOrFormat,Args[,Metadata])</span></li> <li><span class="code">?LOG_INFO(StringOrReport[,Metadata])</span></li> <li><span class="code">?LOG_INFO(FunOrFormat,Args[,Metadata])</span></li> <li><span class="code">?LOG_DEBUG(StringOrReport[,Metadata])</span></li> <li><span class="code">?LOG_DEBUG(FunOrFormat,Args[,Metadata])</span></li> <li><span class="code">?LOG(Level,StringOrReport[,Metadata])</span></li> <li><span class="code">?LOG(Level,FunOrFormat,Args[,Metadata])</span></li> </ul> <p>All macros expand to a call to Logger, where <span class="code">Level</span> is taken from the macro name, or from the first argument in the case of the <span class="code">?LOG</span> macro. Location data is added to the metadata as described under the <span class="bold_code bc-17"><a href="#type-metadata"><span class="code">metadata()</span></a></span> type definition.</p> <p>The call is wrapped in a case statement and will be evaluated only if <span class="code">Level</span> is equal to or below the configured log level.</p> </div> <h3> <a name="logging_API"></a><span onMouseOver="document.getElementById('ghlink-logging-api-functions-idm281473453702520').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-logging-api-functions-idm281473453702520').style.visibility = 'hidden';"><span id="ghlink-logging-api-functions-idm281473453702520" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L331" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="logging-api-functions" href="#logging-api-functions">Logging API functions</a></span> </h3> <div class="REFBODY rb-3"> </div> <h3><span onMouseOver="document.getElementById('ghlink-exports-idm281473453700760').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-exports-idm281473453700760').style.visibility = 'hidden';"><span id="ghlink-exports-idm281473453700760"></span><a class="title_link" name="exports" href="#exports">Exports</a></span></h3> <div class="exports-body"> <p><div class="bold_code fun-type"><span onMouseOver="document.getElementById('ghlink-emergency-1-idm281473453699880').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-emergency-1-idm281473453699880').style.visibility = 'hidden';"><span id="ghlink-emergency-1-idm281473453699880" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L336" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="emergency-1" href="#emergency-1">emergency(StringOrReport[,Metadata])</a></span></div><div class="bold_code fun-type"><span onMouseOver="document.getElementById('ghlink-emergency-2-idm281473453699416').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-emergency-2-idm281473453699416').style.visibility = 'hidden';"><span id="ghlink-emergency-2-idm281473453699416" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L336" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="emergency-2" href="#emergency-2">emergency(Format,Args[,Metadata])</a></span></div><div class="bold_code fun-type"><span onMouseOver="document.getElementById('ghlink-emergency-2-idm281473453698952').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-emergency-2-idm281473453698952').style.visibility = 'hidden';"><span id="ghlink-emergency-2-idm281473453698952" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L336" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="emergency-2" href="#emergency-2">emergency(Fun,FunArgs[,Metadata])</a></span></div></p> <div class="REFBODY rb-7"><p> <p>Equivalent to <span class="bold_code bc-17"><a href="#log-2"><span class="code">log(emergency,...)</span></a></span>.</p> </p></div> <p><div class="bold_code fun-type"><span onMouseOver="document.getElementById('ghlink-alert-1-idm281473453695080').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-alert-1-idm281473453695080').style.visibility = 'hidden';"><span id="ghlink-alert-1-idm281473453695080" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L347" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="alert-1" href="#alert-1">alert(StringOrReport[,Metadata])</a></span></div><div class="bold_code fun-type"><span onMouseOver="document.getElementById('ghlink-alert-2-idm281473453694616').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-alert-2-idm281473453694616').style.visibility = 'hidden';"><span id="ghlink-alert-2-idm281473453694616" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L347" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="alert-2" href="#alert-2">alert(Format,Args[,Metadata])</a></span></div><div class="bold_code fun-type"><span onMouseOver="document.getElementById('ghlink-alert-2-idm281473453694152').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-alert-2-idm281473453694152').style.visibility = 'hidden';"><span id="ghlink-alert-2-idm281473453694152" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L347" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="alert-2" href="#alert-2">alert(Fun,FunArgs[,Metadata])</a></span></div></p> <div class="REFBODY rb-7"><p> <p>Equivalent to <span class="bold_code bc-17"><a href="#log-2"><span class="code">log(alert,...)</span></a></span>.</p> </p></div> <p><div class="bold_code fun-type"><span onMouseOver="document.getElementById('ghlink-critical-1-idm281473453690280').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-critical-1-idm281473453690280').style.visibility = 'hidden';"><span id="ghlink-critical-1-idm281473453690280" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L358" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="critical-1" href="#critical-1">critical(StringOrReport[,Metadata])</a></span></div><div class="bold_code fun-type"><span onMouseOver="document.getElementById('ghlink-critical-2-idm281473453689816').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-critical-2-idm281473453689816').style.visibility = 'hidden';"><span id="ghlink-critical-2-idm281473453689816" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L358" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="critical-2" href="#critical-2">critical(Format,Args[,Metadata])</a></span></div><div class="bold_code fun-type"><span onMouseOver="document.getElementById('ghlink-critical-2-idm281473453689352').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-critical-2-idm281473453689352').style.visibility = 'hidden';"><span id="ghlink-critical-2-idm281473453689352" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L358" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="critical-2" href="#critical-2">critical(Fun,FunArgs[,Metadata])</a></span></div></p> <div class="REFBODY rb-7"><p> <p>Equivalent to <span class="bold_code bc-17"><a href="#log-2"><span class="code">log(critical,...)</span></a></span>.</p> </p></div> <p><div class="bold_code fun-type"><span onMouseOver="document.getElementById('ghlink-error-1-idm281473453685480').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-error-1-idm281473453685480').style.visibility = 'hidden';"><span id="ghlink-error-1-idm281473453685480" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L369" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="error-1" href="#error-1">error(StringOrReport[,Metadata])</a></span></div><div class="bold_code fun-type"><span onMouseOver="document.getElementById('ghlink-error-2-idm281473453685016').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-error-2-idm281473453685016').style.visibility = 'hidden';"><span id="ghlink-error-2-idm281473453685016" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L369" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="error-2" href="#error-2">error(Format,Args[,Metadata])</a></span></div><div class="bold_code fun-type"><span onMouseOver="document.getElementById('ghlink-error-2-idm281473453684552').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-error-2-idm281473453684552').style.visibility = 'hidden';"><span id="ghlink-error-2-idm281473453684552" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L369" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="error-2" href="#error-2">error(Fun,FunArgs[,Metadata])</a></span></div></p> <div class="REFBODY rb-7"><p> <p>Equivalent to <span class="bold_code bc-17"><a href="#log-2"><span class="code">log(error,...)</span></a></span>.</p> </p></div> <p><div class="bold_code fun-type"><span onMouseOver="document.getElementById('ghlink-warning-1-idm281473453680680').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-warning-1-idm281473453680680').style.visibility = 'hidden';"><span id="ghlink-warning-1-idm281473453680680" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L380" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="warning-1" href="#warning-1">warning(StringOrReport[,Metadata])</a></span></div><div class="bold_code fun-type"><span onMouseOver="document.getElementById('ghlink-warning-2-idm281473453680216').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-warning-2-idm281473453680216').style.visibility = 'hidden';"><span id="ghlink-warning-2-idm281473453680216" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L380" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="warning-2" href="#warning-2">warning(Format,Args[,Metadata])</a></span></div><div class="bold_code fun-type"><span onMouseOver="document.getElementById('ghlink-warning-2-idm281473453679752').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-warning-2-idm281473453679752').style.visibility = 'hidden';"><span id="ghlink-warning-2-idm281473453679752" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L380" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="warning-2" href="#warning-2">warning(Fun,FunArgs[,Metadata])</a></span></div></p> <div class="REFBODY rb-7"><p> <p>Equivalent to <span class="bold_code bc-17"><a href="#log-2"><span class="code">log(warning,...)</span></a></span>.</p> </p></div> <p><div class="bold_code fun-type"><span onMouseOver="document.getElementById('ghlink-notice-1-idm281473453675880').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-notice-1-idm281473453675880').style.visibility = 'hidden';"><span id="ghlink-notice-1-idm281473453675880" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L391" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="notice-1" href="#notice-1">notice(StringOrReport[,Metadata])</a></span></div><div class="bold_code fun-type"><span onMouseOver="document.getElementById('ghlink-notice-2-idm281473453675416').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-notice-2-idm281473453675416').style.visibility = 'hidden';"><span id="ghlink-notice-2-idm281473453675416" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L391" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="notice-2" href="#notice-2">notice(Format,Args[,Metadata])</a></span></div><div class="bold_code fun-type"><span onMouseOver="document.getElementById('ghlink-notice-2-idm281473453674952').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-notice-2-idm281473453674952').style.visibility = 'hidden';"><span id="ghlink-notice-2-idm281473453674952" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L391" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="notice-2" href="#notice-2">notice(Fun,FunArgs[,Metadata])</a></span></div></p> <div class="REFBODY rb-7"><p> <p>Equivalent to <span class="bold_code bc-17"><a href="#log-2"><span class="code">log(notice,...)</span></a></span>.</p> </p></div> <p><div class="bold_code fun-type"><span onMouseOver="document.getElementById('ghlink-info-1-idm281473453671080').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-info-1-idm281473453671080').style.visibility = 'hidden';"><span id="ghlink-info-1-idm281473453671080" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L402" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="info-1" href="#info-1">info(StringOrReport[,Metadata])</a></span></div><div class="bold_code fun-type"><span onMouseOver="document.getElementById('ghlink-info-2-idm281473453670616').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-info-2-idm281473453670616').style.visibility = 'hidden';"><span id="ghlink-info-2-idm281473453670616" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L402" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="info-2" href="#info-2">info(Format,Args[,Metadata])</a></span></div><div class="bold_code fun-type"><span onMouseOver="document.getElementById('ghlink-info-2-idm281473453670152').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-info-2-idm281473453670152').style.visibility = 'hidden';"><span id="ghlink-info-2-idm281473453670152" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L402" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="info-2" href="#info-2">info(Fun,FunArgs[,Metadata])</a></span></div></p> <div class="REFBODY rb-7"><p> <p>Equivalent to <span class="bold_code bc-17"><a href="#log-2"><span class="code">log(info,...)</span></a></span>.</p> </p></div> <p><div class="bold_code fun-type"><span onMouseOver="document.getElementById('ghlink-debug-1-idm281473453666280').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-debug-1-idm281473453666280').style.visibility = 'hidden';"><span id="ghlink-debug-1-idm281473453666280" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L413" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="debug-1" href="#debug-1">debug(StringOrReport[,Metadata])</a></span></div><div class="bold_code fun-type"><span onMouseOver="document.getElementById('ghlink-debug-2-idm281473453665816').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-debug-2-idm281473453665816').style.visibility = 'hidden';"><span id="ghlink-debug-2-idm281473453665816" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L413" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="debug-2" href="#debug-2">debug(Format,Args[,Metadata])</a></span></div><div class="bold_code fun-type"><span onMouseOver="document.getElementById('ghlink-debug-2-idm281473453665352').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-debug-2-idm281473453665352').style.visibility = 'hidden';"><span id="ghlink-debug-2-idm281473453665352" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L413" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="debug-2" href="#debug-2">debug(Fun,FunArgs[,Metadata])</a></span></div></p> <div class="REFBODY rb-7"><p> <p>Equivalent to <span class="bold_code bc-17"><a href="#log-2"><span class="code">log(debug,...)</span></a></span>.</p> </p></div> <p><a name="log-2"></a><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-log-2-idm281473446921064').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-log-2-idm281473446921064').style.visibility = 'hidden';"> <span id="ghlink-log-2-idm281473446921064" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L424" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>log(Level, StringOrReport) -> ok</div><a name="log-3"></a><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-log-3-idm281473448009592').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-log-3-idm281473448009592').style.visibility = 'hidden';"> <span id="ghlink-log-3-idm281473448009592" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L424" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>log(Level, StringOrReport, Metadata) -> ok</div><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-log-3-idm281473447571240').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-log-3-idm281473447571240').style.visibility = 'hidden';"> <span id="ghlink-log-3-idm281473447571240" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L424" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>log(Level, Format, Args) -> ok</div><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-log-3-idm281473447817080').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-log-3-idm281473447817080').style.visibility = 'hidden';"> <span id="ghlink-log-3-idm281473447817080" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L424" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>log(Level, Fun, FunArgs) -> ok</div><a name="log-4"></a><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-log-4-idm281473447571368').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-log-4-idm281473447571368').style.visibility = 'hidden';"> <span id="ghlink-log-4-idm281473447571368" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L424" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>log(Level, Format, Args, Metadata) -> ok</div><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-log-4-idm281473447416472').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-log-4-idm281473447416472').style.visibility = 'hidden';"> <span id="ghlink-log-4-idm281473447416472" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L424" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>log(Level, Fun, FunArgs, Metadata) -> ok</div><div class="REFBODY fun-types"> <h3 class="func-types-title">Types</h3> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Level = <span class="bold_code bc-17"><a href="#type-level">level()</a></span></span></div> <div class="REFTYPES rt-1"><span class="bold_code bc-2">StringOrReport = <span class="bold_code bc-14"><a href="javascript:erlhref('../../../../doc/../','stdlib','unicode.html#type-chardata');">unicode:chardata()</a></span> | <span class="bold_code bc-17"><a href="#type-report">report()</a></span></span></div> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Format = <span class="bold_code bc-14"><a href="javascript:erlhref('../../../../doc/../','stdlib','io.html#type-format');">io:format()</a></span></span></div> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Args = [term()]</span></div> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Fun = <span class="bold_code bc-17"><a href="#type-msg_fun">msg_fun()</a></span></span></div> <div class="REFTYPES rt-1"><span class="bold_code bc-2">FunArgs = term()</span></div> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Metadata = <span class="bold_code bc-17"><a href="#type-metadata">metadata()</a></span></span></div> </div></p> <div class="REFBODY rb-7"><p> <p>Log the given message.</p> </p></div> </div> <h3> <a name="configuration_API"></a><span onMouseOver="document.getElementById('ghlink-configuration-api-functions-idm281473453648184').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-configuration-api-functions-idm281473453648184').style.visibility = 'hidden';"><span id="ghlink-configuration-api-functions-idm281473453648184" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L445" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="configuration-api-functions" href="#configuration-api-functions">Configuration API functions</a></span> </h3> <div class="REFBODY rb-3"> </div> <h3><span onMouseOver="document.getElementById('ghlink-exports-idm281473453646408').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-exports-idm281473453646408').style.visibility = 'hidden';"><span id="ghlink-exports-idm281473453646408"></span><a class="title_link" name="exports" href="#exports">Exports</a></span></h3> <div class="exports-body"> <p><a name="add_handler-3"></a><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-add_handler-3-idm281473447753608').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-add_handler-3-idm281473447753608').style.visibility = 'hidden';"> <span id="ghlink-add_handler-3-idm281473447753608" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L450" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>add_handler(HandlerId, Module, Config) -> ok | {error, term()}</div><div class="REFBODY fun-types"> <h3 class="func-types-title">Types</h3> <div class="REFTYPES rt-1"><span class="bold_code bc-2">HandlerId = <span class="bold_code bc-17"><a href="#type-handler_id">handler_id()</a></span></span></div> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Module = module()</span></div> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Config = <span class="bold_code bc-17"><a href="#type-handler_config">handler_config()</a></span></span></div> </div></p> <div class="REFBODY rb-7"><p> <p>Add a handler with the given configuration.</p> <p><span class="code">HandlerId</span> is a unique identifier which must be used in all subsequent calls referring to this handler.</p> </p></div> <p><a name="add_handler_filter-3"></a><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-add_handler_filter-3-idm281473447838984').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-add_handler_filter-3-idm281473447838984').style.visibility = 'hidden';"> <span id="ghlink-add_handler_filter-3-idm281473447838984" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L461" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>add_handler_filter(HandlerId, FilterId, Filter) -><br> ok | {error, term()}</div><div class="REFBODY fun-types"> <h3 class="func-types-title">Types</h3> <div class="REFTYPES rt-1"><span class="bold_code bc-2">HandlerId = <span class="bold_code bc-17"><a href="#type-handler_id">handler_id()</a></span></span></div> <div class="REFTYPES rt-1"><span class="bold_code bc-2">FilterId = <span class="bold_code bc-17"><a href="#type-filter_id">filter_id()</a></span></span></div> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Filter = <span class="bold_code bc-17"><a href="#type-filter">filter()</a></span></span></div> </div></p> <div class="REFBODY rb-7"><p> <p>Add a filter to the specified handler.</p> <p>The filter fun is called with the log event as the first parameter, and the specified <span class="code">filter_args()</span> as the second parameter.</p> <p>The return value of the fun specifies if a log event is to be discarded or forwarded to the handler callback:</p> <dl> <dt><strong><span class="code">log_event()</span></strong></dt> <dd> <p>The filter <strong>passed</strong>. The next handler filter, if any, is applied. If no more filters exist for this handler, the log event is forwarded to the handler callback.</p> </dd> <dt><strong><span class="code">stop</span></strong></dt> <dd> <p>The filter <strong>did not pass</strong>, and the log event is immediately discarded.</p> </dd> <dt><strong><span class="code">ignore</span></strong></dt> <dd> <p>The filter has no knowledge of the log event. The next handler filter, if any, is applied. If no more filters exist for this handler, the value of the <span class="code">filter_default</span> configuration parameter for the handler specifies if the log event shall be discarded or forwarded to the handler callback.</p> </dd> </dl> <p>See section <span class="bold_code bc-15"><a href="logger_chapter.html#filters">Filters</a></span> in the User's Guide for more information about filters.</p> <p>Some built-in filters exist. These are defined in <span class="bold_code bc-19"><a href="logger_filters.html"><span class="code">logger_filters</span></a></span>.</p> </p></div> <p><a name="add_handlers-1"></a><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-add_handlers-1-idm281473448498120').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-add_handlers-1-idm281473448498120').style.visibility = 'hidden';"> <span id="ghlink-add_handlers-1-idm281473448498120" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L502" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>add_handlers(Application) -> ok | {error, term()}</div><div class="REFBODY fun-types"> <h3 class="func-types-title">Types</h3> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Application = atom()</span></div> </div></p> <div class="REFBODY rb-7"><p> <p>Reads the application configuration parameter <span class="code">logger</span> and calls <span class="code">add_handlers/1</span> with its contents.</p> </p></div> <p><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-add_handlers-1-idm281473448775912').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-add_handlers-1-idm281473448775912').style.visibility = 'hidden';"> <span id="ghlink-add_handlers-1-idm281473448775912" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L512" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>add_handlers(HandlerConfig) -> ok | {error, term()}</div><div class="REFBODY fun-types"> <h3 class="func-types-title">Types</h3> <div class="REFTYPES rt-1"><span class="bold_code bc-2">HandlerConfig = [config_handler()]</span></div> <div class="REFTYPES rt-2"> <span class="bold_code bc-5">config_handler() = <br> {handler, <span class="bold_code bc-17"><a href="#type-handler_id">handler_id()</a></span>, module(), <span class="bold_code bc-17"><a href="#type-handler_config">handler_config()</a></span>}</span><br> </div> </div></p> <div class="REFBODY rb-7"><p> <p>This function should be used by custom Logger handlers to make configuration consistent no matter which handler the system uses. Normal usage is to add a call to <span class="code">logger:add_handlers/1</span> just after the processes that the handler needs are started, and pass the application's <span class="code">logger</span> configuration as the argument. For example:</p> <div class="example"><pre>-behaviour(application). start(_, []) -> case supervisor:start_link({local, my_sup}, my_sup, []) of {ok, Pid} -> ok = logger:add_handlers(my_app), {ok, Pid, []}; Error -> Error end.</pre></div> <p>This reads the <span class="code">logger</span> configuration parameter from the <span class="code">my_app</span> application and starts the configured handlers. The contents of the configuration use the same rules as the <span class="bold_code bc-15"><a href="logger_chapter.html#handler-configuration">logger handler configuration</a></span>. </p> <p>If the handler is meant to replace the default handler, the Kernel's default handler have to be disabled before the new handler is added. A <span class="code">sys.config</span> file that disables the Kernel handler and adds a custom handler could look like this:</p> <div class="example"><pre>[{kernel, [{logger, %% Disable the default Kernel handler [{handler, default, undefined}]}]}, {my_app, [{logger, %% Enable this handler as the default [{handler, default, my_handler, #{}}]}]}].</pre></div> </p></div> <p><a name="add_primary_filter-2"></a><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-add_primary_filter-2-idm281473447463224').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-add_primary_filter-2-idm281473447463224').style.visibility = 'hidden';"> <span id="ghlink-add_primary_filter-2-idm281473447463224" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L555" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>add_primary_filter(FilterId, Filter) -> ok | {error, term()}</div><div class="REFBODY fun-types"> <h3 class="func-types-title">Types</h3> <div class="REFTYPES rt-1"><span class="bold_code bc-2">FilterId = <span class="bold_code bc-17"><a href="#type-filter_id">filter_id()</a></span></span></div> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Filter = <span class="bold_code bc-17"><a href="#type-filter">filter()</a></span></span></div> </div></p> <div class="REFBODY rb-7"><p> <p>Add a primary filter to Logger.</p> <p>The filter fun is called with the log event as the first parameter, and the specified <span class="code">filter_args()</span> as the second parameter.</p> <p>The return value of the fun specifies if a log event is to be discarded or forwarded to the handlers:</p> <dl> <dt><strong><span class="code">log_event()</span></strong></dt> <dd> <p>The filter <strong>passed</strong>. The next primary filter, if any, is applied. If no more primary filters exist, the log event is forwarded to the handler part of Logger, where handler filters are applied.</p> </dd> <dt><strong><span class="code">stop</span></strong></dt> <dd> <p>The filter <strong>did not pass</strong>, and the log event is immediately discarded.</p> </dd> <dt><strong><span class="code">ignore</span></strong></dt> <dd> <p>The filter has no knowledge of the log event. The next primary filter, if any, is applied. If no more primary filters exist, the value of the primary <span class="code">filter_default</span> configuration parameter specifies if the log event shall be discarded or forwarded to the handler part.</p> </dd> </dl> <p>See section <span class="bold_code bc-15"><a href="logger_chapter.html#filters">Filters</a></span> in the User's Guide for more information about filters.</p> <p>Some built-in filters exist. These are defined in <span class="bold_code bc-19"><a href="logger_filters.html"><span class="code">logger_filters</span></a></span>.</p> </p></div> <p><a name="get_config-0"></a><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-get_config-0-idm281473446682344').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-get_config-0-idm281473446682344').style.visibility = 'hidden';"> <span id="ghlink-get_config-0-idm281473446682344" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L596" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>get_config() -><br> #{primary => <span class="bold_code bc-17"><a href="#type-primary_config">primary_config()</a></span>,<br> handlers => [<span class="bold_code bc-17"><a href="#type-handler_config">handler_config()</a></span>],<br> module_levels =><br> [{module(), <span class="bold_code bc-17"><a href="#type-level">level()</a></span> | all | none}]}</div></p> <div class="REFBODY rb-7"><p> <p>Look up all current Logger configuration, including primary and handler configuration, and module level settings.</p> </p></div> <p><a name="get_handler_config-0"></a><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-get_handler_config-0-idm281473446681672').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-get_handler_config-0-idm281473446681672').style.visibility = 'hidden';"> <span id="ghlink-get_handler_config-0-idm281473446681672" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L605" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>get_handler_config() -> [Config]</div><div class="REFBODY fun-types"> <h3 class="func-types-title">Types</h3> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Config = <span class="bold_code bc-17"><a href="#type-handler_config">handler_config()</a></span></span></div> </div></p> <div class="REFBODY rb-7"><p> <p>Look up the current configuration for all handlers.</p> </p></div> <p><a name="get_handler_config-1"></a><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-get_handler_config-1-idm281473446682600').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-get_handler_config-1-idm281473446682600').style.visibility = 'hidden';"> <span id="ghlink-get_handler_config-1-idm281473446682600" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L613" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>get_handler_config(HandlerId) -> {ok, Config} | {error, term()}</div><div class="REFBODY fun-types"> <h3 class="func-types-title">Types</h3> <div class="REFTYPES rt-1"><span class="bold_code bc-2">HandlerId = <span class="bold_code bc-17"><a href="#type-handler_id">handler_id()</a></span></span></div> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Config = <span class="bold_code bc-17"><a href="#type-handler_config">handler_config()</a></span></span></div> </div></p> <div class="REFBODY rb-7"><p> <p>Look up the current configuration for the given handler.</p> </p></div> <p><a name="get_handler_ids-0"></a><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-get_handler_ids-0-idm281473447088744').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-get_handler_ids-0-idm281473447088744').style.visibility = 'hidden';"> <span id="ghlink-get_handler_ids-0-idm281473447088744" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L622" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>get_handler_ids() -> [HandlerId]</div><div class="REFBODY fun-types"> <h3 class="func-types-title">Types</h3> <div class="REFTYPES rt-1"><span class="bold_code bc-2">HandlerId = <span class="bold_code bc-17"><a href="#type-handler_id">handler_id()</a></span></span></div> </div></p> <div class="REFBODY rb-7"><p> <p>Look up the identities for all installed handlers.</p> </p></div> <p><a name="get_primary_config-0"></a><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-get_primary_config-0-idm281473447089624').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-get_primary_config-0-idm281473447089624').style.visibility = 'hidden';"> <span id="ghlink-get_primary_config-0-idm281473447089624" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L630" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>get_primary_config() -> Config</div><div class="REFBODY fun-types"> <h3 class="func-types-title">Types</h3> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Config = <span class="bold_code bc-17"><a href="#type-primary_config">primary_config()</a></span></span></div> </div></p> <div class="REFBODY rb-7"><p> <p>Look up the current primary configuration for Logger.</p> </p></div> <p><a name="get_module_level-0"></a><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-get_module_level-0-idm281473445979096').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-get_module_level-0-idm281473445979096').style.visibility = 'hidden';"> <span id="ghlink-get_module_level-0-idm281473445979096" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L638" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>get_module_level() -> [{Module, Level}]</div><div class="REFBODY fun-types"> <h3 class="func-types-title">Types</h3> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Module = module()</span></div> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Level = <span class="bold_code bc-17"><a href="#type-level">level()</a></span> | all | none</span></div> </div></p> <div class="REFBODY rb-7"><p> <p>Look up all current module levels. Returns a list containing one <span class="code">{Module,Level}</span> element for each module for which the module level was previously set with <span class="bold_code bc-17"><a href="#set_module_level-2"><span class="code">set_module_level/2</span></a></span>.</p> </p></div> <p><a name="get_module_level-1"></a><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-get_module_level-1-idm281473447381112').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-get_module_level-1-idm281473447381112').style.visibility = 'hidden';"> <span id="ghlink-get_module_level-1-idm281473447381112" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L650" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>get_module_level(Modules) -> [{Module, Level}]</div><div class="REFBODY fun-types"> <h3 class="func-types-title">Types</h3> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Modules = [Module] | Module</span></div> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Module = module()</span></div> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Level = <span class="bold_code bc-17"><a href="#type-level">level()</a></span> | all | none</span></div> </div></p> <div class="REFBODY rb-7"><p> <p>Look up the current level for the given modules. Returns a list containing one <span class="code">{Module,Level}</span> element for each of the given modules for which the module level was previously set with <span class="bold_code bc-17"><a href="#set_module_level-2"><span class="code">set_module_level/2</span></a></span>.</p> </p></div> <p><a name="get_process_metadata-0"></a><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-get_process_metadata-0-idm281473446832952').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-get_process_metadata-0-idm281473446832952').style.visibility = 'hidden';"> <span id="ghlink-get_process_metadata-0-idm281473446832952" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L662" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>get_process_metadata() -> Meta | undefined</div><div class="REFBODY fun-types"> <h3 class="func-types-title">Types</h3> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Meta = <span class="bold_code bc-17"><a href="#type-metadata">metadata()</a></span></span></div> </div></p> <div class="REFBODY rb-7"><p> <p>Retrieve data set with <span class="bold_code bc-17"><a href="#set_process_metadata-1"><span class="code">set_process_metadata/1</span></a></span> or <span class="bold_code bc-17"><a href="#update_process_metadata-1"><span class="code">update_process_metadata/1</span></a></span>.</p> </p></div> <p><a name="remove_handler-1"></a><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-remove_handler-1-idm281473448108056').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-remove_handler-1-idm281473448108056').style.visibility = 'hidden';"> <span id="ghlink-remove_handler-1-idm281473448108056" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L674" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>remove_handler(HandlerId) -> ok | {error, term()}</div><div class="REFBODY fun-types"> <h3 class="func-types-title">Types</h3> <div class="REFTYPES rt-1"><span class="bold_code bc-2">HandlerId = <span class="bold_code bc-17"><a href="#type-handler_id">handler_id()</a></span></span></div> </div></p> <div class="REFBODY rb-7"><p> <p>Remove the handler identified by <span class="code">HandlerId</span>.</p> </p></div> <p><a name="remove_handler_filter-2"></a><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-remove_handler_filter-2-idm281473448106536').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-remove_handler_filter-2-idm281473448106536').style.visibility = 'hidden';"> <span id="ghlink-remove_handler_filter-2-idm281473448106536" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L682" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>remove_handler_filter(HandlerId, FilterId) -> ok | {error, term()}</div><div class="REFBODY fun-types"> <h3 class="func-types-title">Types</h3> <div class="REFTYPES rt-1"><span class="bold_code bc-2">HandlerId = <span class="bold_code bc-17"><a href="#type-handler_id">handler_id()</a></span></span></div> <div class="REFTYPES rt-1"><span class="bold_code bc-2">FilterId = <span class="bold_code bc-17"><a href="#type-filter_id">filter_id()</a></span></span></div> </div></p> <div class="REFBODY rb-7"><p> <p>Remove the filter identified by <span class="code">FilterId</span> from the handler identified by <span class="code">HandlerId</span>.</p> </p></div> <p><a name="remove_primary_filter-1"></a><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-remove_primary_filter-1-idm281473448097496').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-remove_primary_filter-1-idm281473448097496').style.visibility = 'hidden';"> <span id="ghlink-remove_primary_filter-1-idm281473448097496" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L692" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>remove_primary_filter(FilterId) -> ok | {error, term()}</div><div class="REFBODY fun-types"> <h3 class="func-types-title">Types</h3> <div class="REFTYPES rt-1"><span class="bold_code bc-2">FilterId = <span class="bold_code bc-17"><a href="#type-filter_id">filter_id()</a></span></span></div> </div></p> <div class="REFBODY rb-7"><p> <p>Remove the primary filter identified by <span class="code">FilterId</span> from Logger.</p> </p></div> <p><a name="set_application_level-2"></a><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-set_application_level-2-idm281473447302200').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-set_application_level-2-idm281473447302200').style.visibility = 'hidden';"> <span id="ghlink-set_application_level-2-idm281473447302200" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L701" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>set_application_level(Application, Level) -><br> ok | {error, not_loaded}</div><div class="REFBODY fun-types"> <h3 class="func-types-title">Types</h3> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Application = atom()</span></div> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Level = <span class="bold_code bc-17"><a href="#type-level">level()</a></span> | all | none</span></div> </div></p> <div class="REFBODY rb-7"><p> <p>Set the log level for all the modules of the specified application.</p> <p>This function is a convenience function that calls <span class="bold_code bc-17"><a href="#set_module_level-2">logger:set_module_level/2</a></span> for each module associated with an application.</p> </p></div> <p><a name="set_handler_config-2"></a><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-set_handler_config-2-idm281473447854776').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-set_handler_config-2-idm281473447854776').style.visibility = 'hidden';"> <span id="ghlink-set_handler_config-2-idm281473447854776" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L712" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>set_handler_config(HandlerId, Config) -> ok | {error, term()}</div><div class="REFBODY fun-types"> <h3 class="func-types-title">Types</h3> <div class="REFTYPES rt-1"><span class="bold_code bc-2">HandlerId = <span class="bold_code bc-17"><a href="#type-handler_id">handler_id()</a></span></span></div> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Config = <span class="bold_code bc-17"><a href="#type-handler_config">handler_config()</a></span></span></div> </div></p> <div class="REFBODY rb-7"><p> <p>Set configuration data for the specified handler. This overwrites the current handler configuration.</p> <p>To modify the existing configuration, use <span class="bold_code bc-17"><a href="#update_handler_config-2"><span class="code">update_handler_config/2</span></a></span>, or, if a more complex merge is needed, read the current configuration with <span class="bold_code bc-17"><a href="#get_handler_config-1"><span class="code">get_handler_config/1</span></a></span>, then do the merge before writing the new configuration back with this function.</p> <p>If a key is removed compared to the current configuration, and the key is known by Logger, the default value is used. If it is a custom key, then it is up to the handler implementation if the value is removed or a default value is inserted.</p> </p></div> <p><a name="set_handler_config-3"></a><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-set_handler_config-3-idm281473447858232').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-set_handler_config-3-idm281473447858232').style.visibility = 'hidden';"> <span id="ghlink-set_handler_config-3-idm281473447858232" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L733" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>set_handler_config(HandlerId, Key :: level, Level) -> Return</div><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-set_handler_config-3-idm281473447037960').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-set_handler_config-3-idm281473447037960').style.visibility = 'hidden';"> <span id="ghlink-set_handler_config-3-idm281473447037960" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L733" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>set_handler_config(HandlerId,<br> Key :: filter_default,<br> FilterDefault) -><br> Return</div><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-set_handler_config-3-idm281473447856600').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-set_handler_config-3-idm281473447856600').style.visibility = 'hidden';"> <span id="ghlink-set_handler_config-3-idm281473447856600" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L733" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>set_handler_config(HandlerId, Key :: filters, Filters) -> Return</div><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-set_handler_config-3-idm281473447039848').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-set_handler_config-3-idm281473447039848').style.visibility = 'hidden';"> <span id="ghlink-set_handler_config-3-idm281473447039848" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L733" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>set_handler_config(HandlerId, Key :: formatter, Formatter) -><br> Return</div><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-set_handler_config-3-idm281473448323704').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-set_handler_config-3-idm281473448323704').style.visibility = 'hidden';"> <span id="ghlink-set_handler_config-3-idm281473448323704" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L733" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>set_handler_config(HandlerId, Key :: config, Config) -> Return</div><div class="REFBODY fun-types"> <h3 class="func-types-title">Types</h3> <div class="REFTYPES rt-1"><span class="bold_code bc-2">HandlerId = <span class="bold_code bc-17"><a href="#type-handler_id">handler_id()</a></span></span></div> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Level = <span class="bold_code bc-17"><a href="#type-level">level()</a></span> | all | none</span></div> <div class="REFTYPES rt-1"><span class="bold_code bc-2">FilterDefault = log | stop</span></div> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Filters = [{<span class="bold_code bc-17"><a href="#type-filter_id">filter_id()</a></span>, <span class="bold_code bc-17"><a href="#type-filter">filter()</a></span>}]</span></div> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Formatter = {module(), <span class="bold_code bc-17"><a href="#type-formatter_config">formatter_config()</a></span>}</span></div> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Config = term()</span></div> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Return = ok | {error, term()}</span></div> </div></p> <div class="REFBODY rb-7"><p> <p>Add or update configuration data for the specified handler. If the given <span class="code">Key</span> already exists, its associated value will be changed to the given value. If it does not exist, it will be added.</p> <p>If the value is incomplete, which for example can be the case for the <span class="code">config</span> key, it is up to the handler implementation how the unspecified parts are set. For all handlers in the Kernel application, unspecified data for the <span class="code">config</span> key is set to default values. To update only specified data, and keep the existing configuration for the rest, use <span class="bold_code bc-17"><a href="#update_handler_config-3"><span class="code">update_handler_config/3</span></a></span>.</p> <p>See the definition of the <span class="bold_code bc-17"><a href="#type-handler_config"><span class="code">handler_config()</span></a></span> type for more information about the different parameters.</p> </p></div> <p><a name="set_primary_config-1"></a><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-set_primary_config-1-idm281473448314504').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-set_primary_config-1-idm281473448314504').style.visibility = 'hidden';"> <span id="ghlink-set_primary_config-1-idm281473448314504" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L769" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>set_primary_config(Config) -> ok | {error, term()}</div><div class="REFBODY fun-types"> <h3 class="func-types-title">Types</h3> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Config = <span class="bold_code bc-17"><a href="#type-primary_config">primary_config()</a></span></span></div> </div></p> <div class="REFBODY rb-7"><p> <p>Set primary configuration data for Logger. This overwrites the current configuration.</p> <p>To modify the existing configuration, use <span class="bold_code bc-17"><a href="#update_primary_config-1"><span class="code">update_primary_config/1</span></a></span>, or, if a more complex merge is needed, read the current configuration with <span class="bold_code bc-17"><a href="#get_primary_config-0"><span class="code">get_primary_config/0</span></a></span>, then do the merge before writing the new configuration back with this function.</p> <p>If a key is removed compared to the current configuration, the default value is used.</p> </p></div> <p><a name="set_primary_config-2"></a><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-set_primary_config-2-idm281473446579032').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-set_primary_config-2-idm281473446579032').style.visibility = 'hidden';"> <span id="ghlink-set_primary_config-2-idm281473446579032" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L787" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>set_primary_config(Key :: level, Level) -> ok | {error, term()}</div><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-set_primary_config-2-idm281473446633576').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-set_primary_config-2-idm281473446633576').style.visibility = 'hidden';"> <span id="ghlink-set_primary_config-2-idm281473446633576" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L787" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>set_primary_config(Key :: filter_default, FilterDefault) -><br> ok | {error, term()}</div><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-set_primary_config-2-idm281473447064504').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-set_primary_config-2-idm281473447064504').style.visibility = 'hidden';"> <span id="ghlink-set_primary_config-2-idm281473447064504" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L787" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>set_primary_config(Key :: filters, Filters) -><br> ok | {error, term()}</div><div class="REFBODY fun-types"> <h3 class="func-types-title">Types</h3> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Level = <span class="bold_code bc-17"><a href="#type-level">level()</a></span> | all | none</span></div> <div class="REFTYPES rt-1"><span class="bold_code bc-2">FilterDefault = log | stop</span></div> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Filters = [{<span class="bold_code bc-17"><a href="#type-filter_id">filter_id()</a></span>, <span class="bold_code bc-17"><a href="#type-filter">filter()</a></span>}]</span></div> </div></p> <div class="REFBODY rb-7"><p> <p>Add or update primary configuration data for Logger. If the given <span class="code">Key</span> already exists, its associated value will be changed to the given value. If it does not exist, it will be added.</p> </p></div> <p><a name="set_module_level-2"></a><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-set_module_level-2-idm281473447048760').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-set_module_level-2-idm281473447048760').style.visibility = 'hidden';"> <span id="ghlink-set_module_level-2-idm281473447048760" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L803" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>set_module_level(Modules, Level) -> ok | {error, term()}</div><div class="REFBODY fun-types"> <h3 class="func-types-title">Types</h3> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Modules = [module()] | module()</span></div> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Level = <span class="bold_code bc-17"><a href="#type-level">level()</a></span> | all | none</span></div> </div></p> <div class="REFBODY rb-7"><p> <p>Set the log level for the specified modules.</p> <p>The log level for a module overrides the primary log level of Logger for log events originating from the module in question. Notice, however, that it does not override the level configuration for any handler.</p> <p>For example: Assume that the primary log level for Logger is <span class="code">info</span>, and there is one handler, <span class="code">h1</span>, with level <span class="code">info</span> and one handler, <span class="code">h2</span>, with level <span class="code">debug</span>.</p> <p>With this configuration, no debug messages will be logged, since they are all stopped by the primary log level.</p> <p>If the level for <span class="code">mymodule</span> is now set to <span class="code">debug</span>, then debug events from this module will be logged by the handler <span class="code">h2</span>, but not by handler <span class="code">h1</span>.</p> <p>Debug events from other modules are still not logged.</p> <p>To change the primary log level for Logger, use <span class="bold_code bc-17"><a href="#set_primary_config-2"><span class="code">set_primary_config(level, Level)</span></a></span>.</p> <p>To change the log level for a handler, use <span class="bold_code bc-17"><a href="#set_handler_config-3"><span class="code">set_handler_config(HandlerId, level, Level)</span></a></span>.</p> <div class="note"> <div class="label">Note</div> <div class="content"><p> <p>The originating module for a log event is only detected if the key <span class="code">mfa</span> exists in the metadata, and is associated with <span class="code">{Module, Function, Arity}</span>. When log macros are used, this association is automatically added to all log events. If an API function is called directly, without using a macro, the logging client must explicitly add this information if module levels shall have any effect.</p> </p></div> </div> </p></div> <p><a name="set_process_metadata-1"></a><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-set_process_metadata-1-idm281473446159416').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-set_process_metadata-1-idm281473446159416').style.visibility = 'hidden';"> <span id="ghlink-set_process_metadata-1-idm281473446159416" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L843" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>set_process_metadata(Meta) -> ok</div><div class="REFBODY fun-types"> <h3 class="func-types-title">Types</h3> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Meta = <span class="bold_code bc-17"><a href="#type-metadata">metadata()</a></span></span></div> </div></p> <div class="REFBODY rb-7"><p> <p>Set metadata which Logger shall automatically insert in all log events produced on the current process.</p> <p>Location data produced by the log macros, and/or metadata given as argument to the log call (API function or macro), are merged with the process metadata. If the same keys occur, values from the metadata argument to the log call overwrite values from the process metadata, which in turn overwrite values from the location data.</p> <p>Subsequent calls to this function overwrites previous data set. To update existing data instead of overwriting it, see <span class="bold_code bc-17"><a href="#update_process_metadata-1"><span class="code">update_process_metadata/1</span></a></span>.</p> </p></div> <p><a name="unset_application_level-1"></a><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-unset_application_level-1-idm281473446157000').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-unset_application_level-1-idm281473446157000').style.visibility = 'hidden';"> <span id="ghlink-unset_application_level-1-idm281473446157000" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L862" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>unset_application_level(Application) -> ok | {error, not_loaded}</div><div class="REFBODY fun-types"> <h3 class="func-types-title">Types</h3> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Application = atom()</span></div> </div></p> <div class="REFBODY rb-7"><p> <p>Unset the log level for all the modules of the specified application.</p> <p>This function is a convinience function that calls <span class="bold_code bc-17"><a href="#unset_module_level-1">logger:unset_module_level/2</a></span> for each module associated with an application.</p> </p></div> <p><a name="unset_module_level-0"></a><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-unset_module_level-0-idm281473446626760').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-unset_module_level-0-idm281473446626760').style.visibility = 'hidden';"> <span id="ghlink-unset_module_level-0-idm281473446626760" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L873" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>unset_module_level() -> ok</div></p> <div class="REFBODY rb-7"><p> <p>Remove module specific log settings. After this, the primary log level is used for all modules.</p> </p></div> <p><a name="unset_module_level-1"></a><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-unset_module_level-1-idm281473446622248').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-unset_module_level-1-idm281473446622248').style.visibility = 'hidden';"> <span id="ghlink-unset_module_level-1-idm281473446622248" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L882" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>unset_module_level(Modules) -> ok</div><div class="REFBODY fun-types"> <h3 class="func-types-title">Types</h3> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Modules = [module()] | module()</span></div> </div></p> <div class="REFBODY rb-7"><p> <p>Remove module specific log settings. After this, the primary log level is used for the specified modules.</p> </p></div> <p><a name="unset_process_metadata-0"></a><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-unset_process_metadata-0-idm281473446620968').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-unset_process_metadata-0-idm281473446620968').style.visibility = 'hidden';"> <span id="ghlink-unset_process_metadata-0-idm281473446620968" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L892" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>unset_process_metadata() -> ok</div></p> <div class="REFBODY rb-7"><p> <p>Delete data set with <span class="bold_code bc-17"><a href="#set_process_metadata-1"><span class="code">set_process_metadata/1</span></a></span> or <span class="bold_code bc-17"><a href="#update_process_metadata-1"><span class="code">update_process_metadata/1</span></a></span>.</p> </p></div> <p><a name="update_formatter_config-2"></a><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-update_formatter_config-2-idm281473446599960').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-update_formatter_config-2-idm281473446599960').style.visibility = 'hidden';"> <span id="ghlink-update_formatter_config-2-idm281473446599960" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L904" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>update_formatter_config(HandlerId, FormatterConfig) -><br> ok | {error, term()}</div><div class="REFBODY fun-types"> <h3 class="func-types-title">Types</h3> <div class="REFTYPES rt-1"><span class="bold_code bc-2">HandlerId = <span class="bold_code bc-17"><a href="#type-handler_id">handler_id()</a></span></span></div> <div class="REFTYPES rt-1"><span class="bold_code bc-2">FormatterConfig = <span class="bold_code bc-17"><a href="#type-formatter_config">formatter_config()</a></span></span></div> </div></p> <div class="REFBODY rb-7"><p> <p>Update the formatter configuration for the specified handler.</p> <p>The new configuration is merged with the existing formatter configuration.</p> <p>To overwrite the existing configuration without any merge, use</p> <div class="example"><pre> <span class="bold_code bc-17"><a href="#set_handler_config-3">set_handler_config(HandlerId, formatter, {FormatterModule, FormatterConfig})</a></span>.</pre></div> </p></div> <p><a name="update_formatter_config-3"></a><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-update_formatter_config-3-idm281473446591832').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-update_formatter_config-3-idm281473446591832').style.visibility = 'hidden';"> <span id="ghlink-update_formatter_config-3-idm281473446591832" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L919" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>update_formatter_config(HandlerId, Key, Value) -><br> ok | {error, term()}</div><div class="REFBODY fun-types"> <h3 class="func-types-title">Types</h3> <div class="REFTYPES rt-1"><span class="bold_code bc-2">HandlerId = <span class="bold_code bc-17"><a href="#type-handler_id">handler_id()</a></span></span></div> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Key = atom()</span></div> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Value = term()</span></div> </div></p> <div class="REFBODY rb-7"><p> <p>Update the formatter configuration for the specified handler.</p> <p>This is equivalent to</p> <div class="example"><pre> <span class="bold_code bc-17"><a href="#update_formatter_config-2">update_formatter_config(HandlerId, #{Key=>Value})</a></span></pre></div> </p></div> <p><a name="update_handler_config-2"></a><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-update_handler_config-2-idm281473447986392').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-update_handler_config-2-idm281473447986392').style.visibility = 'hidden';"> <span id="ghlink-update_handler_config-2-idm281473447986392" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L930" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>update_handler_config(HandlerId, Config) -> ok | {error, term()}</div><div class="REFBODY fun-types"> <h3 class="func-types-title">Types</h3> <div class="REFTYPES rt-1"><span class="bold_code bc-2">HandlerId = <span class="bold_code bc-17"><a href="#type-handler_id">handler_id()</a></span></span></div> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Config = <span class="bold_code bc-17"><a href="#type-handler_config">handler_config()</a></span></span></div> </div></p> <div class="REFBODY rb-7"><p> <p>Update configuration data for the specified handler. This function behaves as if it was implemented as follows:</p> <div class="example"><pre>{ok, {_, Old}} = logger:get_handler_config(HandlerId), logger:set_handler_config(HandlerId, maps:merge(Old, Config)).</pre></div> <p>To overwrite the existing configuration without any merge, use <span class="bold_code bc-17"><a href="#set_handler_config-2"><span class="code">set_handler_config/2</span></a></span>.</p> </p></div> <p><a name="update_handler_config-3"></a><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-update_handler_config-3-idm281473445976280').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-update_handler_config-3-idm281473445976280').style.visibility = 'hidden';"> <span id="ghlink-update_handler_config-3-idm281473445976280" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L946" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>update_handler_config(HandlerId, Key :: level, Level) -> Return</div><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-update_handler_config-3-idm281473445970568').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-update_handler_config-3-idm281473445970568').style.visibility = 'hidden';"> <span id="ghlink-update_handler_config-3-idm281473445970568" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L946" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>update_handler_config(HandlerId,<br> Key :: filter_default,<br> FilterDefault) -><br> Return</div><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-update_handler_config-3-idm281473445971912').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-update_handler_config-3-idm281473445971912').style.visibility = 'hidden';"> <span id="ghlink-update_handler_config-3-idm281473445971912" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L946" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>update_handler_config(HandlerId, Key :: filters, Filters) -><br> Return</div><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-update_handler_config-3-idm281473445963528').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-update_handler_config-3-idm281473445963528').style.visibility = 'hidden';"> <span id="ghlink-update_handler_config-3-idm281473445963528" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L946" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>update_handler_config(HandlerId, Key :: formatter, Formatter) -><br> Return</div><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-update_handler_config-3-idm281473445972040').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-update_handler_config-3-idm281473445972040').style.visibility = 'hidden';"> <span id="ghlink-update_handler_config-3-idm281473445972040" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L946" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>update_handler_config(HandlerId, Key :: config, Config) -> Return</div><div class="REFBODY fun-types"> <h3 class="func-types-title">Types</h3> <div class="REFTYPES rt-1"><span class="bold_code bc-2">HandlerId = <span class="bold_code bc-17"><a href="#type-handler_id">handler_id()</a></span></span></div> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Level = <span class="bold_code bc-17"><a href="#type-level">level()</a></span> | all | none</span></div> <div class="REFTYPES rt-1"><span class="bold_code bc-2">FilterDefault = log | stop</span></div> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Filters = [{<span class="bold_code bc-17"><a href="#type-filter_id">filter_id()</a></span>, <span class="bold_code bc-17"><a href="#type-filter">filter()</a></span>}]</span></div> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Formatter = {module(), <span class="bold_code bc-17"><a href="#type-formatter_config">formatter_config()</a></span>}</span></div> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Config = term()</span></div> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Return = ok | {error, term()}</span></div> </div></p> <div class="REFBODY rb-7"><p> <p>Add or update configuration data for the specified handler. If the given <span class="code">Key</span> already exists, its associated value will be changed to the given value. If it does not exist, it will be added.</p> <p>If the value is incomplete, which for example can be the case for the <span class="code">config</span> key, it is up to the handler implementation how the unspecified parts are set. For all handlers in the Kernel application, unspecified data for the <span class="code">config</span> key is not changed. To reset unspecified data to default values, use <span class="bold_code bc-17"><a href="#set_handler_config-3"><span class="code">set_handler_config/3</span></a></span>.</p> <p>See the definition of the <span class="bold_code bc-17"><a href="#type-handler_config"><span class="code">handler_config()</span></a></span> type for more information about the different parameters.</p> </p></div> <p><a name="update_primary_config-1"></a><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-update_primary_config-1-idm281473446659768').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-update_primary_config-1-idm281473446659768').style.visibility = 'hidden';"> <span id="ghlink-update_primary_config-1-idm281473446659768" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L982" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>update_primary_config(Config) -> ok | {error, term()}</div><div class="REFBODY fun-types"> <h3 class="func-types-title">Types</h3> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Config = <span class="bold_code bc-17"><a href="#type-primary_config">primary_config()</a></span></span></div> </div></p> <div class="REFBODY rb-7"><p> <p>Update primary configuration data for Logger. This function behaves as if it was implemented as follows:</p> <div class="example"><pre>Old = logger:get_primary_config(), logger:set_primary_config(maps:merge(Old, Config)).</pre></div> <p>To overwrite the existing configuration without any merge, use <span class="bold_code bc-17"><a href="#set_primary_config-1"><span class="code">set_primary_config/1</span></a></span>.</p> </p></div> <p><a name="update_process_metadata-1"></a><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-update_process_metadata-1-idm281473446419976').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-update_process_metadata-1-idm281473446419976').style.visibility = 'hidden';"> <span id="ghlink-update_process_metadata-1-idm281473446419976" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L998" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>update_process_metadata(Meta) -> ok</div><div class="REFBODY fun-types"> <h3 class="func-types-title">Types</h3> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Meta = <span class="bold_code bc-17"><a href="#type-metadata">metadata()</a></span></span></div> </div></p> <div class="REFBODY rb-7"><p> <p>Set or update metadata to use when logging from current process</p> <p>If process metadata exists for the current process, this function behaves as if it was implemented as follows:</p> <div class="example"><pre>logger:set_process_metadata(maps:merge(logger:get_process_metadata(), Meta)).</pre></div> <p>If no process metadata exists, the function behaves as <span class="bold_code bc-17"><a href="#set_process_metadata-1"><span class="code">set_process_metadata/1</span></a></span>.</p> </p></div> </div> <h3> <a name="misc_API"></a><span onMouseOver="document.getElementById('ghlink-miscellaneous-api-functions-idm281473453434488').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-miscellaneous-api-functions-idm281473453434488').style.visibility = 'hidden';"><span id="ghlink-miscellaneous-api-functions-idm281473453434488" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L1018" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="miscellaneous-api-functions" href="#miscellaneous-api-functions">Miscellaneous API functions</a></span> </h3> <div class="REFBODY rb-3"> </div> <h3><span onMouseOver="document.getElementById('ghlink-exports-idm281473453432712').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-exports-idm281473453432712').style.visibility = 'hidden';"><span id="ghlink-exports-idm281473453432712"></span><a class="title_link" name="exports" href="#exports">Exports</a></span></h3> <div class="exports-body"> <p><a name="compare_levels-2"></a><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-compare_levels-2-idm281473447695720').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-compare_levels-2-idm281473447695720').style.visibility = 'hidden';"> <span id="ghlink-compare_levels-2-idm281473447695720" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L1023" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>compare_levels(Level1, Level2) -> eq | gt | lt</div><div class="REFBODY fun-types"> <h3 class="func-types-title">Types</h3> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Level1 = Level2 = <span class="bold_code bc-17"><a href="#type-level">level()</a></span></span></div> <div class="REFTYPES rt-1"><span class="bold_code bc-2"></span></div> </div></p> <div class="REFBODY rb-7"><p> <p>Compare the severity of two log levels. Returns <span class="code">gt</span> if <span class="code">Level1</span> is more severe than <span class="code">Level2</span>, <span class="code">lt</span> if <span class="code">Level1</span> is less severe, and <span class="code">eq</span> if the levels are equal.</p> </p></div> <p><a name="format_report-1"></a><div class="bold_code func-head" onMouseOver="document.getElementById('ghlink-format_report-1-idm281473447683048').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-format_report-1-idm281473447683048').style.visibility = 'hidden';"> <span id="ghlink-format_report-1-idm281473447683048" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L1034" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span>format_report(Report) -> FormatArgs</div><div class="REFBODY fun-types"> <h3 class="func-types-title">Types</h3> <div class="REFTYPES rt-1"><span class="bold_code bc-2">Report = <span class="bold_code bc-17"><a href="#type-report">report()</a></span></span></div> <div class="REFTYPES rt-1"><span class="bold_code bc-2">FormatArgs = {<span class="bold_code bc-14"><a href="javascript:erlhref('../../../../doc/../','stdlib','io.html#type-format');">io:format()</a></span>, [term()]}</span></div> </div></p> <div class="REFBODY rb-7"><p> <p>Convert a log message on report form to <span class="code">{Format, Args}</span>. This is the default report callback used by <span class="bold_code bc-19"><a href="logger_formatter.html"><span class="code">logger_formatter</span></a></span> when no custom report callback is found. See section <span class="bold_code bc-15"><a href="logger_chapter.html#log_message">Log Message</a></span> in the Kernel User's Guide for information about report callbacks and valid forms of log messages.</p> <p>The function produces lines of <span class="code">Key: Value</span> from key-value lists. Strings are printed with <span class="code">~ts</span> and other terms with <span class="code">~tp</span>.</p> <p>If <span class="code">Report</span> is a map, it is converted to a key-value list before formatting as such.</p> </p></div> </div> <h3> <a name="handler_callback_functions"></a><span onMouseOver="document.getElementById('ghlink-handler-callback-functions-idm281473453418248').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-handler-callback-functions-idm281473453418248').style.visibility = 'hidden';"><span id="ghlink-handler-callback-functions-idm281473453418248" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L1056" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="handler-callback-functions" href="#handler-callback-functions">Handler Callback Functions</a></span> </h3> <div class="REFBODY rb-3"> <p>The following functions are to be exported from a handler callback module.</p> </div> <h3><span onMouseOver="document.getElementById('ghlink-exports-idm281473453415944').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-exports-idm281473453415944').style.visibility = 'hidden';"><span id="ghlink-exports-idm281473453415944"></span><a class="title_link" name="exports" href="#exports">Exports</a></span></h3> <div class="exports-body"> <p><div class="bold_code fun-type"><span onMouseOver="document.getElementById('ghlink-HModule:adding_handler-1-idm281473453415064').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-HModule:adding_handler-1-idm281473453415064').style.visibility = 'hidden';"><span id="ghlink-HModule:adding_handler-1-idm281473453415064" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L1064" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="HModule:adding_handler-1" href="#HModule:adding_handler-1">HModule:adding_handler(Config1) -> {ok, Config2} | {error, Reason}</a></span></div></p> <div class="REFBODY rb-5"> <h3 class="func-types-title">Types</h3> <div class="REFTYPES rt-4"> <span class="bold_code fun-param-type">Config1 = Config2 = <span class="bold_code bc-17"><a href="#type-handler_config">handler_config()</a></span></span><br> </div> <div class="REFTYPES rt-4"> <span class="bold_code fun-param-type">Reason = term()</span><br> </div> </div> <div class="REFBODY rb-7"><p> <p>This callback function is optional.</p> <p>The function is called on a temporary process when an new handler is about to be added. The purpose is to verify the configuration and initiate all resources needed by the handler.</p> <p>The handler identity is associated with the <span class="code">id</span> key in <span class="code">Config1</span>.</p> <p>If everything succeeds, the callback function can add possible default values or internal state values to the configuration, and return the adjusted map in <span class="code">{ok,Config2}</span>.</p> <p>If the configuration is faulty, or if the initiation fails, the callback function must return <span class="code">{error,Reason}</span>.</p> </p></div> <p><div class="bold_code fun-type"><span onMouseOver="document.getElementById('ghlink-HModule:changing_config-3-idm281473453406504').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-HModule:changing_config-3-idm281473453406504').style.visibility = 'hidden';"><span id="ghlink-HModule:changing_config-3-idm281473453406504" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L1090" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="HModule:changing_config-3" href="#HModule:changing_config-3">HModule:changing_config(SetOrUpdate, OldConfig, NewConfig) -> {ok, Config} | {error, Reason}</a></span></div></p> <div class="REFBODY rb-5"> <h3 class="func-types-title">Types</h3> <div class="REFTYPES rt-4"> <span class="bold_code fun-param-type">SetOrUpdate = set | update</span><br> </div> <div class="REFTYPES rt-4"> <span class="bold_code fun-param-type">OldConfig = NewConfig = Config = <span class="bold_code bc-17"><a href="#type-handler_config">handler_config()</a></span></span><br> </div> <div class="REFTYPES rt-4"> <span class="bold_code fun-param-type">Reason = term()</span><br> </div> </div> <div class="REFBODY rb-7"><p> <p>This callback function is optional.</p> <p>The function is called on a temporary process when the configuration for a handler is about to change. The purpose is to verify and act on the new configuration.</p> <p><span class="code">OldConfig</span> is the existing configuration and <span class="code">NewConfig</span> is the new configuration.</p> <p>The handler identity is associated with the <span class="code">id</span> key in <span class="code">OldConfig</span>.</p> <p><span class="code">SetOrUpdate</span> has the value <span class="code">set</span> if the configuration change originates from a call to <span class="bold_code bc-17"><a href="#set_handler_config-2"><span class="code">set_handler_config/2,3</span></a></span>, and <span class="code">update</span> if it originates from <span class="bold_code bc-17"><a href="#update_handler_config-2"><span class="code">update_handler_config/2,3</span></a></span>. The handler can use this parameteter to decide how to update the value of the <span class="code">config</span> field, that is, the handler specific configuration data. Typically, if <span class="code">SetOrUpdate</span> equals <span class="code">set</span>, values that are not specified must be given their default values. If <span class="code">SetOrUpdate</span> equals <span class="code">update</span>, the values found in <span class="code">OldConfig</span> must be used instead.</p> <p>If everything succeeds, the callback function must return a possibly adjusted configuration in <span class="code">{ok,Config}</span>.</p> <p>If the configuration is faulty, the callback function must return <span class="code">{error,Reason}</span>.</p> </p></div> <p><div class="bold_code fun-type"><span onMouseOver="document.getElementById('ghlink-HModule:filter_config-1-idm281473453389704').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-HModule:filter_config-1-idm281473453389704').style.visibility = 'hidden';"><span id="ghlink-HModule:filter_config-1-idm281473453389704" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L1128" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="HModule:filter_config-1" href="#HModule:filter_config-1">HModule:filter_config(Config) -> FilteredConfig</a></span></div></p> <div class="REFBODY rb-5"> <h3 class="func-types-title">Types</h3> <div class="REFTYPES rt-4"> <span class="bold_code fun-param-type">Config = FilteredConfig = <span class="bold_code bc-17"><a href="#type-handler_config">handler_config()</a></span></span><br> </div> </div> <div class="REFBODY rb-7"><p> <p>This callback function is optional.</p> <p>The function is called when one of the Logger API functions for fetching the handler configuration is called, for example <span class="bold_code bc-17"><a href="#get_handler_config-1"><span class="code">logger:get_handler_config/1</span></a></span>.</p> <p>It allows the handler to remove internal data fields from its configuration data before it is returned to the caller.</p> </p></div> <p><div class="bold_code fun-type"><span onMouseOver="document.getElementById('ghlink-HModule:log-2-idm281473453383464').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-HModule:log-2-idm281473453383464').style.visibility = 'hidden';"><span id="ghlink-HModule:log-2-idm281473453383464" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L1148" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="HModule:log-2" href="#HModule:log-2">HModule:log(LogEvent, Config) -> void()</a></span></div></p> <div class="REFBODY rb-5"> <h3 class="func-types-title">Types</h3> <div class="REFTYPES rt-4"> <span class="bold_code fun-param-type">LogEvent = <span class="bold_code bc-17"><a href="#type-log_event">log_event()</a></span></span><br> </div> <div class="REFTYPES rt-4"> <span class="bold_code fun-param-type">Config = <span class="bold_code bc-17"><a href="#type-handler_config">handler_config()</a></span></span><br> </div> </div> <div class="REFBODY rb-7"><p> <p>This callback function is mandatory.</p> <p>The function is called when all primary filters and all handler filters for the handler in question have passed for the given log event. It is called on the client process, that is, the process that issued the log event.</p> <p>The handler identity is associated with the <span class="code">id</span> key in <span class="code">Config</span>.</p> <p>The handler must log the event.</p> <p>The return value from this function is ignored by Logger.</p> </p></div> <p><div class="bold_code fun-type"><span onMouseOver="document.getElementById('ghlink-HModule:removing_handler-1-idm281473453375416').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-HModule:removing_handler-1-idm281473453375416').style.visibility = 'hidden';"><span id="ghlink-HModule:removing_handler-1-idm281473453375416" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L1171" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="HModule:removing_handler-1" href="#HModule:removing_handler-1">HModule:removing_handler(Config) -> ok</a></span></div></p> <div class="REFBODY rb-5"> <h3 class="func-types-title">Types</h3> <div class="REFTYPES rt-4"> <span class="bold_code fun-param-type">Config = <span class="bold_code bc-17"><a href="#type-handler_config">handler_config()</a></span></span><br> </div> </div> <div class="REFBODY rb-7"><p> <p>This callback function is optional.</p> <p>The function is called on a temporary process when a handler is about to be removed. The purpose is to release all resources used by the handler.</p> <p>The handler identity is associated with the <span class="code">id</span> key in <span class="code">Config</span>.</p> <p>The return value is ignored by Logger.</p> </p></div> </div> <h3> <a name="formatter_callback_functions"></a><span onMouseOver="document.getElementById('ghlink-formatter-callback-functions-idm281473453369368').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-formatter-callback-functions-idm281473453369368').style.visibility = 'hidden';"><span id="ghlink-formatter-callback-functions-idm281473453369368" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L1191" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="formatter-callback-functions" href="#formatter-callback-functions">Formatter Callback Functions</a></span> </h3> <div class="REFBODY rb-3"> <p>The following functions are to be exported from a formatter callback module.</p> </div> <h3><span onMouseOver="document.getElementById('ghlink-exports-idm281473453367064').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-exports-idm281473453367064').style.visibility = 'hidden';"><span id="ghlink-exports-idm281473453367064"></span><a class="title_link" name="exports" href="#exports">Exports</a></span></h3> <div class="exports-body"> <p><div class="bold_code fun-type"><span onMouseOver="document.getElementById('ghlink-FModule:check_config-1-idm281473453366184').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-FModule:check_config-1-idm281473453366184').style.visibility = 'hidden';"><span id="ghlink-FModule:check_config-1-idm281473453366184" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L1199" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="FModule:check_config-1" href="#FModule:check_config-1">FModule:check_config(FConfig) -> ok | {error, Reason}</a></span></div></p> <div class="REFBODY rb-5"> <h3 class="func-types-title">Types</h3> <div class="REFTYPES rt-4"> <span class="bold_code fun-param-type">FConfig = <span class="bold_code bc-17"><a href="#type-formatter_config">formatter_config()</a></span></span><br> </div> <div class="REFTYPES rt-4"> <span class="bold_code fun-param-type">Reason = term()</span><br> </div> </div> <div class="REFBODY rb-7"><p> <p>This callback function is optional.</p> <p>The function is called by a Logger when formatter configuration is set or modified. The formatter must validate the given configuration and return <span class="code">ok</span> if it is correct, and <span class="code">{error,Reason}</span> if it is faulty.</p> <p>The following Logger API functions can trigger this callback:</p> <ul> <li><span class="bold_code bc-15"><a href="logger.html#add_handler-3"><span class="code">logger:add_handler/3</span></a></span></li> <li><span class="bold_code bc-15"><a href="logger.html#set_handler_config-2"><span class="code">logger:set_handler_config/2,3</span></a></span></li> <li><span class="bold_code bc-15"><a href="logger.html#update_handler_config-2"><span class="code">logger:update_handler_config/2,3</span></a></span></li> <li><span class="bold_code bc-15"><a href="logger.html#update_formatter_config-2"><span class="code">logger:update_formatter_config/2</span></a></span></li> </ul> <p>See <span class="bold_code bc-19"><a href="logger_formatter.html"><span class="code">logger_formatter(3)</span></a></span> for an example implementation. <span class="code">logger_formatter</span> is the default formatter used by Logger.</p> </p></div> <p><div class="bold_code fun-type"><span onMouseOver="document.getElementById('ghlink-FModule:format-2-idm281473453352344').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-FModule:format-2-idm281473453352344').style.visibility = 'hidden';"><span id="ghlink-FModule:format-2-idm281473453352344" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L1230" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="FModule:format-2" href="#FModule:format-2">FModule:format(LogEvent, FConfig) -> FormattedLogEntry</a></span></div></p> <div class="REFBODY rb-5"> <h3 class="func-types-title">Types</h3> <div class="REFTYPES rt-4"> <span class="bold_code fun-param-type">LogEvent = <span class="bold_code bc-17"><a href="#type-log_event">log_event()</a></span></span><br> </div> <div class="REFTYPES rt-4"> <span class="bold_code fun-param-type">FConfig = <span class="bold_code bc-17"><a href="#type-formatter_config">formatter_config()</a></span></span><br> </div> <div class="REFTYPES rt-4"> <span class="bold_code fun-param-type">FormattedLogEntry = <span class="bold_code bc-14"><a href="javascript:erlhref('../../../../doc/../','stdlib','unicode.html#type-chardata');">unicode:chardata()</a></span></span><br> </div> </div> <div class="REFBODY rb-7"><p> <p>This callback function is mandatory.</p> <p>The function can be called by a log handler to convert a log event term to a printable string. The returned value can, for example, be printed as a log entry to the console or a file using <span class="bold_code bc-13"><a href="javascript:erlhref('../../../../doc/../','stdlib','io.html#put_chars-1');"><span class="code">io:put_chars/1,2</span></a></span>.</p> <p>See <span class="bold_code bc-19"><a href="logger_formatter.html"><span class="code">logger_formatter(3)</span></a></span> for an example implementation. <span class="code">logger_formatter</span> is the default formatter used by Logger.</p> </p></div> </div> <h3><span onMouseOver="document.getElementById('ghlink-see-also-idm281473453343112').style.visibility = 'visible';" onMouseOut="document.getElementById('ghlink-see-also-idm281473453343112').style.visibility = 'hidden';"><span id="ghlink-see-also-idm281473453343112" class="ghlink"><a href="https://github.com/erlang/otp/edit/maint/lib/kernel/doc/src/logger.xml#L1256" title="Found an issue with the documentation? Fix it by clicking here!"><span class="pencil"></span></a></span><a class="title_link" name="see-also" href="#see-also">See Also</a></span></h3> <div class="REFBODY rb-3"> <p> <span class="bold_code bc-19"><a href="config.html"><span class="code">config(4)</span></a></span>, <span class="bold_code bc-18"><a href="javascript:erlhref('../../../../doc/../','erts','erlang.html');"><span class="code">erlang(3)</span></a></span>, <span class="bold_code bc-18"><a href="javascript:erlhref('../../../../doc/../','stdlib','io.html');"><span class="code">io(3)</span></a></span>, <span class="bold_code bc-19"><a href="logger_disk_log_h.html"><span class="code">logger_disk_log_h(3)</span></a></span>, <span class="bold_code bc-19"><a href="logger_filters.html"><span class="code">logger_filters(3)</span></a></span>, <span class="bold_code bc-19"><a href="logger_formatter.html"><span class="code">logger_formatter(3)</span></a></span>, <span class="bold_code bc-19"><a href="logger_std_h.html"><span class="code">logger_std_h(3)</span></a></span>, <span class="bold_code bc-18"><a href="javascript:erlhref('../../../../doc/../','stdlib','unicode.html');"><span class="code">unicode(3)</span></a></span> </p> </div> </div> <div class="footer"> <hr> <p>Copyright © 1997-2019 Ericsson AB. All Rights Reserved.</p> </div> </div> </div> <script type="text/javascript">window.__otpTopDocDir = '../../../../doc/js/';</script><script type="text/javascript" src="../../../../doc/js/highlight.js"></script> </body> </html>