@@ -155,7 +155,7 @@ safe_output.opal <- function(
155155 if (nrow(userlogs_tbl ) > 0 ) {
156156 userlogs <- userlogs_tbl | >
157157 glue :: glue_data(
158- " [{level}][{format(`@timestamp`, '%Y-%m-%dT%H:%M:%S')}]{stringr::str_pad( paste0('[', ds_action, ']'), 12, 'right', ' ' )}{message}"
158+ " [{level}][{format(`@timestamp`, '%Y-%m-%dT%H:%M:%S')}]{sprintf('%-12s', paste0('[', ds_action, ']'))}{message}"
159159 )
160160 }
161161
@@ -207,12 +207,13 @@ safe_output.opal <- function(
207207 dplyr :: mutate(
208208 # extract function name from ds_eval
209209 ds_function = ds_eval | >
210- stringr :: str_extract( " ^.* (?=\\ ()" ),
210+ gsub( pattern = " (?=\\ ().*$ " , replacement = " " , perl = TRUE ),
211211 # extract symbol/object from ds_eval
212212 ds_symbol = ds_eval | >
213- stringr :: str_extract(" (?<=\\ ()(.*?)(?=\\ ))" ) | >
214- stringr :: str_remove_all(' "|\' ' ) | >
215- stringr :: str_extract(" [^\\ $]*" ),
213+ gsub(pattern = " ^.*(?<=\\ ()" , replacement = " " , perl = TRUE ) | >
214+ gsub(pattern = " (?=\\ )).*$" , replacement = " " , perl = TRUE ) | >
215+ gsub(pattern = ' "|\' ' , replacement = " " , perl = TRUE ) | >
216+ gsub(pattern = " (?=\\ $).*" , replacement = " " , perl = TRUE ),
216217 .before = 1
217218 ) | >
218219 # # verify that `ds_symbol` is a mapped object (`userlogs_tbl_mappings`)
0 commit comments