Skip to content

Commit 0425f68

Browse files
committed
prep for release
1 parent 5b175c4 commit 0425f68

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+317
-272
lines changed

DESCRIPTION

+11-7
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
Type: Package
22
Package: lgr
33
Title: A Fully Featured Logging Framework
4-
Version: 0.0.9.9001
4+
Version: 0.1.0
55
Authors@R:
66
person(given = "Stefan",
77
family = "Fleck",
88
role = c("aut", "cre"),
99
email = "[email protected]",
1010
comment = c(ORCID = "0000-0003-3344-9851"))
1111
Maintainer: Stefan Fleck <[email protected]>
12-
Description: A flexible, feature-rich yet light-weight
13-
logging framework based on 'R6' classes. It supports hierarchical
14-
loggers, custom log levels, arbitrary data fields in log events,
15-
logging to plaintext, 'JSON', memory buffers, and databases, as well
16-
as email and push notifications. For a full list of features with
17-
examples please refer to the package vignette.
12+
Description: A flexible, feature-rich yet light-weight logging
13+
framework based on 'R6' classes. It supports hierarchical loggers,
14+
custom log levels, arbitrary data fields in log events, logging to
15+
plaintext, 'JSON', memory buffers, and databases, as well as email and
16+
push notifications. For a full list of features with examples please
17+
refer to the package vignette.
1818
License: MIT + file LICENSE
1919
URL: https://github.com/s-fleck/lgr
2020
BugReports: https://github.com/s-fleck/lgr/issues
@@ -26,13 +26,17 @@ Suggests:
2626
data.table,
2727
DBI,
2828
desc,
29+
future,
30+
future.apply,
2931
glue,
3032
gmailr,
3133
jsonlite,
3234
knitr,
35+
RMariaDB,
3336
rmarkdown,
3437
RMySQL,
3538
RPostgres,
39+
RPostgreSQL,
3640
RPushbullet,
3741
RSQLite (>= 2.0),
3842
sendmailR,

README.Rmd

+25-17
Original file line numberDiff line numberDiff line change
@@ -124,38 +124,46 @@ on which lgr is built and the **only Package lgr will ever depend on**.
124124

125125
### Optional Dependencies
126126

127-
These optional dependencies that are not necessary to use lgr, but
128-
that are required for some extra appenders. To leverage the power of the most
129-
central features of **lgr** it is recommended (but not necessary) that you
130-
at least install the packages **data.table**, **jsonlite**,
131-
and possibly **crayon**. Care was taken to choose packages that are slim,
132-
stable, have minimal dependencies, and are well
133-
maintained :
134-
135-
* [crayon](https://github.com/r-lib/crayon) for colored console output.
136-
* [data.table](https://github.com/Rdatatable/) for fast in-memory logging
137-
with `AppenderDt`.
138-
* [jsonlite](https://github.com/jeroen/jsonlite) for JSON logging via
127+
lgr comes with a long list of optional dependencies. These are not necessary to
128+
use lgr, but that are required for some extra functions. Most of these
129+
dependencies are tied to specific Appenders, though **crayon** and
130+
**data.table** are also relevant to interactive use of lgr.
131+
132+
Care was taken to choose packages that are slim, stable, have minimal
133+
dependencies, and are well maintained :
134+
135+
- [crayon](https://github.com/r-lib/crayon) for colored console output.
136+
- [glue](https://glue.tidyverse.org/) for a more flexible formatting syntax
137+
via LoggerGlue and LayoutGlue.
138+
- [data.table](https://github.com/Rdatatable/) for fast in-memory
139+
logging with `AppenderDt`, and also by all database / DBI Appenders.
140+
- [jsonlite](https://github.com/jeroen/jsonlite) for JSON logging via
139141
`LayoutJson`. JSON is a popular plaintext based file format that is easy to
140142
read for humans and machines alike.
141-
* [DBI](https://github.com/r-dbi/DBI) for logging to databases. Logging with
143+
- [DBI](https://github.com/r-dbi/DBI) for logging to databases. Logging with
142144
lgr has been tested with the following backends:
143145
- [RSQLite](https://github.com/r-dbi/RSQLite),
144146
- [RMySQL](https://cran.r-project.org/package=RMySQL) for MariaDB and MySQL (RMariaDB is currently broken, see [this issue](https://github.com/r-dbi/RMariaDB/issues/119)),
145-
- [RPostgreSQL](https://cran.r-project.org/package=RPostgreSQL),
147+
- [RPostgres](https://cran.r-project.org/package=RPostgres),
146148
- [RJDBC](https://github.com/s-u/RJDBC) for DB2.
147149

148150
In theory all DBI compliant database packages should work. If you
149151
are using lgr with a database backend, please report your (positive and
150152
negative) experiences, as database support is still somewhat experimental.
151-
* [gmailr](https://cran.r-project.org/package=gmailr) or
153+
- [gmailr](https://cran.r-project.org/package=gmailr) or
152154
[sendmailR](https://cran.r-project.org/package=sendmailR) for email
153155
notifications.
154-
* [RPushbullet](https://github.com/eddelbuettel/rpushbullet) for push
156+
- [RPushbullet](https://github.com/eddelbuettel/rpushbullet) for push
155157
notifications.
156-
* [whoami](https://github.com/r-lib/whoami/blob/master/DESCRIPTION) for
158+
- [whoami](https://github.com/r-lib/whoami/blob/master/DESCRIPTION) for
157159
guessing the user name from various sources. You can also set the user name
158160
manually if you want to use it for logging.
161+
- [desc](https://CRAN.R-project.org/package=desc) for the package development
162+
convenince function `use_logger()`
163+
164+
Other optional dependencies (future, future.apply) do not provide any extra
165+
functionallity but had to be included for some of the automated unit tests
166+
run by lgr.
159167

160168

161169
## Installation

README.md

+18-12
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ To log an *event* with with lgr we call `lgr$<logging function>()`. Unnamed argu
3232

3333
``` r
3434
lgr$fatal("A critical error")
35-
#> FATAL [16:48:10.728] A critical error
35+
#> FATAL [10:20:50.871] A critical error
3636
lgr$error("A less severe error")
37-
#> ERROR [16:48:10.775] A less severe error
37+
#> ERROR [10:20:51.017] A less severe error
3838
lgr$warn("A potentially bad situation")
39-
#> WARN [16:48:10.818] A potentially bad situation
39+
#> WARN [10:20:51.095] A potentially bad situation
4040
lgr$info("iris has %s rows", nrow(iris))
41-
#> INFO [16:48:10.820] iris has 150 rows
41+
#> INFO [10:20:51.100] iris has 150 rows
4242

4343
# the following log levels are hidden by default
4444
lgr$debug("A debug message")
@@ -51,19 +51,19 @@ A Logger can have several Appenders. For example, we can add a JSON appender to
5151
tf <- tempfile()
5252
lgr$add_appender(AppenderJson$new(tf))
5353
lgr$info("cars has %s rows", nrow(cars))
54-
#> INFO [16:48:10.964] cars has 50 rows
54+
#> INFO [10:20:51.406] cars has 50 rows
5555
cat(readLines(tf))
56-
#> {"level":400,"timestamp":"2019-01-17 16:48:10","logger":"root","caller":"eval","msg":"cars has 50 rows"}
56+
#> {"level":400,"timestamp":"2019-01-20 10:20:51","logger":"","caller":"eval","msg":"cars has 50 rows"}
5757
```
5858

5959
JSON naturally supports custom fields. Named arguments passed to `info()`, `warn()`, etc... are interpreted as custom fields.
6060

6161
``` r
6262
lgr$info("loading cars", "cars", rows = nrow(cars), cols = ncol(cars))
63-
#> INFO [16:48:10.986] loading cars {rows: 50, cols: 2}
63+
#> INFO [10:20:51.447] loading cars {rows: 50, cols: 2}
6464
cat(readLines(tf), sep = "\n")
65-
#> {"level":400,"timestamp":"2019-01-17 16:48:10","logger":"root","caller":"eval","msg":"cars has 50 rows"}
66-
#> {"level":400,"timestamp":"2019-01-17 16:48:10","logger":"root","caller":"eval","msg":"loading cars","rows":50,"cols":2}
65+
#> {"level":400,"timestamp":"2019-01-20 10:20:51","logger":"","caller":"eval","msg":"cars has 50 rows"}
66+
#> {"level":400,"timestamp":"2019-01-20 10:20:51","logger":"","caller":"eval","msg":"loading cars","rows":50,"cols":2}
6767
```
6868

6969
For more examples please see the package [vignette](https://s-fleck.github.io/lgr/articles/lgr.html) and [documentation](https://s-fleck.github.io/lgr/)
@@ -80,21 +80,27 @@ Dependencies
8080

8181
### Optional Dependencies
8282

83-
These optional dependencies that are not necessary to use lgr, but that are required for some extra appenders. To leverage the power of the most central features of **lgr** it is recommended (but not necessary) that you at least install the packages **data.table**, **jsonlite**, and possibly **crayon**. Care was taken to choose packages that are slim, stable, have minimal dependencies, and are well maintained :
83+
lgr comes with a long list of optional dependencies. These are not necessary to use lgr, but that are required for some extra functions. Most of these dependencies are tied to specific Appenders, though **crayon** and **data.table** are also relevant to interactive use of lgr.
84+
85+
Care was taken to choose packages that are slim, stable, have minimal dependencies, and are well maintained :
8486

8587
- [crayon](https://github.com/r-lib/crayon) for colored console output.
86-
- [data.table](https://github.com/Rdatatable/) for fast in-memory logging with `AppenderDt`.
88+
- [glue](https://glue.tidyverse.org/) for a more flexible formatting syntax via LoggerGlue and LayoutGlue.
89+
- [data.table](https://github.com/Rdatatable/) for fast in-memory logging with `AppenderDt`, and also by all database / DBI Appenders.
8790
- [jsonlite](https://github.com/jeroen/jsonlite) for JSON logging via `LayoutJson`. JSON is a popular plaintext based file format that is easy to read for humans and machines alike.
8891
- [DBI](https://github.com/r-dbi/DBI) for logging to databases. Logging with lgr has been tested with the following backends:
8992
- [RSQLite](https://github.com/r-dbi/RSQLite),
9093
- [RMySQL](https://cran.r-project.org/package=RMySQL) for MariaDB and MySQL (RMariaDB is currently broken, see [this issue](https://github.com/r-dbi/RMariaDB/issues/119)),
91-
- [RPostgreSQL](https://cran.r-project.org/package=RPostgreSQL),
94+
- [RPostgres](https://cran.r-project.org/package=RPostgres),
9295
- [RJDBC](https://github.com/s-u/RJDBC) for DB2.
9396

9497
In theory all DBI compliant database packages should work. If you are using lgr with a database backend, please report your (positive and negative) experiences, as database support is still somewhat experimental.
9598
- [gmailr](https://cran.r-project.org/package=gmailr) or [sendmailR](https://cran.r-project.org/package=sendmailR) for email notifications.
9699
- [RPushbullet](https://github.com/eddelbuettel/rpushbullet) for push notifications.
97100
- [whoami](https://github.com/r-lib/whoami/blob/master/DESCRIPTION) for guessing the user name from various sources. You can also set the user name manually if you want to use it for logging.
101+
- [desc](https://CRAN.R-project.org/package=desc) for the package development convenince function `use_logger()`
102+
103+
Other optional dependencies (future, future.apply) do not provide any extra functionallity but had to be included for some of the automated unit tests run by lgr.
98104

99105
Installation
100106
------------

cran-comments.md

+7-9
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
## Test environments
2-
* local OS X install, R 3.5.2
2+
* ubuntu 18.04, R 3.5.2
33
* ubuntu 14.04 (on travis-ci), R 3.5.2
4+
* ubuntu 14.04 (remote RStudio server), R 3.4.3
45
* win-builder (devel and release)
5-
* rhub
6+
* rhub (rhub::check_for_cran())
67

78

89
## R CMD check results
910

10-
0 errors | 0 warnings | 2 note
11+
0 errors | 0 warnings | 0 notes
1112

1213
* This is a new release
13-
* I am getting NOTEs because I am locking/unlocking bindings. I am using this
14-
mechanism because I want objects of one of the R6 classes in my package
15-
to be modifiable by a special function but not by accident by the user. I
16-
could just leave the R6 class unlocked from the beginning, but I would
17-
prefer to keep the locking mechanism in place for additional safety if that
18-
is no issue for CRAN.
14+
* This is a resubmission that addresses the NOTEs of my previous submission.
15+
I found a way around the lock/unlockBinding mechanic I wanted to implemented
16+
originally so please disregard my earlier email. Thank you for your patience.

docs/LICENSE-text.html

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/LICENSE.html

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/articles/index.html

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/articles/lgr-simple.html

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)