Skip to main content
shubhamg5785
May 27, 2024
Question

Log Reader - Not working properly

  • May 27, 2024
  • 7 replies
  • 0 views

Hi Team,

I am having an issue with reading the log file (login-audit.csv). It contains multiple rows, but the function is only returning the header and not the rows. However, when I try with other log files, it works fine. Currently Our Appian version is 24.1 and we are using this plugin firsttime.


  Expression - 

  readcsvlogpaging(
  csvPath: "login-audit.csv",
  startIndex :1,
  batchSize:20
)

 

Output

 

 

'type!{com.appiancorp.logreader}CsvContents'('logName': "/usr/local/appian/ae/logs/login-audit.csv", 'totalCount': -1, 'headers': {"2024-05-14 00:00:05", "Appian", "Succeeded", "3.106.112.168", "Web API", "Appian", "cd05a5a0-b1e5-4ffb-8dd6-0f7007e505ce", ""})

7 replies

stefanhelzle0001
May 27, 2024

I did a quick test, and I also only see one row. But in my case, when downloading and opening the CSV, I see only one row.

The reason is log-rotation.

shubhamg5785
May 27, 2024

Hi Stefan! Thanks for checking. Even if you read the log file from yesterday or any previous day, it only returns one row, despite there being many rows in the actual CSV. Please try the expression below.

JUST FYI - We are working on Appian 24.1 Version


readcsvlogpaging(
csvPath: "login-audit.csv.2024-04-26",
startIndex :1,
batchSize:20
)

stefanhelzle0001
May 27, 2024

Works for me.