daroczig / daroczig/logger

Feature Request: Capture output from other function as log messages

Open
#129 4 comments 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
HTML
Stars
323
Forks
46
Avg merge
1d 21h
Merged PRs (30d)
1

Description

```R

func <- function() {
print("stdout")
}

log_capture(INFO, { func() })

# INFO [2023-11-17 23:34:41] stdout
```

```R

func <- function() {
write("stdout", stdout())
write("stderr", stderr())
}

log_capture(INFO, ERROR, { func() })

# INFO [2023-11-17 23:34:41] stdout
# ERROR [2023-11-17 23:34:41] stderr
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.