Description Usage Arguments Author(s) Examples
To suppress messages below a given indentation level set the global
option
setting emil_max_indent
, as in the example below.
1 2 |
indent |
Indentation level. Messages with |
... |
Sent to |
time |
Whether or not to print timestamp. |
domain |
See |
appendLF |
Whether to finish the message with a linebreak or not. |
Christofer Bäcklin
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | equipment <- c("flashlight", "snacks", "pick")
{
log_message(1, "Begin descent")
log_message(2, "Oh no, forgot the %s!", sample(equipment, 1))
log_message(2, "Hello? Can you throw it down to me?", time=FALSE)
log_message(1, "Aw shucks, I'm coming back up.")
}
for(verbose in c(TRUE, FALSE)){
cat("It's", verbose, "\n")
for(i in 0:3)
log_message(indent(verbose, i), "Down")
}
options(emil_max_indent = 2)
for(i in 1:3)
log_message(i, "Down")
|
Attaching package: 'emil'
The following object is masked from 'package:base':
mode
25 Jan 22:18 Begin descent
25 Jan 22:18 Oh no, forgot the pick!
Hello? Can you throw it down to me?
25 Jan 22:18 Aw shucks, I'm coming back up.
It's TRUE
25 Jan 22:18 Down
25 Jan 22:18 Down
25 Jan 22:18 Down
25 Jan 22:18 Down
It's FALSE
25 Jan 22:18 Down
25 Jan 22:18 Down
25 Jan 22:18 Down
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.