@@ -65,13 +65,13 @@ vignette.
6565
6666``` r
6767lgr $ fatal(" A critical error" )
68- # > FATAL [09:29:16.642 ] A critical error
68+ # > FATAL [10:55:49.023 ] A critical error
6969lgr $ 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
7171lgr $ 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
7373lgr $ 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
7777lgr $ debug(" A debug message" )
@@ -85,9 +85,9 @@ appender to log to a file with little effort.
8585tf <- tempfile()
8686lgr $ add_appender(AppenderFile $ new(tf , layout = LayoutJson $ new()))
8787lgr $ 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
8989cat(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
9393By 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
9999lgr $ 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}
101101cat(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
106106For more examples please see the package
@@ -137,12 +137,8 @@ file.remove(logfile)
137137
138138lgr in general is stable and safe for use, but some Appenders are still
139139experimental. 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
0 commit comments