readlog: read log files

View source: R/readlog.R

readlogR Documentation

read log files

Description

read log files, and convert to data frame

Usage

readlog(log_name, .time = "all", as_json)

Arguments

log_name

log file name will be used if this argument is missing, otherwise 'readlog' will read 'log_name', 'log_name' can be either file or directory

.time

the min timestamp in log files

as_json

if convert log column to multiple columns, it will use 'as_json' in configuration if this is not provided

Value

log data frame

Examples

## Not run: 
readlog() # use default argument, and the log file name in global configuration
readlog(as_json = FALSE) # don't parse log content as json
readlog(.time = 'today', as_json = TRUE)

readlog(.time = 'yesterday')
readlog(.time = '2 days')
readlog(.time = 'this minute')
readlog(.time = 'this min')
readlog(.time = '3 minutes')
readlog(.time = '1 hour')
readlog(.time = 'this hour')
readlog(.time = '3 weeks')
readlog(.time = 'this week')
readlog(.time = 'this month')
readlog(.time = 'this mon')
readlog(.time = '2 months')
readlog(.time = 'this year')
readlog(.time = '2 years')

readlog(log_name = 'log/log') # custom log files
readlog(log_name = 'log/') # read all log files in log direcotry

## End(Not run)

ashther/ashr.log documentation built on July 30, 2023, 3:30 a.m.