Neko 1.99.9
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
logger Module Reference

Logging routines.

Data Types

type  log_t
 

Functions/Subroutines

subroutine log_init (this, env_prefix)
 Initialize a log.
 
subroutine log_free (this)
 Free a log.
 
subroutine log_flush (this)
 Flush the log stream, ensuring buffered output leaves the process.
 
subroutine log_begin (this)
 Increase indention level.
 
subroutine log_end (this)
 Decrease indention level.
 
subroutine log_indent (this)
 Indent a log.
 
subroutine log_newline (this, lvl)
 Write a new line to a log.
 
subroutine log_message (this, msg, lvl)
 Write a message to a log.
 
subroutine log_header (this, version, build_info)
 Write the Neko header to a log.
 
subroutine log_error (this, msg)
 Write an error message to a log.
 
subroutine log_warning (this, msg)
 Write a warning message to a log.
 
subroutine log_deprecated (this, feature, removal_version, extra_info)
 Write a deprecation warning to a log.
 
subroutine log_section (this, msg, lvl)
 Begin a new log section.
 
subroutine log_print_section_header (this, lvl)
 Print a section header.
 
subroutine log_end_section (this, msg, lvl)
 End a log section.
 
subroutine log_message_c (c_msg)
 Write a message to a log (from C)
 
subroutine log_error_c (c_msg)
 Write an error message to a log (from C)
 
subroutine log_warning_c (c_msg)
 Write a warning message to a log (from C)
 
subroutine log_section_c (c_msg)
 Begin a new log section (from C)
 
subroutine log_end_section_c ()
 End a log section (from C)
 
logical function is_deprecated (version_removal)
 Compare version strings.
 

Variables

integer, parameter, public log_size = 79
 
integer, parameter, public sec_head_size = 30
 Length of the section header.
 
integer, parameter, public neko_log_quiet = 0
 Always.
 
integer, parameter, public neko_log_info = 1
 Default.
 
integer, parameter, public neko_log_verbose = 2
 Verbose.
 
integer, parameter, public neko_log_deprecation = 5
 Deprecation.
 
integer, parameter, public neko_log_debug = 10
 Debug.
 
type(log_t), public neko_log
 Global log stream.
 

Function/Subroutine Documentation

◆ is_deprecated()

logical function logger::is_deprecated ( character(len=*), intent(in)  version_removal)
private
Parameters
version_removalVersion string when the feature will be removed
Returns
.true. if the current version is newer than or equal to the removal version, .false. otherwise

Definition at line 579 of file log.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ log_begin()

subroutine logger::log_begin ( class(log_t), intent(inout)  this)
private

Definition at line 198 of file log.f90.

◆ log_deprecated()

subroutine logger::log_deprecated ( class(log_t), intent(inout)  this,
character(len=*), intent(in)  feature,
character(len=*), intent(in)  removal_version,
character(len=*), intent(in), optional  extra_info 
)
private
Parameters
featureName of the deprecated feature
removal_versionOptional version when the feature will be removed
extra_infoOptional additional message to print

Definition at line 336 of file log.f90.

Here is the call graph for this function:

◆ log_end()

subroutine logger::log_end ( class(log_t), intent(inout)  this)
private

Definition at line 209 of file log.f90.

◆ log_end_section()

subroutine logger::log_end_section ( class(log_t), intent(inout)  this,
character(len=*), intent(in), optional  msg,
integer, optional  lvl 
)
private

Definition at line 460 of file log.f90.

◆ log_end_section_c()

subroutine logger::log_end_section_c
private
Note
This assumes the global log stream neko_log

Definition at line 569 of file log.f90.

◆ log_error()

subroutine logger::log_error ( class(log_t), intent(in)  this,
character(len=*), intent(in)  msg 
)
private

Definition at line 307 of file log.f90.

◆ log_error_c()

subroutine logger::log_error_c ( character(kind=c_char), dimension(*), intent(in)  c_msg)
private
Note
This assumes the global log stream neko_log

Definition at line 500 of file log.f90.

◆ log_flush()

subroutine logger::log_flush ( class(log_t), intent(in)  this)
private
Note
Flushing is local to rank 0 (the only writer) and never collective, so it is safe to call from any rank.

Definition at line 185 of file log.f90.

◆ log_free()

subroutine logger::log_free ( class(log_t), intent(inout)  this)
private

Definition at line 146 of file log.f90.

◆ log_header()

subroutine logger::log_header ( class(log_t), intent(in)  this,
character(len=*), intent(in)  version,
character(len=*), intent(in)  build_info 
)
private

Definition at line 286 of file log.f90.

◆ log_indent()

subroutine logger::log_indent ( class(log_t), intent(in)  this)
private

Definition at line 225 of file log.f90.

◆ log_init()

subroutine logger::log_init ( class(log_t), intent(inout)  this,
character(len=*), intent(in), optional  env_prefix 
)
private
Parameters
env_prefixPrefix of the environment variables to read the configuration from, defaulting to "NEKO", i.e. NEKO_LOG_TAB_SIZE, NEKO_LOG_LEVEL and NEKO_LOG_FILE. Passing a different prefix points this log_t instance at an independent set of environment variables.

Definition at line 100 of file log.f90.

◆ log_message()

subroutine logger::log_message ( class(log_t), intent(inout)  this,
character(len=*), intent(in)  msg,
integer, optional  lvl 
)
private

Definition at line 258 of file log.f90.

◆ log_message_c()

subroutine logger::log_message_c ( character(kind=c_char), dimension(*), intent(in)  c_msg)
private
Note
This assumes the global log stream neko_log

Definition at line 479 of file log.f90.

◆ log_newline()

subroutine logger::log_newline ( class(log_t), intent(in)  this,
integer, optional  lvl 
)
private

Definition at line 235 of file log.f90.

◆ log_print_section_header()

subroutine logger::log_print_section_header ( class(log_t), intent(inout)  this,
integer, optional  lvl 
)
private

Definition at line 435 of file log.f90.

◆ log_section()

subroutine logger::log_section ( class(log_t), intent(inout)  this,
character(len=*), intent(in)  msg,
integer, optional  lvl 
)
private

Definition at line 403 of file log.f90.

◆ log_section_c()

subroutine logger::log_section_c ( character(kind=c_char), dimension(*), intent(in)  c_msg)
private
Note
This assumes the global log stream neko_log

Definition at line 548 of file log.f90.

◆ log_warning()

subroutine logger::log_warning ( class(log_t), intent(in)  this,
character(len=*), intent(in)  msg 
)
private

Definition at line 320 of file log.f90.

◆ log_warning_c()

subroutine logger::log_warning_c ( character(kind=c_char), dimension(*), intent(in)  c_msg)
private
Note
This assumes the global log stream neko_log

Definition at line 524 of file log.f90.

Variable Documentation

◆ log_size

integer, parameter, public logger::log_size = 79

Definition at line 46 of file log.f90.

◆ neko_log

type(log_t), public logger::neko_log

Definition at line 91 of file log.f90.

◆ neko_log_debug

integer, parameter, public logger::neko_log_debug = 10

Definition at line 56 of file log.f90.

◆ neko_log_deprecation

integer, parameter, public logger::neko_log_deprecation = 5

Definition at line 55 of file log.f90.

◆ neko_log_info

integer, parameter, public logger::neko_log_info = 1

Definition at line 53 of file log.f90.

◆ neko_log_quiet

integer, parameter, public logger::neko_log_quiet = 0

Definition at line 52 of file log.f90.

◆ neko_log_verbose

integer, parameter, public logger::neko_log_verbose = 2

Definition at line 54 of file log.f90.

◆ sec_head_size

integer, parameter, public logger::sec_head_size = 30

Definition at line 49 of file log.f90.