Skip to content

Commit b3cbb8f

Browse files
committed
prep for release
1 parent c2c36b7 commit b3cbb8f

24 files changed

+106
-56
lines changed

.travis.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# R for travis: see documentation at https://docs.travis-ci.com/user/languages/r
22
# https://gist.github.com/gaborcsardi/68960fb01bec74d89611bb9c2b0b7e5a
33
language: R
4+
addons:
5+
apt:
6+
packages:
7+
- libharfbuzz-dev # for pkgdown
8+
- libfribidi-dev
49
matrix:
510
include:
611
- r: devel
@@ -11,15 +16,14 @@ matrix:
1116
- Rscript -e 'covr::codecov()'
1217
deploy:
1318
provider: script
14-
script: Rscript -e 'remotes::install_cran("pkgdown");pkgdown::deploy_site_github(ssh_id = Sys.getenv("TRAVIS_DEPLOY_KEY", ""))'
19+
script: Rscript -e 'pkgdown::deploy_site_github(ssh_id = Sys.getenv("TRAVIS_DEPLOY_KEY", ""))'
1520
skip_cleanup: true
1621
- r: 3.5
1722
- r: 3.4
1823
- r: 3.3
1924
- r: 3.2
2025
r_github_packages:
21-
- s-fleck/lgrExtra
22-
- s-fleck/rotor
26+
- s-fleck/lgrExtra # for building the documentation that has links to lgrExtra
2327
sudo: false
2428
after_success:
2529
- Rscript -e 'devtools::install();devtools::test()'

DESCRIPTION

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ Description: A flexible, feature-rich yet light-weight logging
1616
appenders that support logging to databases, email and push
1717
notifications see the the package lgr.app.
1818
License: MIT + file LICENSE
19-
URL: https://s-fleck.github.io/lgr
20-
BugReports: https://github.com/s-fleck/lgr/issues
19+
URL: https://s-fleck.github.io/lgr/
20+
BugReports: https://github.com/s-fleck/lgr/issues/
2121
Depends:
2222
R (>= 3.2.0)
2323
Imports:
@@ -34,7 +34,7 @@ Suggests:
3434
jsonlite,
3535
knitr,
3636
rmarkdown,
37-
rotor (>= 0.2.4.9002),
37+
rotor (>= 0.3.0),
3838
rprojroot,
3939
testthat,
4040
tibble,

NEWS.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# lgr (development version)
1+
# lgr 0.4.0
22

33
* Moved more complex Appenders to package
44
[lgrExtra](https://github.com/s-fleck/lgrExtra). This includes database
@@ -40,12 +40,15 @@
4040
`should_flush` function. `default_should_flush()` is no longer necessary
4141
and has been removed.
4242

43-
* Updated AppenderFileRotating to use new **rotor** 2.5.0
43+
* Updated AppenderFileRotating and co for compatibility with **rotor** 0.3.0
4444

4545
* Most errors now have appropriate subclasses
4646

47-
* Logger$log() dispatches to all appenders, even if some throw an error (instead
48-
of aborting after the first Appender that throws an error)
47+
* `Logger$log()` dispatches to all appenders - even if some throw an error -
48+
instead of aborting after the first Appender that throws an error
49+
50+
* complete rewrite of the documentation to use the new roxgen2 features for
51+
R6 classes.
4952

5053

5154
# lgr 0.3.4

R/Appender.R

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -399,8 +399,8 @@ AppenderJson <- R6::R6Class(
399399
#'
400400
#' @description AppenderTable is extended by Appenders that write to a data
401401
#' source that can be interpreted as tables, (usually a `data.frame`). Examples
402-
#' are [lgrExtra::AppenderDbi], [lgrExtra::AppenderRjdbc] and
403-
#' [lgrExtra::AppenderDt].
402+
#' are `AppenderDbi`, `AppenderRjdbc` and `AppenderDt` from the
403+
#' [lgrExtra](https://github.com/s-fleck/lgrExtra) package.
404404
#'
405405
#' @family Appenders
406406
#' @export
@@ -461,7 +461,8 @@ AppenderTable <- R6::R6Class(
461461
#'
462462
#' @description
463463
#' AppenderMemory is extended by Appenders that retain an in-memory event
464-
#' buffer, such as [AppenderBuffer] and [lgrExtra::AppenderPushbullet].
464+
#' buffer, such as [AppenderBuffer] and `AppenderPushbullet` from the
465+
#' [lgrExtra](https://github.com/s-fleck/lgrExtra) package.
465466
#'
466467
#' @export
467468
#' @seealso [LayoutFormat]
@@ -958,7 +959,7 @@ AppenderBuffer <- R6::R6Class(
958959
#'
959960
#' @export
960961
#' @seealso [AppenderFileRotatingDate], [AppenderFileRotatingTime], [rotor::rotate()]
961-
#' @family Appenders, Rotating Appenders
962+
#' @family Appenders
962963
#' @export
963964
AppenderFileRotating <- R6::R6Class(
964965
"AppenderFileRotating",
@@ -1140,7 +1141,7 @@ AppenderFileRotating <- R6::R6Class(
11401141
# AppenderFileRotatingTime ------------------------------------------------
11411142

11421143
#' Log to a time-stamped rotating file
1143-
#'
1144+
#' @family Appenders
11441145
#' @seealso [AppenderFileRotatingDate], [AppenderFileRotating], [rotor::rotate()]
11451146
#' @export
11461147
AppenderFileRotatingTime <- R6::R6Class(
@@ -1303,7 +1304,7 @@ AppenderFileRotatingTime <- R6::R6Class(
13031304
#'
13041305
#' This is a simpler version of AppenderFileRotatingTime when the timestamps
13051306
#' do not need to include sub-day accuracy.
1306-
#'
1307+
#' @family Appenders
13071308
#' @seealso [AppenderFileRotatingTime], [AppenderFileRotating], [rotor::rotate()]
13081309
#' @export
13091310
AppenderFileRotatingDate <- R6::R6Class(

R/Layout.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,11 +304,11 @@ LayoutGlue <- R6::R6Class(
304304
#'
305305
#' @description
306306
#' A format for formatting LogEvents as
307-
#' [jsonlines](http://jsonlines.org/) log files. This provides a
307+
#' [jsonlines](https://jsonlines.org/) log files. This provides a
308308
#' nice balance between human- an machine-readability.
309309
#'
310310
#' @family Layouts
311-
#' @seealso [read_json_lines()], [http://jsonlines.org/](http://jsonlines.org/)
311+
#' @seealso [read_json_lines()], [https://jsonlines.org/](https://jsonlines.org/)
312312
#' @export
313313
#' @examples
314314
#' # setup a dummy LogEvent

R/Logger.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,7 @@ is_Logger <- function(x){
10101010
#'
10111011
#'
10121012
#' @param x any \R Object
1013-
#' @param color `TRUE` or `FALSE`: Output with color? Requires the package
1013+
#' @param color `TRUE` or `FALSE`: Output with color? Requi<- the Package
10141014
#' **crayon**
10151015
#' @param ... ignored
10161016
#'

R/basic_config.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#'
77
#' @param file `character` scalar: If not `NULL` a [AppenderFile] will be
88
#' created that logs to this file. If the filename ends in `.jsonl`, the
9-
#' Appender will be set up to use the [JSON Lines](http://jsonlines.org/)
9+
#' Appender will be set up to use the [JSON Lines](https://jsonlines.org/)
1010
#' format instead of plain text (see [AppenderFile] and [AppenderJson]).
1111
#' @param fmt `character` scalar: Format to use if `file` is supplied and not a
1212
#' `.jsonl` file. If `NULL` it defaults to `"%L [%t] %m"` (see
@@ -100,7 +100,7 @@ basic_config <- function(
100100
"Please use `.jsonl` and not `.json` as file extension for JSON log",
101101
"files. The reason is that that JSON files created",
102102
"by lgr are not true JSON files but JSONlines files.",
103-
"See http://jsonlines.org/ for more infos."
103+
"See https://jsonlines.org/ for more infos."
104104
)
105105

106106
} else if (identical(tolower(ext), "jsonl")){

README.Rmd

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,9 @@ file.remove(logfile)
147147
## Development status
148148

149149
lgr in general is stable and safe for use, but some Appenders are still
150-
experimental. This especially concerns database appenders which are currently
151-
being moved into to their own package
150+
experimental. This especially concerns database appenders which are available
151+
from the sepparate package
152152
[lgrExtra](https://github.com/s-fleck/lgrExtra).
153-
**Please install the stable version from CRAN if you want to try out lgr**
154-
155-
The documentation needs a rewrite and will be ported to roxygen 7.x.x soon.
156-
If you have questions please file an issue.
157153

158154

159155

README.md

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@ vignette.
6565

6666
``` r
6767
lgr$fatal("A critical error")
68-
#> FATAL [09:29:16.642] A critical error
68+
#> FATAL [10:55:49.023] A critical error
6969
lgr$error("A less severe error")
70-
#> ERROR [09:29:16.732] A less severe error
70+
#> ERROR [10:55:49.145] A less severe error
7171
lgr$warn("A potentially bad situation")
72-
#> WARN [09:29:16.742] A potentially bad situation
72+
#> WARN [10:55:49.202] A potentially bad situation
7373
lgr$info("iris has %s rows", nrow(iris))
74-
#> INFO [09:29:16.745] iris has 150 rows
74+
#> INFO [10:55:49.217] iris has 150 rows
7575

7676
# the following log levels are hidden by default
7777
lgr$debug("A debug message")
@@ -85,9 +85,9 @@ appender to log to a file with little effort.
8585
tf <- tempfile()
8686
lgr$add_appender(AppenderFile$new(tf, layout = LayoutJson$new()))
8787
lgr$info("cars has %s rows", nrow(cars))
88-
#> INFO [09:29:16.803] cars has 50 rows
88+
#> INFO [10:55:49.270] cars has 50 rows
8989
cat(readLines(tf))
90-
#> {"level":400,"timestamp":"2020-07-30 09:29:16","logger":"root","caller":"eval","msg":"cars has 50 rows"}
90+
#> {"level":400,"timestamp":"2020-10-17 10:55:49","logger":"root","caller":"eval","msg":"cars has 50 rows"}
9191
```
9292

9393
By passing a named argument to `info()`, `warn()`, and co you can log
@@ -97,10 +97,10 @@ logfiles that are machine as well as (somewhat) human readable.
9797

9898
``` r
9999
lgr$info("loading cars", "cars", rows = nrow(cars), cols = ncol(cars))
100-
#> INFO [09:29:16.851] loading cars {rows: 50, cols: 2}
100+
#> INFO [10:55:49.322] loading cars {rows: 50, cols: 2}
101101
cat(readLines(tf), sep = "\n")
102-
#> {"level":400,"timestamp":"2020-07-30 09:29:16","logger":"root","caller":"eval","msg":"cars has 50 rows"}
103-
#> {"level":400,"timestamp":"2020-07-30 09:29:16","logger":"root","caller":"eval","msg":"loading cars","rows":50,"cols":2}
102+
#> {"level":400,"timestamp":"2020-10-17 10:55:49","logger":"root","caller":"eval","msg":"cars has 50 rows"}
103+
#> {"level":400,"timestamp":"2020-10-17 10:55:49","logger":"root","caller":"eval","msg":"loading cars","rows":50,"cols":2}
104104
```
105105

106106
For more examples please see the package
@@ -137,12 +137,8 @@ file.remove(logfile)
137137

138138
lgr in general is stable and safe for use, but some Appenders are still
139139
experimental. This especially concerns database appenders which are
140-
currently being moved into to their own package
141-
[lgrExtra](https://github.com/s-fleck/lgrExtra). **Please install the
142-
stable version from CRAN if you want to try out lgr**
143-
144-
The documentation needs a rewrite and will be ported to roxygen 7.x.x
145-
soon. If you have questions please file an issue.
140+
available from the sepparate package
141+
[lgrExtra](https://github.com/s-fleck/lgrExtra).
146142

147143
## Dependencies
148144

man/Appender.Rd

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

0 commit comments

Comments
 (0)