Skip to content

Logger safe async io #245

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Nov 26, 2020
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/specs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ This is and index/directory of the specifications (specs) for each new module/fe
- [error](./stdlib_error.html) - Catching and handling errors
- [IO](./stdlib_io.html) - Input/output helper & convenience
- [linalg](./stdlib_linalg.html) - Linear Algebra
- [logger](./stdlib_logger.html) - Runtime logging system
- [optval](./stdlib_optval.html) - Fallback value for optional arguments
- [quadrature](./stdlib_quadrature.html) - Numerical integration
- [stats](./stdlib_stats.html) - Descriptive Statistics
Expand Down
58 changes: 35 additions & 23 deletions doc/specs/stdlib_logger.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,16 @@ significant events encountered during the execution of a program.

### Private attributes

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

## The `stdlib_logger` variable

Expand Down Expand Up @@ -285,7 +287,7 @@ Pure subroutine

#### Arguments

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

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

#### Arguments

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

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

* Note `message` may have embedded new_line calls.

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

#### Arguments

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

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

* Note `message` may have embedded new_line calls.

`module` (optional): shall be a scalar default character
expression. It is an `intent(in)` argument. It should be the name of
the module containing the `log_information` call.
Expand Down Expand Up @@ -565,12 +571,14 @@ written.
Subroutine

#### Arguments
`self`: shall be a scalar expression of type `logger_type`. It is an
`intent(in)` argument. It is the logger used to send the message.
`self`: shall be a scalar variable of type `logger_type`. It is an
`intent(inout)` argument. It is the logger used to send the message.

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

* Note `message` may have embedded new_line calls.

`module` (optional): shall be a scalar default character
expression. It is an `intent(in)` argument. It should be the name of
the module containing the `log_io_error` call.
Expand Down Expand Up @@ -641,12 +649,14 @@ Subroutine

#### Arguments

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

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

* Note `message` may have embedded new_line calls.

`module` (optional): shall be a scalar default character
expression. It is an `intent(in)` argument. It should be the name of
the module containing the `log_message` call.
Expand Down Expand Up @@ -715,8 +725,8 @@ Subroutine

#### Arguments

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

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

#### Arguments

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

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

* Note `message` may have embedded new_line calls.

`module`: (optional) shall be a scalar default character
expression. It is an `intent(in)` argument. It should be the name of
the module containing the `log_warning` call.
Expand Down Expand Up @@ -924,7 +936,7 @@ Subroutine

#### Arguments

`self`: shall be a scalar expression of type `logger_type`. It is an
`self`: shall be a scalar variable of type `logger_type`. It is an
`intent(inout)` argument. It is the logger whose `log_units` is to be
modified.

Expand Down
Loading