(git:374b731)
Loading...
Searching...
No Matches
cp_log_handling.F File Reference

Go to the source code of this file.

Data Types

interface  cp_log_handling::cp_to_string
 
type  cp_log_handling::cp_logger_type
 type of a logger, at the moment it contains just a print level starting at which level it should be logged (0 note, 1 warning, 2 failure, 3 fatal) it could be expanded with the ability to focus on one or more module/object/thread/processor More...
 
type  cp_log_handling::cp_logger_p_type
 

Modules

module  cp_log_handling
 various routines to log and control the output. The idea is that decisions about where to log should not be done in the code that generates the log, but should be globally changeable a central place. So some care has been taken to have enough information about the place from where the log comes so that in the future intelligent and flexible decisions can be taken by the logger, without having to change other code.
 

Functions/Subroutines

integer function, public cp_log_handling::cp_default_logger_stack_size ()
 ...
 
subroutine, public cp_log_handling::cp_add_default_logger (logger)
 adds a default logger. MUST be called before logging occours
 
subroutine, public cp_log_handling::cp_rm_default_logger ()
 the cousin of cp_add_default_logger, decrements the stack, so that the default logger is what it has been
 
type(cp_logger_type) function, pointer, public cp_log_handling::cp_get_default_logger ()
 returns the default logger
 
subroutine, public cp_log_handling::cp_logger_create (logger, para_env, print_level, default_global_unit_nr, default_local_unit_nr, global_filename, local_filename, close_global_unit_on_dealloc, iter_info, close_local_unit_on_dealloc, suffix, template_logger)
 initializes a logger
 
subroutine, public cp_log_handling::cp_logger_retain (logger)
 retains the given logger (to be called to keep a shared copy of the logger)
 
subroutine, public cp_log_handling::cp_logger_release (logger)
 releases this logger
 
logical function, public cp_log_handling::cp_logger_would_log (logger, level)
 this function can be called to check if the logger would log a message with the given level from the given source you should use this function if you do direct logging (without using cp_logger_log), or if you want to know if the generation of some costly log info is necessary
 
integer function, public cp_log_handling::cp_logger_get_unit_nr (logger, local)
 returns the unit nr for the requested kind of log.
 
integer function, public cp_log_handling::cp_logger_get_default_io_unit (logger)
 returns the unit nr for the ionode (-1 on all other processors) skips as well checks if the procs calling this function is not the ionode
 
subroutine, public cp_log_handling::cp_logger_set_log_level (logger, level)
 changes the logging level. Log messages with a level less than the one given wo not be printed.
 
recursive integer function, public cp_log_handling::cp_logger_get_default_unit_nr (logger, local, skip_not_ionode)
 asks the default unit number of the given logger. try to use cp_logger_get_unit_nr
 
subroutine, public cp_log_handling::cp_logger_generate_filename (logger, res, root, postfix, local)
 generates a unique filename (ie adding eventual suffixes and process ids)
 
subroutine, public cp_log_handling::cp_logger_set (logger, local_filename, global_filename)
 sets various attributes of the given logger
 

Variables

integer, parameter, public cp_log_handling::cp_fatal_level = 3
 
integer, parameter, public cp_log_handling::cp_failure_level = 2
 
integer, parameter, public cp_log_handling::cp_warning_level = 1
 
integer, parameter, public cp_log_handling::cp_note_level = 0