Skip to content

Commit 4d6ddb4

Browse files
authored
Merge pull request #218 from m-muecke/links
docs: add more links
2 parents 434bfa0 + 45f5b1f commit 4d6ddb4

17 files changed

+51
-51
lines changed

R/appenders.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,8 @@ appender_slack <- function(channel = Sys.getenv("SLACK_CHANNEL"),
212212

213213

214214
#' Send log messages to Pushbullet
215-
#' @param ... parameters passed to `pbPost`, such as `recipients` or
216-
#' `apikey`, although it's probably much better to set all these
215+
#' @param ... parameters passed to [RPushbullet::pbPost], such as `recipients`
216+
#' or `apikey`, although it's probably much better to set all these
217217
#' in the `~/.rpushbullet.json` as per package docs at
218218
#' <http://dirk.eddelbuettel.com/code/rpushbullet.html>
219219
#' @export

R/formatters.R

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ formatter_paste <- function(...,
1212
}
1313
attr(formatter_paste, "generator") <- quote(formatter_paste())
1414

15-
#' Apply `sprintf` to convert R objects into a character vector
16-
#' @param fmt passed to `sprintf`
17-
#' @param ... passed to `sprintf`
15+
#' Apply [sprintf()] to convert R objects into a character vector
16+
#' @param fmt passed to [sprintf()]
17+
#' @param ... passed to [sprintf()]
1818
#' @inheritParams log_level
1919
#' @return character vector
2020
#' @export
@@ -28,8 +28,8 @@ formatter_sprintf <- function(fmt,
2828
}
2929
attr(formatter_sprintf, "generator") <- quote(formatter_sprintf())
3030

31-
#' Apply `glue` to convert R objects into a character vector
32-
#' @param ... passed to `glue` for the text interpolation
31+
#' Apply [glue::glue()] to convert R objects into a character vector
32+
#' @param ... passed to [glue::glue()] for the text interpolation
3333
#' @inheritParams log_level
3434
#' @return character vector
3535
#' @export
@@ -63,8 +63,8 @@ formatter_glue <- function(...,
6363
attr(formatter_glue, "generator") <- quote(formatter_glue())
6464

6565

66-
#' Apply `glue_safe` to convert R objects into a character vector
67-
#' @param ... passed to `glue_safe` for the text interpolation
66+
#' Apply [glue::glue_safe()] to convert R objects into a character vector
67+
#' @param ... passed to [glue::glue_safe()] for the text interpolation
6868
#' @inheritParams log_level
6969
#' @return character vector
7070
#' @export
@@ -94,18 +94,18 @@ formatter_glue_safe <- function(...,
9494
attr(formatter_glue_safe, "generator") <- quote(formatter_glue_safe())
9595

9696

97-
#' Apply `glue` and `sprintf`
97+
#' Apply [glue::glue()] and [sprintf()]
9898
#'
9999
#' The best of both words: using both formatter functions in your log
100100
#' messages, which can be useful eg if you are migrating from
101-
#' `sprintf` formatted log messages to `glue` or similar.
101+
#' [sprintf()] formatted log messages to [glue::glue()] or similar.
102102
#'
103103
#' Note that this function tries to be smart when passing arguments to
104-
#' `glue` and `sprintf`, but might fail with some edge cases, and
104+
#' [glue::glue()] and [sprintf()], but might fail with some edge cases, and
105105
#' returns an unformatted string.
106-
#' @param msg passed to `sprintf` as `fmt` or handled as part of `...`
107-
#' in `glue`
108-
#' @param ... passed to `glue` for the text interpolation
106+
#' @param msg passed to [sprintf()] as `fmt` or handled as part of `...`
107+
#' in [glue::glue()]
108+
#' @param ... passed to [glue::glue()] for the text interpolation
109109
#' @inheritParams log_level
110110
#' @return character vector
111111
#' @family log_formatters
@@ -229,7 +229,7 @@ skip_formatter <- function(message, ...) {
229229
#' is a string, then [sprintf()] is being called -- otherwise it does
230230
#' something like [log_eval()] and logs the R expression(s) and the
231231
#' result(s) as well.
232-
#' @param ... string and further params passed to `sprintf` or R
232+
#' @param ... string and further params passed to [sprintf()] or R
233233
#' expressions to be evaluated
234234
#' @inheritParams log_level
235235
#' @return character vector

R/helpers.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ log_with_separator <- function(...,
188188

189189

190190
#' Tic-toc logging
191-
#' @param ... passed to `log_level`
191+
#' @param ... passed to [log_level()]
192192
#' @param level see [log_levels()]
193193
#' @param namespace x
194194
#' @export

R/hooks.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#' Injects a logger call to standard messages
22
#'
3-
#' This function uses `trace` to add a `log_info` function call when
3+
#' This function uses [trace()] to add a [log_info()] function call when
44
#' `message` is called to log the informative messages with the
55
#' `logger` layout and appender.
66
#' @export
@@ -61,8 +61,8 @@ log_warnings <- function(muffle = getOption("logger_muffle_warnings", FALSE)) {
6161

6262
#' Injects a logger call to standard errors
6363
#'
64-
#' This function uses `trace` to add a `log_error` function call when
65-
#' `stop` is called to log the error messages with the `logger` layout
64+
#' This function uses [trace()] to add a [log_error()] function call when
65+
#' [stop()] is called to log the error messages with the `logger` layout
6666
#' and appender.
6767
#' @param muffle if TRUE, the error is not thrown after being logged
6868
#' @export

R/layouts.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ get_logger_meta_variables <- function(log_level = NULL,
7171

7272
#' Generate log layout function using common variables available via glue syntax
7373
#'
74-
#' `format` is passed to `glue` with access to the below variables:
74+
#' `format` is passed to [glue::glue()] with access to the below variables:
7575
#' \itemize{ \item msg: the actual log message \item further variables
7676
#' set by [get_logger_meta_variables()] }
77-
#' @param format `glue`-flavored layout of the message using the above
77+
#' @param format [glue::glue()]-flavored layout of the message using the above
7878
#' variables
7979
#' @return function taking `level` and `msg` arguments - keeping the
8080
#' original call creating the generator in the `generator` attribute
@@ -193,7 +193,7 @@ layout_logging <- function(level,
193193
}
194194
attr(layout_logging, "generator") <- quote(layout_logging())
195195

196-
#' Format a log message with `glue`
196+
#' Format a log message with [glue::glue()]
197197
#'
198198
#' By default, this layout includes the log level of the log record as
199199
#' per [log_levels()], the current timestamp and the actual log
@@ -207,7 +207,7 @@ attr(layout_logging, "generator") <- quote(layout_logging())
207207
layout_glue <- layout_glue_generator()
208208
attr(layout_glue, "generator") <- quote(layout_glue())
209209

210-
#' Format a log message with `glue` and ANSI escape codes to add colors
210+
#' Format a log message with [glue::glue()] and ANSI escape codes to add colors
211211
#'
212212
#' Colour log levels based on their severity. Log levels are coloured
213213
#' with [colorize_by_log_level()] and the messages are coloured with

man/appender_pushbullet.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/formatter_glue.Rd

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/formatter_glue_or_sprintf.Rd

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/formatter_glue_safe.Rd

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/formatter_logging.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)