Skip to content

[Feedback] The inconsistency of stdlib internal modules about access keyword of opening files: stdlib_io/open, stdlib_logger #465

Open
@zoziha

Description

@zoziha

Describe the issue

I tried to use the stdlib_logger module, and used the open function in stdlib_io, and found that there was an adaptability problem. The root cause was that stdlib_logger required to open the log file as access=sequential, while the stdlib_io:open function defaulted to open the file as access=stream , I was wondering if this is a problem and how to solve this problem?

program test_io_logger

    use stdlib_logger, only: global_logger
    use stdlib_io, only: open
    implicit none
    integer :: log_unit

    log_unit = open("log.txt","w+")
    call global_logger%add_log_unit(log_unit)
        !! ERROR STOP unit in stdlib_logger % set_log_unit is not "sequential".

end program test_io_logger

Links

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingspecificationDiscussion and iteration over the APItopic: IOCommon input/output related features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions