Skip to content

Commit d1f143e

Browse files
committed
Documented changes in the stdlib_logger.f90 API
Documented changes in stdlib_logger.f90. Among them: 1. Additions of buffer and len_buffer to the logger type 2. Changes of self from intent(in) to intent(inout) in several procedures 3. Allowing new_line call in messsage string [ticket: X]
1 parent 1fa3a3e commit d1f143e

File tree

1 file changed

+35
-23
lines changed

1 file changed

+35
-23
lines changed

doc/specs/stdlib_logger.md

Lines changed: 35 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,16 @@ significant events encountered during the execution of a program.
7575

7676
### Private attributes
7777

78-
| Attribute | Type | Description | Initial value
79-
|------------------|---------------|-------------------------------------------------|--------------
80-
| `add_blank_line` | Logical | Flag to precede output with a blank line | `.false.`
81-
| `indent_lines` | Logical | Flag to indent subsequent lines by four columns | `.true.`
82-
| `log_units` | Integer array | List of I/O units used for output | empty
83-
| `max_width` | Integer | Maximum column width of output | 0
84-
| `time_stamp` | Logical | Flag to precede output by a time stamp | `.true.`
85-
| `units` | Integer | Count of the number of active output units | 0
78+
| Attribute | Type | Description | Initial value |
79+
|------------------|---------------|-------------------------------------------------|--------------|
80+
| `add_blank_line` | Logical | Flag to precede output with a blank line | `.false.` |
81+
|`buffer` | Character(:) | Buffer to build output string | Unallocated |
82+
| `indent_lines` | Logical | Flag to indent subsequent lines by four columns | `.true.` |
83+
| `len_buffer` | Integer | Number of valid characters in buffer | 0 |
84+
| `log_units` | Integer array | List of I/O units used for output | Unallocated |
85+
| `max_width` | Integer | Maximum column width of output | 0 |
86+
| `time_stamp` | Logical | Flag to precede output by a time stamp | `.true.` |
87+
| `units` | Integer | Count of the number of active output units | 0 |
8688

8789
## The `stdlib_logger` variable
8890

@@ -285,7 +287,7 @@ Pure subroutine
285287

286288
#### Arguments
287289

288-
`self`: shall be a scalar variable of type `logger_type`. It is an
290+
`self`: shall be a scalar expression of type `logger_type`. It is an
289291
`intent(in)` argument. It shall be the logger whose configuration is reported.
290292

291293
`add_blank_line` (optional): shall be a scalar default logical
@@ -415,11 +417,13 @@ Subroutine
415417

416418
#### Arguments
417419

418-
`self`: shall be a scalar expression of type `logger_type`. It is an
419-
`intent(in)` argument. It is the logger used to send the message.
420+
`self`: shall be a scalar variable of type `logger_type`. It is an
421+
`intent(inout)` argument. It is the logger used to send the message.
420422

421423
`message`: shall be a scalar default character expression. It is an
422-
`intent(in)` argument.
424+
`intent(in)` argument.
425+
426+
* Note `message` may have embedded new_line calls.
423427

424428
`module` (optional): shall be a scalar default character
425429
expression. It is an `intent(in)` argument. It should be the name of
@@ -496,12 +500,14 @@ Subroutine
496500

497501
#### Arguments
498502

499-
`self`: shall be a scalar expression of type `logger_type`. It is an
500-
`intent(in)` argument. It is the logger used to send the message.
503+
`self`: shall be a scalar variable of type `logger_type`. It is an
504+
`intent(inout)` argument. It is the logger used to send the message.
501505

502506
`message`: shall be a scalar default character expression. It is an
503507
`intent(in)` argument.
504508

509+
* Note `message` may have embedded new_line calls.
510+
505511
`module` (optional): shall be a scalar default character
506512
expression. It is an `intent(in)` argument. It should be the name of
507513
the module containing the `log_information` call.
@@ -565,12 +571,14 @@ written.
565571
Subroutine
566572

567573
#### Arguments
568-
`self`: shall be a scalar expression of type `logger_type`. It is an
569-
`intent(in)` argument. It is the logger used to send the message.
574+
`self`: shall be a scalar variable of type `logger_type`. It is an
575+
`intent(inout)` argument. It is the logger used to send the message.
570576

571577
`message`: shall be a scalar default character expression. It is an
572578
`intent(in)` argument.
573579

580+
* Note `message` may have embedded new_line calls.
581+
574582
`module` (optional): shall be a scalar default character
575583
expression. It is an `intent(in)` argument. It should be the name of
576584
the module containing the `log_io_error` call.
@@ -641,12 +649,14 @@ Subroutine
641649

642650
#### Arguments
643651

644-
`self`: shall be a scalar expression of type `logger_type`. It is an
645-
`intent(in)` argument. It is the logger used to send the message.
652+
`self`: shall be a scalar variable of type `logger_type`. It is an
653+
`intent(inout)` argument. It is the logger used to send the message.
646654

647655
`message`: shall be a scalar default character expression. It is an
648656
`intent(in)` argument.
649657

658+
* Note `message` may have embedded new_line calls.
659+
650660
`module` (optional): shall be a scalar default character
651661
expression. It is an `intent(in)` argument. It should be the name of
652662
the module containing the `log_message` call.
@@ -715,8 +725,8 @@ Subroutine
715725

716726
#### Arguments
717727

718-
`self`: shall be a scalar expression of type `logger_type`. It is an
719-
`intent(in)` argument. It is the logger used to send the message.
728+
`self`: shall be a scalar variable of type `logger_type`. It is an
729+
`intent(inout)` argument. It is the logger used to send the message.
720730

721731
`line`: shall be a scalar default character expression. It is an
722732
`intent(in)` argument. It should be the line of text in which the
@@ -861,12 +871,14 @@ Subroutine
861871

862872
#### Arguments
863873

864-
`self`: shall be a scalar expression of type `logger_type`. It is an
865-
`intent(in)` argument. It is the logger used to send the message.
874+
`self`: shall be a scalar variable of type `logger_type`. It is an
875+
`intent(inout)` argument. It is the logger used to send the message.
866876

867877
`message`: shall be a scalar default character expression. It is an
868878
`intent(in)` argument.
869879

880+
* Note `message` may have embedded new_line calls.
881+
870882
`module`: (optional) shall be a scalar default character
871883
expression. It is an `intent(in)` argument. It should be the name of
872884
the module containing the `log_warning` call.
@@ -924,7 +936,7 @@ Subroutine
924936

925937
#### Arguments
926938

927-
`self`: shall be a scalar expression of type `logger_type`. It is an
939+
`self`: shall be a scalar variable of type `logger_type`. It is an
928940
`intent(inout)` argument. It is the logger whose `log_units` is to be
929941
modified.
930942

0 commit comments

Comments
 (0)