clear.urls: Clear a list of URLs according parameters.

Description Usage Arguments Value Author(s) Examples

Description

Clear a list of URLs according parameters.

Usage

1
2
clear.urls(urls, remove_http_method = TRUE, remove_http_version = TRUE,
  remove_params_inside_url = TRUE, remove_query_string = TRUE)

Arguments

urls

list of URLs

remove_http_method

boolean. If the http method will be removed from the urls.

remove_http_version

booelan. If the http version will be removed from the urls.

remove_params_inside_url

boolean. If the parameters inside the URL, commonly used in REST web services, will be removed from the urls.

remove_query_string

boolean. If the query string will be removed from the urls.

Value

a vector with the urls cleaned

Author(s)

Diogo Silveira Mendonca

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
#Load the path to the log file
path_combined = system.file("examples", "access_log_combined.txt", package = "ApacheLogProcessor")

#Read a log file with combined format and return it in a data frame
df1 = read.apache.access.log(path_combined)

#Clear the urls
urls <- clear.urls(df1$url)

#Clear the urls but do not remove query strings
urlsWithQS <- clear.urls(df1$url, remove_query_string = FALSE)

#Load a log which the urls have parameters inside
path2 = system.file("examples", 
"access_log_with_params_inside_url.txt", package = "ApacheLogProcessor")

#Read a log file with combined format and return it in a data frame
df2 = read.apache.access.log(path2, format = "common")

#Clear the urls with parameters inside
urls2 <- clear.urls(df2$url)

diogosmendonca/ApacheLogProcessor documentation built on May 15, 2019, 8:46 a.m.